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.

TMS320F280039C: MCAN - Mixed Dedicated Tx Buffers/Tx Queue

Part Number: TMS320F280039C

Dear Champs,

I am asking this for our customer.

In TRM,

29.5.14.6 Mixed Dedicated Tx Buffers/Tx Queue

The user is confused at Tx Queue.

What is the difference between Tx Buffers and Tx Queue?

In below figure, it seems both are transmitted by priority with the lowest ID.

If so, why do we need to use Tx Queue?

  • Hello Wayne,

    The MCAN IP has up to 32 transmit buffers.  Through the MCAN_TXBAR (Buffer Add Request) register, user can transmit all or part of the transmit buffer.  The Tx Buffer/Queue/FIFO is a means of managing the transmission of the messages and these all point to the transmit buffer elements.  The configuration of the Dedicated TX Buffer size is configured through the MCAN_TXBC.NDTB field.  Tx Queue/FIFO mode/size is done through the MCAN_TXBC.TFQS field.  A '0' value on TFQS field means that no Tx FIFO/Queue is used.  The field MCAN_TXBC.TFQM will indicate whether the buffer allocation configured in MCAN_TXBC.TFQS will either be FIFO (0) or Queue (1).

    The lower numbered transmit buffers would be assigned to the dedicated Tx Buffer part while the higher numbered ones are for Tx FIFO/Queue as shown in the figure.  The total of MCAN_TXBC.NDTB and MCAN_TXBC.TFQS should not exceed 32 as there are only 32 transmit buffers.

    Dedicated Tx Buffer can be assigned to messages that are fixed, for instance various configuration settings can be assigned to the dedicated Tx buffer section and each message ID holding a certain configuration setting.  Tx FIFO/Queue can be allotted for messages that are changing, for instance sensor readings but with FIFO/Queue, user has to first read Put Index so that the message can be correctly placed in the buffer soon as the sensor readings become available. 

    In the dedicated Tx Buffer/Tx Queue combination, the transmission sequence goes by message ID, where lower message IDa takes the transmission priority, similar to CAN arbitration.  For the dedicated Tx Buffer/Tx Queue combination transmission priority in the FIFO section follows the order where message is written in the buffer and not the message ID.

    Best regards,

    Joseph