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.
Hi,
TMS320F28388D As per TMS320F2838x TRM section 45.5.14 Figure 45-13
msgRAMConfigParams.txFIFOSize = 7U; // Tx FIFO/Queue.
Now if put index =7, and get index =2, then call
MCAN_writeMsgRam(MCAN0_BASE, MCAN_MEM_TYPE_FIFO,0U, &txMsg);
// // Enable Transmission interrupt. // MCAN_txBufTransIntrEnable(MCAN0_BASE, fifoStatus.putIdx,1U); // // Add request for transmission. // MCAN_txBufAddReq(MCAN0_BASE, fifoStatus.putIdx);
after that ,I want to kown if the put index = 0 ? In other words, Is the FIFo circle FIFO?
Hi,
Yes, it is a circular FIFO and once the get index reaches the end of the FIFO, any new writes will be written into index = 0.
Please note that the index starts from 0 and not 1
Regards,
Praveen
Hi,
I am not clear about :
1)when using TX FIFO,host had trasmitted a message, Is the TX get index plus 1? If yes,why don't I see SW do this?
2)When using RX FIFO,host had received a message,Is the RX put index plus 1? If yes,why don't I see SW do this?
Hi,
Can you please clarify on what do you mean by 'Why dont I see SW do this?' Are you trying to understand why the SW is not incrementing the index? The different indexes are controlled by the HW and are read-only for SW.
Regards,
Praveen
Hi,
Yes.I mean why SW not chang the get index or the put index when TX buffer trasmit a message or Rx buffer receive a message.
The different indexes are controlled by the HW.How can I read the get index or the put index when TX buffer trasmit a message or Rx buffer receive a message ?
Jammy,
The get index and put index for TX/RX are available in their respective status registers(MCAN_TXFQS, MCAN_RXFxS). Any point of time, these values can be read by the SW to know the current index.
Regards,
Praveen