Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r026197c08dc426a0a79c9a958d20578d52a9fee3 -r8b97a7e50a19f1c243559ad77c69b6a9e6ad067a --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 026197c08dc426a0a79c9a958d20578d52a9fee3) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 8b97a7e50a19f1c243559ad77c69b6a9e6ad067a) @@ -20,13 +20,13 @@ #include "AlarmLamp.h" //#include "BloodFlow.h" -#include "Buttons.h" +//#include "Buttons.h" #include "Compatible.h" #include "CpldInterface.h" #include "Ejector.h" //#include "Fans.h" #include "FpgaTD.h" -#include "Integrity.h" +//#include "Integrity.h" #include "Messaging.h" #include "ModeInitPOST.h" //#include "NVDataMgmt.h" @@ -144,13 +144,13 @@ U32 execInitAndPOSTMode( void ) { SELF_TEST_STATUS_T testStatus = SELF_TEST_STATUS_IN_PROGRESS; - BOOL stop = isStopButtonPressed(); +// BOOL stop = isStopButtonPressed(); +// +// if ( TRUE == stop ) +// { +// // Ignore stop button in this mode. +// } - if ( TRUE == stop ) - { - // Ignore stop button in this mode. - } - // Execute current POST state *Note - these switch cases must be in same order as enum HD_POST_States switch ( postState ) { @@ -159,7 +159,7 @@ break; case POST_STATE_FW_INTEGRITY: - testStatus = execIntegrityTest(); +// testStatus = execIntegrityTest(); postState = handlePOSTStatus( testStatus ); break; @@ -168,91 +168,78 @@ // can query their corresponding calibration values successfully case POST_STATE_NVDATAMGMT: // testStatus = execNVDataMgmtSelfTest(); - // TODO: Restore NVDataMgmt POST execution when NVDataMgmt self-test is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; case POST_STATE_WATCHDOG: // testStatus = execWatchdogTest(); - // TODO: Restore Watchdog POST execution when DVT hardware support is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; case POST_STATE_SAFETY_SHUTDOWN: // testStatus = execSafetyShutdownTest(); - // TODO: Restore Safety Shutdown POST execution when DVT hardware support is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; case POST_STATE_BLOOD_FLOW: // testStatus = execBloodFlowTest(); - // TODO: Restore Blood Flow POST execution when Blood Flow self-test is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); // sendUIRequestPOSTFinalResult(); // request UI POST final result here so we have it before UI test below break; case POST_STATE_VALVES: // testStatus = execValvesSelfTest(); - // TODO: Restore Valves POST execution when Valves self-test is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; case POST_STATE_SYRINGE_PUMP: // testStatus = execSyringePumpSelfTest(); - // TODO: Restore Syringe Pump POST execution when Syringe Pump self-test is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; - case POST_STATE_PRESSURE: -// testStatus = execPressureSelfTest(); - // TODO: Restore Pressure POST execution when Pressure self-test is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; + case POST_STATE_PRES_OCCL: +// testStatus = execPresOcclSelfTest(); postState = handlePOSTStatus( testStatus ); break; case POST_STATE_ALARM_AUDIO: - testStatus = execAlarmAudioSelfTest(); +#ifndef _RELEASE_ +// if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) +#endif +// { +// testStatus = execAlarmAudioSelfTest(); +// } +#ifndef _RELEASE_ +// else + { + testStatus = SELF_TEST_STATUS_PASSED; + } +#endif postState = handlePOSTStatus( testStatus ); break; case POST_STATE_ALARM_LAMP: - testStatus = execAlarmLampTest(); +// testStatus = execAlarmLampTest(); postState = handlePOSTStatus( testStatus ); break; case POST_STATE_TEMPERATURES: // testStatus = execTemperaturesSelfTest(); - // TODO: Restore Temperatures POST execution when Temperatures self-test is available. - // Temporarily pass this POST state so the POST sequence can continue. - testStatus = SELF_TEST_STATUS_PASSED; postState = handlePOSTStatus( testStatus ); break; case POST_STATE_STUCK_BUTTON: - testStatus = execStuckButtonTest(); +// testStatus = execStuckButtonTest(); postState = handlePOSTStatus( testStatus ); break; case POST_STATE_UI_POST: - testStatus = execUITest(); +// testStatus = execUITest(); postState = handlePOSTStatus( testStatus ); break; case POST_STATE_FW_COMPATIBILITY: - testStatus = execFWCompatibilityTest(); +// testStatus = execFWCompatibilityTest(); postState = handlePOSTStatus( testStatus ); break; @@ -263,7 +250,7 @@ // Should be last POST (and last POST test must be a test that completes in a single call) case POST_STATE_FPGA: - testStatus = execFPGATest(); +// testStatus = execFPGATest(); handlePOSTStatus( testStatus ); // Ignoring return value because last test if ( TRUE == tempPOSTPassed ) { @@ -458,7 +445,7 @@ if ( testStatus == SELF_TEST_STATUS_PASSED ) { // Broadcast passed POST result - sendPOSTTestResult( (TD_POST_STATE_T)( (int)postState ), TRUE ); +// sendPOSTTestResult( (HD_POST_STATE_T)((int)postState), TRUE ); // Move on to next POST test result = (TD_POST_STATE_T)((int)postState + 1); } @@ -467,8 +454,8 @@ // At least one POST has failed tempPOSTPassed = FALSE; // Broadcast failed POST results - sendPOSTTestResult( (TD_POST_STATE_T)( (int)postState ), FALSE ); - sendPOSTFinalResult( FALSE ); +// sendPOSTTestResult( (HD_POST_STATE_T)((int)postState), FALSE ); +// sendPOSTFinalResult( FALSE ); // Test that failed should have triggered a fault which will request fault mode, so should POST state machine should never see FAILED state and will fault if it does result = POST_STATE_FAILED; } @@ -500,21 +487,21 @@ setSystemREG1_SYSECR( getSystemREG1_SYSECR() ); // clear reset bit(s) after logging event so subsequent resets can be properly identified as not being power-on resets. setCrcREG_PSA_SIGREGL1( 0 ); // clear preserved power-on reset bit. - sendUIVersionRequest(); // request UI to send us its version - needed for compatibility check +// sendUIVersionRequest(); // request UI to send us its version - needed for compatibility check - if ( TRUE == isDDCommunicating() ) - { - sendRequestForDDResendAlarms(); // request DD to re-send any active alarms that may have been triggered before we came up - } +// if ( TRUE == isDGCommunicating() ) +// { +// sendRequestForDGResendAlarms(); // request DG to re-send any active alarms that may have been triggered before we came up +// } // Send the startup event - SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_STARTUP, systemREG1->DEV, 0x12345678 ) // log startup event w/ device ID bits - SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_STARTUP, resetReason, systemREG1->GBLSTAT ) // log startup event w/ reset reason(s) bits +// SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, systemREG1->DEV, 0x12345678 ) // log startup event w/ device ID bits +// SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, resetReason, systemREG1->GBLSTAT ) // log startup event w/ reset reason(s) bits // Send the first submode change event. It is the mode Init and it does not start from a previous // mode previous and current are both published as Init - SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_OP_MODE_CHANGE, MODE_INIT, MODE_INIT ) - state = POST_STATE_FW_INTEGRITY; +// SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_OP_MODE_CHANGE, MODE_INIT, MODE_INIT ) + state = POST_STATE_COMPLETED; //POST_STATE_FW_INTEGRITY; startPOSTDelayCounter = 0; } @@ -524,19 +511,19 @@ /*********************************************************************//** * @brief * The execFWCompatibilityTest function executes the firmware compatibility test. - * @details \b Inputs: uiVersion + * @details \b Inputs: none * @details \b Outputs: none * @return in progress, passed, or failed *************************************************************************/ static SELF_TEST_STATUS_T execFWCompatibilityTest( void ) { SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; - if ( uiVersion.compatibility != SW_COMPATIBILITY_REV ) - { - result = SELF_TEST_STATUS_FAILED; - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_UI_COMPATIBILITY_ERROR, uiVersion.compatibility, SW_COMPATIBILITY_REV ) - } +// if ( uiVersion.compatibility != SW_COMPATIBILITY_REV ) +// { +// result = SELF_TEST_STATUS_FAILED; +// SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_UI_COMPATIBILITY_ERROR, uiVersion.compatibility, SW_COMPATIBILITY_REV ) +// } return result; } @@ -553,28 +540,24 @@ SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; // UI should have sent POST results before we start this test - if ( TRUE == uiPOSTResultReceived ) - { - if ( TRUE == uiPOSTPassed ) +// if ( TRUE == uiPOSTResultReceived ) +// { +// if ( TRUE == uiPOSTPassed ) { result = SELF_TEST_STATUS_PASSED; } - else - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_TD_UI_POST_TIMEOUT, 0 ) - result = SELF_TEST_STATUS_FAILED; - } - } - // If UI had not already sent POST results before we started, allow finite period for UI to send. - else if ( ++waitForUIPostTimerCtr > POST_UI_MAX_WAIT_TIME ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_TD_UI_POST_TIMEOUT, 1 ) - result = SELF_TEST_STATUS_FAILED; - } - else - { - // do nothing - } +// else +// { +// SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_UI_POST_TIMEOUT, 0 ) +// result = SELF_TEST_STATUS_FAILED; +// } +// } +// // If UI had not already sent POST results before we started, allow finite period for UI to send. +// else if ( ++waitForUIPostTimerCtr > POST_UI_MAX_WAIT_TIME ) +// { +// SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_UI_POST_TIMEOUT, 1 ) +// result = SELF_TEST_STATUS_FAILED; +// } return result; }