Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r5ce7985577e93071cd4c361efe2342cdcd7004dd -r632b2d868efba2aca7c694a9ff648753804a9671 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 5ce7985577e93071cd4c361efe2342cdcd7004dd) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 632b2d868efba2aca7c694a9ff648753804a9671) @@ -56,6 +56,9 @@ #define MSG_NOT_ACKED_MAX_RETRIES 20 ///< Maximum number of times a message that requires ACK that was not ACK'd can be re-sent before alarm #define PENDING_ACK_LIST_SIZE 25 ///< Maximum number of Denali messages that can be pending ACK at any given time +#define MAX_FPGA_CLOCK_SPEED_ERRORS 3 ///< maximum number of FPGA clock speed errors within window period before alarm +#define MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< FPGA clock speed error window + #pragma pack(push, 1) /// Record for transmitted message that is pending acknowledgment from receiver. @@ -143,6 +146,9 @@ // Initialize bad message CRC time windowed count initTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC, MAX_COMM_CRC_FAILURES, MAX_COMM_CRC_FAILURE_WINDOW_MS ); + + // Initialize FPGA clock speed error time windowed count + initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR, MAX_FPGA_CLOCK_SPEED_ERRORS, MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS); // Initialize pending ACK list for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ )