MsgLst bit in IFxMCTL is interpreted incorrectly
Dear @foxBMS team,
I encountered an issue in the CAN_RxInterrupt function. In this function the return value of canGetData is checked. If it equals 1 the message is handled, otherwise it's discarded.
The function canGetData can also return value 3 when the MsgLst bit is set in IFxMCTL. In this case the message is discarded, because it would mean that data has been lost. This is suggested by the comments in the function in HL_can.c. The comment says: /** - Check if data have been lost: * - no data lost, return 1 * - data lost, return 3 */
However, the technical reference manual states something else. It says that when MsgLost is set that "The Message Handler stored a new message into this object when NewDat was still set, so the previous message has been overwritten."
This doesn't mean that the current message is invalid, it simply means we've lost a message in the meantime. So, the current message should not be discarded in that case.
Best regards, Bert