Index: firmware/App/Services/Interrupts.c =================================================================== diff -u -r8467f8ff09e382e0991f14d02683080dc811e24e -rde2ef5ff6293f23a43414c5e2e40630468a68ddf --- firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 8467f8ff09e382e0991f14d02683080dc811e24e) +++ firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision de2ef5ff6293f23a43414c5e2e40630468a68ddf) @@ -45,10 +45,6 @@ // ********** private data ********** -static U32 sci2FrameErrorCnt; ///< SCI2 frame error count. -static U32 sci2OverrunErrorCnt; ///< SCI2 overrun error count. - -static U32 can1PassiveCnt; ///< CAN1 passive count. static U32 can1WarningCnt; ///< CAN1 warning count. static U32 can1BusOffCnt; ///< CAN1 bus offline count. static U32 can1ParityCnt; ///< CAN1 parity count. @@ -62,15 +58,11 @@ *************************************************************************/ void initInterrupts( void ) { - sci2FrameErrorCnt = 0; - sci2OverrunErrorCnt = 0; - can1PassiveCnt = 0; can1WarningCnt = 0; can1BusOffCnt = 0; can1ParityCnt = 0; // initialize various time windowed counts for monitoring CAN & UART errors and warnings - initTimeWindowedCount( TIME_WINDOWED_COUNT_CAN_PASSIVE, MAX_COMM_ERRORS, COMM_ERROR_TIME_WINDOW_MS ); initTimeWindowedCount( TIME_WINDOWED_COUNT_CAN_OFF, MAX_COMM_ERRORS, COMM_ERROR_TIME_WINDOW_MS ); initTimeWindowedCount( TIME_WINDOWED_COUNT_CAN_PARITY, MAX_COMM_ERRORS, COMM_ERROR_TIME_WINDOW_MS ); initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_UART_FRAME_ERROR, MAX_COMM_ERRORS, COMM_ERROR_TIME_WINDOW_MS ); @@ -184,60 +176,17 @@ } else if ( notification & canLEVEL_WARNING ) { - can1WarningCnt++; + can1WarningCnt++; + } + else + { + // Ignore - other notifications - unhandled } - else if ( notification & canLEVEL_PASSIVE ) - { - can1PassiveCnt++; - if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_CAN_PASSIVE ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_CAN_PASSIVE_WARNING ) - } - } - else - { - // ignore - other notifications undefined - } } } /*********************************************************************//** * @brief - * The sciNotification function handles UART communication error interrupts. - * Frame and Over-run errors are handled. - * @details Inputs: none - * @details Outputs: UART error interrupts handled. - * @param sci pointer to the SCI peripheral that detected the error - * @param flags error flag(s) - * @return none - *************************************************************************/ -void sciNotification(sciBASE_t *sci, uint32 flags) -{ - if ( sci == scilinREG ) - { - if ( ( flags & SCI_FE_INT ) != 0 ) - { - sci2FrameErrorCnt++; - clearSCI2CommErrors(); - if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_UART_FRAME_ERROR ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_UART_FRAME_ERROR ) - } - } - if ( ( flags & SCI_OE_INT ) != 0 ) - { - sci2OverrunErrorCnt++; - clearSCI2CommErrors(); - if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_UART_OVERRUN ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_UART_OVERRUN_ERROR ) - } - } - } -} - -/*********************************************************************//** - * @brief * The dmaGroupANotification function handles communication DMA interrupts. * @details Inputs: none * @details Outputs: DMA interrupt is handled.