Index: firmware/App/Services/WatchdogMgmt.c =================================================================== diff -u -ra356dadb4d4eb04a8fe967fc53b394e9f948a718 -rcc7f1bd82e346521f0102b3398bd030fb3bb0e6f --- firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision a356dadb4d4eb04a8fe967fc53b394e9f948a718) +++ firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision cc7f1bd82e346521f0102b3398bd030fb3bb0e6f) @@ -8,7 +8,7 @@ * @file WatchdogMgmt.c * * @author (last) Dara Navaei -* @date (last) 04-Jan-2022 +* @date (last) 10-Feb-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -35,10 +35,10 @@ #define WATCHDOG_POST_TIMEOUT_MS 500 ///< Watchdog POST test timeout (in ms). #define WATCHDOG_RECOVERY_TIME_MS 500 ///< After watchdog POST test, wait this long (in ms) before moving on. -#define MAX_24V_LEVEL_ON_WATCHDOG_EXPIRED 5.0 ///< Maximum voltage on 24V line when watchdog is expired. // TODO - check w/ Systems. Takes time for V to bleed off. Had to raise to 5V. -#define MIN_24V_LEVEL_ON_WATCHDOG_RECOVER 22.6 ///< Minimum voltage on 24V line when watchdog is recovered. -#define MIN_BACKUP_ALARM_CURRENT_MA 200.0 ///< Minimum backup alarm audio current (in mA) detected when watchdog is expired. -#define MAX_BACKUP_ALARM_CURRENT_MA 10.0 ///< Maximum backup alarm audio current (in mA) detected when watchdog is recovered. +#define MAX_24V_LEVEL_ON_WATCHDOG_EXPIRED 5.0F ///< Maximum voltage on 24V line when watchdog is expired. // TODO - check w/ Systems. Takes time for V to bleed off. Had to raise to 5V. +#define MIN_24V_LEVEL_ON_WATCHDOG_RECOVER 22.6F ///< Minimum voltage on 24V line when watchdog is recovered. +#define MIN_BACKUP_ALARM_CURRENT_MA 200.0F ///< Minimum backup alarm audio current (in mA) detected when watchdog is expired. +#define MAX_BACKUP_ALARM_CURRENT_MA 10.0F ///< Maximum backup alarm audio current (in mA) detected when watchdog is recovered. /// Enumeration of watchdog self-test states. typedef enum Watchdog_Self_Test_States @@ -184,11 +184,15 @@ watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } // Verify backup alarm audio is on when w.d. expired - else if ( ( audioCurrent < MIN_BACKUP_ALARM_CURRENT_MA ) && - ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) ) + else if ( audioCurrent < MIN_BACKUP_ALARM_CURRENT_MA ) { - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 3.0, audioCurrent ); - watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) +#endif + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 3.0, audioCurrent ); + watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; + } } } else @@ -215,11 +219,15 @@ watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } // Verify backup alarm audio is on when w.d. recovered - else if ( ( audioCurrent > MAX_BACKUP_ALARM_CURRENT_MA ) && - ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) ) + else if ( audioCurrent > MAX_BACKUP_ALARM_CURRENT_MA ) { - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 5.0, audioCurrent ); - watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) +#endif + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 5.0, audioCurrent ); + watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; + } } else {