Index: firmware/App/Services/Interrupts.c =================================================================== diff -u -r4d7d40a27130dc813d653f044cbb856b1b7d8481 -r8467f8ff09e382e0991f14d02683080dc811e24e --- firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 4d7d40a27130dc813d653f044cbb856b1b7d8481) +++ firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 8467f8ff09e382e0991f14d02683080dc811e24e) @@ -45,10 +45,6 @@ // ********** private data ********** -#ifdef DEBUG_ENABLED - static U32 sci1FrameErrorCnt = 0; - static U32 sci1OverrunErrorCnt = 0; -#endif static U32 sci2FrameErrorCnt; ///< SCI2 frame error count. static U32 sci2OverrunErrorCnt; ///< SCI2 overrun error count. @@ -131,7 +127,7 @@ break; default: - // TODO - s/w fault? + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_RTI_NOTIFICATION, notification ) break; } } @@ -168,10 +164,6 @@ *************************************************************************/ void canErrorNotification(canBASE_t *node, uint32 notification) { -#ifdef DEBUG_ENABLED - char debugStr[ 256 ]; -#endif - if ( node == canREG1 ) { if ( notification & canLEVEL_PARITY_ERR ) @@ -181,11 +173,6 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_CAN_PARITY_ERROR ) } -#ifdef DEBUG_ENABLED - sprintf( debugStr, "CAN parity error:%5d \n", can1ParityCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); -#endif } else if ( notification & canLEVEL_BUS_OFF ) { @@ -194,20 +181,10 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_CAN_OFF_ERROR ) } -#ifdef DEBUG_ENABLED - sprintf( debugStr, "CAN bus off error:%5d \n", can1BusOffCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); -#endif } else if ( notification & canLEVEL_WARNING ) { can1WarningCnt++; -#ifdef DEBUG_ENABLED - sprintf( debugStr, "CAN bus warning:%5d \n", can1WarningCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); -#endif } else if ( notification & canLEVEL_PASSIVE ) { @@ -216,11 +193,6 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_CAN_PASSIVE_WARNING ) } -#ifdef DEBUG_ENABLED - sprintf( debugStr, "CAN passive warning:%5d \n", can1PassiveCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); -#endif } else { @@ -241,11 +213,6 @@ *************************************************************************/ void sciNotification(sciBASE_t *sci, uint32 flags) { -#ifdef DEBUG_ENABLED - // TODO - temporary debug code - remove later - char debugStr[ 256 ]; -#endif - if ( sci == scilinREG ) { if ( ( flags & SCI_FE_INT ) != 0 ) @@ -256,11 +223,6 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_UART_FRAME_ERROR ) } -#ifdef DEBUG_ENABLED - sprintf( debugStr, "FPGA UART FR err:%5d \n", sci2FrameErrorCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); -#endif } if ( ( flags & SCI_OE_INT ) != 0 ) { @@ -270,34 +232,8 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_SOFTWARE_FAULT, SW_FAULT_ID_FPGA_UART_OVERRUN_ERROR ) } -#ifdef DEBUG_ENABLED - sprintf( debugStr, "FPGA UART OR err:%5d \n", sci2OverrunErrorCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); -#endif } } -#ifdef DEBUG_ENABLED - else if ( sci == sciREG ) - { - if ( ( flags & SCI_FE_INT ) != 0 ) - { - sci1FrameErrorCnt++; - clearSCI1CommErrors(); - sprintf( debugStr, "Debug UART FR err:%5d \n", sci1FrameErrorCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); - } - if ( ( flags & SCI_OE_INT ) != 0 ) - { - sci1OverrunErrorCnt++; - clearSCI1CommErrors(); - sprintf( debugStr, "Debug UART OR err:%5d \n", sci1OverrunErrorCnt ); - sendDebugData( (U08*)debugStr, strlen(debugStr) ); - sendDebugDataToUI( (U08*)debugStr ); - } - } -#endif } /*********************************************************************//**