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.

TMS570LS1224: DCAN, why there are so many message boxes? why we need 64?

Part Number: TMS570LS1224

Hi, All.

  I have read the technique document of Hercules Family Launchpad, I still do not have a comprehensive understanding of how DCAN messages box work. What I think is,

For example, Receiving Message :

1. When Rx pin receive a CAN message, the "CAN Core" would put this message into "Message RAM", which is implemented by a FIFO, and data structure is the "Message Object".

2. I cannot access the "Message RAM" in normal mode, I only can access it through the "IFx Register". IF1 and IF2 is for Read and Write, IF3 is Read Only.

My problem of understanding is at here, IFx register has a "Message Number" variable, and the priority is based on the "Message Number". Suppose now, I have 3 messages in my FIFO, Since this launchpad is single thread, and structure is FIFO, thus, I could only get messages one by one, so, canMESSAGE_BOX1 is enough for this job, why there are 64 message boxes?

I know there is a reason, that's why I ask. Thanks very much.

  • Hello Joe,

    the IFx registers are present to help in avoiding collisions between the CPU access to the Message RAM and the DCAN state machine access to the Message RAM. The reason for so many message boxes is simply to allow for some prioritization of messages (based on ID filtering) and also to help avoid data overrun errors where messages are lost because a new one has been received. Note that although you are treating the access as serial, in many cases, the data is received and DMA transactions move the received message to RAM for the application to process. This can happen very quickly and autonomous of CPU execution so as to not limit the CPUs bandwidth in performing other tasks for other RTOS threads or interrupt driven tasks.