Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r09e6cf9de34acf18f6e1138bf56ac0edb4821186 -r65280b3e6fda421cc2130e7e73f41e9fd23b51c9 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 09e6cf9de34acf18f6e1138bf56ac0edb4821186) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 65280b3e6fda421cc2130e7e73f41e9fd23b51c9) @@ -30,6 +30,7 @@ #include "RTC.h" #include "SafetyShutdown.h" #include "SyringePump.h" +#include "system.h" #include "SystemCommMessages.h" #include "TaskGeneral.h" #include "Valves.h" @@ -428,6 +429,8 @@ { sendUIVersionRequest(); + SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, SYS_EXCEPTION, (U32)0x000BAD01 ) // log ESR value and BAD01 to indicate the causes of resets (see Table 2-8 Technical Ref Manual) + SYS_EXCEPTION = 0xFFFFU; // clear all exception flags by writing logic 1 to each bit // Send the startup event SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, 0, 0 ) // Send the first submode change event. It is the mode Init and it does not start from a previous