This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123G CAN: Updating a transmit message Object, Data lost problem

According to datasheet, cpu may update the data bytes any time, we called api function CANMessageSet() to get data send.

Each can node have data consist of 2(maybe more) frames :A(old)  first, B(new) second, and all node send A almost at the same time, send B a little time later.

Target: if  one can node get bus , A can be send ok, if loses, then B overwritten A, B shall be send later as B is new.

Result: most time, A/B can be seen send ok, but sometime A is not overwritten by B, A is ok, B is lost!

According to datasheet:"

Even if only some of the data bytes are to be updated, all four bytes of the corresponding

CANIFnDAn/CANIFnDBn register have to be valid before the content of that register is transferred
to the message object. Either the CPU must write all four bytes into the CANIFnDAn/CANIFnDBn
register or the message object is transferred to the CANIFnDAn/CANIFnDBn register before the
CPU writes the new data bytes.
In order to only update the data in a message object, the WRNRD, DATAA and DATAB bits in the
CANIFnMSKn register are set, followed by writing the updated data into CANIFnDA1, CANIFnDA2,
CANIFnDB1, and CANIFnDB2 registers, and then the number of the message object is written to
the MNUM field in the CAN IFn Command Request (CANIFnCRQ) register. To begin transmission
of the new data as soon as possible, set the TXRQST bit in the CANIFnMSKn register.
To prevent the clearing of the TXRQST bit in the CANIFnMCTL register at the end of a transmission
that may already be in progress while the data is updated, the NEWDAT and TXRQST bits have to be
set at the same time in the CANIFnMCTL register. When these bits are set at the same time, NEWDAT
is cleared as soon as the new transmission has started."

 we suspect:  at the time B written into message object, A is transmiting in progress; when A finished, it may clear  TXRQST bit which cause B data lost!

I don't think the context described there can be easily changed into according source code, so can anyone give me a hand?