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.

TMS320F28379D: How to process a received CANbus remote request as an ISR

Part Number: TMS320F28379D

Tool/software:

Hello,

I would like to use the CAN bus peripheral to receive remote requests for around 60 different IDs and provide unique data messages back based on the requested ID.  There isn't enough message objects (32) to do this with an auto reply, CAN_MSG_OBJ_TYPE_RXTX_REMOTE, as seen in can_ex9_remote_answer.c .

My thought is to create an ISR which 1) confirms the IRQ is caused by a remote request and 2) checks the ID of the remote request and replies with the associated CAN bus data frame.  My questions are:

  • From within an ISR how can I check if the can bus message had the remote bit set (driverlib preferred) so I can distinguish between RX of a data frame vs a remote frame.
  • From within an ISR how can I obtain the ID used in the CAN bus message (identify which of the 60 different possibilities)?
  • Is using an ISR for replying to so many remote IDs the best approach or are there any other suggestions?

Thank you.