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.

TMS570LC4357: Data frame issue

Part Number: TMS570LC4357

Hi team,

Here's an issue from the customer may need your help:

After updating the ID using the canUpdateID function, the transmitted data frame becomes a remote frame.

//msgBoxArbitVal has transmitted 0XA1300000.

void canUpdateID(canBASE_t *node, uint32 messageBox, uint32 msgBoxArbitVal)
{

/** - Wait until IF2 is ready for use */
while ((node->IF2STAT & 0x80U) ==0x80U)
{
} /* Wait */

/** - Configure IF2 for
* - Message direction - Read
* - Data Read
* - Clears NewDat bit in the message object.
*/
node->IF2CMD = 0xA0U;
/* Copy passed value into the arbitration register. */
node->IF2ARB &= 0x80000000U;
node->IF2ARB |= (msgBoxArbitVal & 0x7FFFFFFFU);

/** - Update message box number. */
/*SAFETYMCUSW 93 S MR: 6.1,6.2,10.1,10.2,10.3,10.4 <APPROVED> "LDRA Tool issue" */
node->IF2NO = (uint8) messageBox;

/** - Wait until data are copied into IF2 */
while ((node->IF2STAT & 0x80U) ==0x80U)
{
} /* Wait */

}

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    The CAN remote frame is explicitly marked as a Remote Frame (the RTR bit in the Arbitration Field is recessive), and there is no Data Field. The intended purpose of the Remote Frame is to solicit the transmission of the corresponding Data Frame. If, say, node A (CAN 1) transmits a Remote Frame with the Arbitration Field set to 123, then node B (CAN 2) will respond with a Data Frame with the Arbitration Field also set to 123.

    1. The message object or mailbox to send Remote Frame has to be configured as RX

    2. The RTR bit has to be set

    I don't know how the canUpdataID() function can change your mailbox's configuration: set RTR and change TX to RX.

    Please double check other portion of your code.