Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rb36fc8801adfc9d2f402450abffe721e71f9a5e5 -r359f9350ad9b2156ce02c94fa4950c4fb6768572 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision b36fc8801adfc9d2f402450abffe721e71f9a5e5) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 359f9350ad9b2156ce02c94fa4950c4fb6768572) @@ -333,10 +333,10 @@ static FPGA_SENSORS_ASYNC_T fpgaSensorReadingsAsync; ///< Record of last received async (as needed) FPGA sensor data. #endif -#ifndef DEBUG_ENABLED +//#ifndef DEBUG_ENABLED TODO: uncomment it DN-15SEPT2022 static U16 currentFPGATimerCount_ms; ///< Current FPGA timer count in ms. static U32 currentTimerCount_ms; ///< Current processor timer count in ms. -#endif +//#endif // ********** private function prototypes ********** @@ -971,7 +971,7 @@ *************************************************************************/ void execFPGAClockSpeedTest( void ) { -#ifndef DEBUG_ENABLED +//#ifndef DEBUG_ENABLED TODO: uncomment it DN-15SEPT2022 U16 const newFPGATimerCount_ms = getFPGATimerCount(); U32 const newTimerCount_ms = getMSTimerCount(); U32 const diffFPGATimerCount = (U32)u16DiffWithWrap( currentFPGATimerCount_ms, newFPGATimerCount_ms ); @@ -981,13 +981,16 @@ { if ( abs( diffFPGATimerCount - diffTimerCount ) > PROCESSOR_FPGA_CLOCK_DIFF_TOLERANCE ) { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_FPGA_CLOCK_SPEED_CHECK_FAILURE, diffFPGATimerCount, diffTimerCount ); + if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR ) ) // DN-16SEPT2022 + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_FPGA_CLOCK_SPEED_CHECK_FAILURE, diffFPGATimerCount, diffTimerCount ); + } } } currentFPGATimerCount_ms = newFPGATimerCount_ms; currentTimerCount_ms = newTimerCount_ms; -#endif +//#endif } /*********************************************************************//**