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.

TMS570LS3137 DCAN MessageBox

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

When I use the TMS570LS3137 DCAN interface , how can I configure the TMS570LS3137 DCAN to use many messageboxes to transmit data?

Thanks and Regards,

Caven

  • You can only use one mailbox to transmit. Since transmit will not occur right after the data into the mailbox. the CAN module needs to check if the bus is idle. Use more than one mailbox will make CPU more efficient. If only use one mailbox, CPU needs to poll if the mailbox is ready (old message is out) before writing the new data. It makes no difference to the external world if you use one or more mailboxes.

    Thanks and regards,

    Zhaohong
  • Hi Caven,

    Like Zhaohong said, it is not necessary to use more than one messagebox since it makes no difference to the outside world. It will just help to free the CPU from having to wait too long.

    The DCAN uses IF registers to communicate between the DCAN module and the DCAN messageboxes. If you are using HALCoGen, you can just use the canTransmit() API with the required messagebox(the messagebox must be enabled in the HALCoGen GUI).
    If you are not using HALCoGen, taking a look at how the canTransmit() is implemented might still help. The configuration of the IFCMD register determines which messagebox will be used for the data passed into the IF register. You can take a look at the TRM for a better understanding(Section DCAN Module -> Message Interface Register Sets -> Using Message Interface Register sets).

    Thanks and Regards,
    Vineeth