Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
SysMngmt.cpp@29:f148490b5f65, 2014-11-08 (annotated)
- Committer:
- pspatel321
- Date:
- Sat Nov 08 17:15:14 2014 +0000
- Revision:
- 29:f148490b5f65
- Parent:
- 20:3dfa7e9461a0
Parth edits branch
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| martydd3 | 6:6a04210a3f4f | 1 | #include "mbed.h" |
| martydd3 | 20:3dfa7e9461a0 | 2 | #include "rtos.h" |
| martydd3 | 20:3dfa7e9461a0 | 3 | #include "IOobjects.h" |
| martydd3 | 20:3dfa7e9461a0 | 4 | #include "SerialDiagnostics.h" |
| martydd3 | 6:6a04210a3f4f | 5 | |
| martydd3 | 20:3dfa7e9461a0 | 6 | int main() { |
| martydd3 | 20:3dfa7e9461a0 | 7 | wdt.kick(); // Kick the watchdog timer |
| martydd3 | 20:3dfa7e9461a0 | 8 | pc.baud(921600); |
| martydd3 | 20:3dfa7e9461a0 | 9 | pc.printf("\r\n\r\nPCM Reset\r\n"); |
| martydd3 | 20:3dfa7e9461a0 | 10 | |
| martydd3 | 20:3dfa7e9461a0 | 11 | // Did a watchdog reset occur since last power cycle? |
| martydd3 | 20:3dfa7e9461a0 | 12 | if (wdt.checkFlag()) { |
| martydd3 | 20:3dfa7e9461a0 | 13 | pc.printf("Watchdog Reset\r\n"); |
| martydd3 | 20:3dfa7e9461a0 | 14 | } |
| martydd3 | 20:3dfa7e9461a0 | 15 | |
| martydd3 | 20:3dfa7e9461a0 | 16 | Thread serialThread(SerialDiagnostics::thread_serialOut, 0, osPriorityNormal, 6000); |
| martydd3 | 20:3dfa7e9461a0 | 17 | |
| martydd3 | 20:3dfa7e9461a0 | 18 | while(1) { |
| martydd3 | 20:3dfa7e9461a0 | 19 | wdt.kick(); |
| martydd3 | 12:e0adb697fcdb | 20 | } |
| pspatel321 | 29:f148490b5f65 | 21 | } |
