Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r2bb447181c2519690441d81f83563d17e0882ef2 -r85bfe5051e4d2bf67be39d394f96c075b4e52836 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 2bb447181c2519690441d81f83563d17e0882ef2) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 85bfe5051e4d2bf67be39d394f96c075b4e52836) @@ -76,8 +76,9 @@ static BOOL uiIsCommunicating = FALSE; // has UI sent a message since last check static BOOL uiDidCommunicate = FALSE; // has UI every sent a message -static U32 sentCANPacketsCount = 0; +static U32 sentCANPacketsCount = 0; // TODO - debug - remove these two flags later static U32 compCANPacketsCount = 0; +static CAN_MESSAGE_BOX_T pendingXmitMsgBox = 0; // ********** private function prototypes ********** @@ -250,6 +251,11 @@ *************************************************************************/ void handleCANMsgInterrupt( CAN_MESSAGE_BOX_T srcCANBox ) { + if ( ( TRUE == isCANBoxForXmit( srcCANBox ) ) && ( srcCANBox != pendingXmitMsgBox ) ) + { + srcCANBox = (CAN_MESSAGE_BOX_T)0; + } + // message interrupt is for a transmit message box? if ( TRUE == isCANBoxForXmit( srcCANBox ) ) { @@ -500,8 +506,10 @@ if ( dataSize == CAN_MESSAGE_PAYLOAD_SIZE ) { signalCANXmitsInitiated(); + pendingXmitMsgBox = mBox; if ( canTransmit( canREG1, mBox, data ) == 0 ) { + signalCANXmitsCompleted(); // TODO - shouldn't get here, but let's see if we do SET_ALARM_WITH_1_U32_DATA( ALARM_ID_SOFTWARE_FAULT, (U32)mBox ) }