Index: firmware/App/Controllers/Voltages.c =================================================================== diff -u -r6e4bd21dee082a57f919a7a97954376ea2bc01ad -r406b3ea2507978267a519af0e9cbfbaaf03027c7 --- firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 6e4bd21dee082a57f919a7a97954376ea2bc01ad) +++ firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 406b3ea2507978267a519af0e9cbfbaaf03027c7) @@ -32,7 +32,7 @@ #define VOLTAGES_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the voltages data is published on the CAN bus. #define VOLTAGES_ALARM_PERSISTENCE ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Alarm persistence period for voltage monitor alarms. -/// Defined states for the pressure and occlusion monitor state machine. +/// Defined states for the voltage monitor state machine. typedef enum Voltages_States { VOLTAGES_INIT_STATE = 0, ///< Initialization state. Index: firmware/App/Controllers/Voltages.h =================================================================== diff -u -r68e17de06159475b85209fe92aa1f9289e858de3 -r406b3ea2507978267a519af0e9cbfbaaf03027c7 --- firmware/App/Controllers/Voltages.h (.../Voltages.h) (revision 68e17de06159475b85209fe92aa1f9289e858de3) +++ firmware/App/Controllers/Voltages.h (.../Voltages.h) (revision 406b3ea2507978267a519af0e9cbfbaaf03027c7) @@ -31,7 +31,7 @@ // ********** public definitions ********** -/// Enumeration of pressure sensors monitored by this module. +/// Enumeration of voltages monitored by this module. typedef enum Voltages { MONITORED_LINE_1_2V = 0, ///< Processor voltage (1.2V) Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r065601bf5b0fc1b31b10ab54c2711875923c369a -r406b3ea2507978267a519af0e9cbfbaaf03027c7 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 065601bf5b0fc1b31b10ab54c2711875923c369a) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 406b3ea2507978267a519af0e9cbfbaaf03027c7) @@ -28,6 +28,7 @@ #include "OperationModes.h" #include "RTC.h" #include "SystemCommMessages.h" +#include "TaskGeneral.h" #include "Valves.h" #include "WatchdogMgmt.h" @@ -38,6 +39,10 @@ // ********** private definitions ********** +/// Delay (in task intervals) after POST completes. +#define POST_COMPLETED_DELAY ( 2 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) + + // ********** private data ********** static HD_POST_STATE_T postState; ///< Current state of initialize and POST mode. @@ -48,6 +53,8 @@ static BOOL uiPOSTPassed; ///< Final result for UI POST tests (TRUE = passed, FALSE = failed). static BOOL dgPOSTPassed; ///< Final result for DG POST tests (TRUE = passed, FALSE = failed). +static U32 postCompleteDelayTimerCtr; ///< Timer counter for 2 second delay after POST completes and before transitioning to Standbymode. + // ********** private function prototypes ********** static HD_POST_STATE_T handlePOSTStatus( SELF_TEST_STATUS_T testStatus ); @@ -68,6 +75,7 @@ tempPOSTPassed = TRUE; uiPOSTPassed = FALSE; dgPOSTPassed = FALSE; + postCompleteDelayTimerCtr = 0; } /*********************************************************************//** @@ -187,7 +195,7 @@ postState = handlePOSTStatus( testStatus ); break; - // Should be last POST + // Should be last POST (and last POST test must be a test that completes in a single call) case POST_STATE_FPGA: testStatus = execFPGATest(); handlePOSTStatus( testStatus ); // Ignoring return value because last test @@ -211,8 +219,11 @@ postCompleted = TRUE; // Broadcast final POST passed sendPOSTFinalResult( TRUE ); - // Go to standby mode - requestNewOperationMode( MODE_STAN ); + // Delay before going to standby mode + if ( ++postCompleteDelayTimerCtr > POST_COMPLETED_DELAY ) + { + requestNewOperationMode( MODE_STAN ); + } break; case POST_STATE_FAILED: Index: firmware/App/Modes/ModeInitPOST.h =================================================================== diff -u -ra9160f295f6baf4fad4a8e2a739782f6df7d177a -r406b3ea2507978267a519af0e9cbfbaaf03027c7 --- firmware/App/Modes/ModeInitPOST.h (.../ModeInitPOST.h) (revision a9160f295f6baf4fad4a8e2a739782f6df7d177a) +++ firmware/App/Modes/ModeInitPOST.h (.../ModeInitPOST.h) (revision 406b3ea2507978267a519af0e9cbfbaaf03027c7) @@ -23,7 +23,8 @@ /** * @defgroup HDInitAndPOSTMode HDInitAndPOSTMode - * @brief Init&POST mode module. + * @brief Initialization and POST mode module. Manages initialization and POST + * mode functions via a state machine. * * @addtogroup HDInitAndPOSTMode * @{