Index: firmware/App/Services/WatchdogMgmt.c =================================================================== diff -u -ra2bc96881a5fc3d8f779246b2abebf15a8de9384 -rc814c83cd10722b52476e54938c2f80d69f794e0 --- firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision a2bc96881a5fc3d8f779246b2abebf15a8de9384) +++ firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision c814c83cd10722b52476e54938c2f80d69f794e0) @@ -15,7 +15,8 @@ * ***************************************************************************/ -#include "CPLD.h" +#include "CPLD.h" +#include "InternalADC.h" #include "SafetyShutdown.h" #include "SystemCommMessages.h" #include "Timers.h" @@ -30,8 +31,11 @@ #define MIN_WATCHDOG_PET_INTERVAL_MS 45 ///< Minimum watchdog pet interval (in ms). #define WATCHDOG_POST_TIMEOUT_MS 100 ///< Watchdog POST test timeout (in ms). -#define WATCHDOG_RECOVERY_TIME_MS 250 ///< After watchdog POST test, wait this long (in ms) before moving on. +#define WATCHDOG_RECOVERY_TIME_MS 250 ///< After watchdog POST test, wait this long (in ms) before moving on. +#define MAX_24V_LEVEL_ON_WATCHDOG_EXPIRED 1.0 ///< Maximum voltage on 24V line when watchdog is expired. +#define MIN_BACKUP_ALARM_CURRENT 10.0 ///< Minimum backup alarm audio current (in mA) detected when watchdog is expired. + /// Enumeration of watchdog self-test states. typedef enum Watchdog_Self_Test_States { @@ -165,11 +169,22 @@ } if ( getCPLDWatchdogExpired() == PIN_SIGNAL_HIGH ) { + // Verify 24V is down when w.d. expired + if ( getIntADCVoltageConverted( INT_ADC_24V_ACTUATORS ) > MAX_24V_LEVEL_ON_WATCHDOG_EXPIRED ) + { + // TODO - alarm + } + // Verify backup alarm audio is on when w.d. expired + if ( getIntADCVoltageConverted( INT_ADC_BACKUP_ALARM_CURRENT ) < MIN_BACKUP_ALARM_CURRENT ) + { + // TODO - alarm + } + // TODO - user needs to verify backup alarm audio and LED? watchdogSelfTestStatus = SELF_TEST_STATUS_PASSED; } else { - activateAlarmNoData( ALARM_ID_WATCHDOG_POST_TEST_FAILED ); + activateAlarmNoData( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED ); watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } watchdogSelfTestTimerCount = getMSTimerCount();