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.

TMS320F28P650DK: MCan-A and memory allocation

Part Number: TMS320F28P650DK

Tool/software:

Dear TI Support Team,

I have a question on "message RAM" for the MCan peripheral and I'm going to refer to docs SPRUIZ1B and SPRSP69C.

According to chapter 35 of SPRUIZ1B, the overall size of the message ram is 4352 word with a word of 32bit size.

Looking the snapshot below, you find my memory size calculation, and the overall size matches the one you can calculate from the figure 35-19 of SPRUIZ1B.

According the memory map of the section MCAN-A MSGRAM, refer to SPRSP69C table 7-1, the available memory is 4K x 16 or 2K word or 2048 word.

Based the comparison among "overall word 4352" and the "available memory 2048 word", my conclusion is: the memory allocation proposed by figure 35-19 of SPRUIZ1B is not feasible.

Reading paragraph 35.5.13.1, the sentence "one of the following actions is performed"

is the key to use all 64 message of MCan module.

For instance using:

  • extended identifier 
  • the accepted message stored on FIFO 0

the overall word is 1920 as you can see on the following snapshot.

Is my reasoning correct ?

I have another question: given the memory called "MCAN-B MSGRAM" that starts at address 0x5 B000, can the memory under discussion be addressed by MCAN-A ?

Thank for the support,

Ettore

  • Hello Ettore,

    1) The following figure was extracted from the Bosch  MCAN User Manual (Revision 3.3.1).

    Call attention to the second note:

    When operated in CAN FD mode the required Message RAM size strongly depends on the element size configured for Rx FIFO0, Rx FIFO1, Rx Buffers, and Tx Buffers via RXESC.F0DS, RXESC.F1DS, RXESC.RBDS, and TXESC.TBDS.

    The total number of  "words" is dependent on the number of elements defined for the given section type (Filter11/29, RX FIFO[0:1]/Buffer, TX Event FIFO/Buffer) in its designated configuration registers/bitfields. Each section supports a maximum number of elements and therefor a maximum number of words, if all the sections are used with maximum element count and max word size, then you can achieve the max 4352 words configured in the Message RAM.

    2) No, each MSGRAM may only be accessed by it's associated MCAN peripheral:  MCAN-A : MCAN-A MSGRAM and MCAN-B: MCAN-B MSGRAM. However, the CPU has access to both the MCAN-[A:B] MSGRAM space directly or by means of the Message Interface Registers. See the following excerpt from the device TRM:

    During normal operation, accesses to the Message RAM are performed using the Interface Register sets, and the CPU cannot directly access the Message RAM.

    The Interface Register sets IF1 and IF2 provide indirect read/write access from the CPU to the Message RAM. The IF1 and IF2 register sets can buffer control and user data to be transferred to and from the message objects.

    The third Interface Register set IF3 can be configured to automatically receive control and user data from the Message RAM when a message object has been updated after reception of a CAN message. The CPU does not need to initiate the transfer from Message RAM to IF3 Register set.

    The message handler avoids potential conflicts between concurrent accesses to Message RAM and CAN frame reception/transmission.

    The message RAM can only be accessed in debug mode. The message RAM base address is 0x1000 above the base address of the CAN peripheral.

    Hopefully this helps to address any confusions, and glad to help answer any follow up questions that may arise.

    Best Regards,

    Zackary Fleenor