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.

TMS320F28377D: How does the user confirm a message has been sent on CAN?

Part Number: TMS320F28377D

Tool/software:

Dear Champs,

I am asking this for our customer.

Is there any register or driverlib API that is like SCI TXRDY so that the user can know the previous data has been sent and DCAN is ready for another new message data write?

On newer MCAN on F28003x, we have a similar usage below. How does the user do this on F2837x DCAN module?

//
// Wait till all the messages are transmitted.
//
while(MCAN_getTxBufReqPend(MCANA_DRIVER_BASE))
{
}

Does it make sense to check if CAN_TXRQ_X becomes 0?

  • Hi Wayne,

    Before transmitting a new message, you need to check if there is a pending message in the same mailbox and check if the IFx is busy or not. If there is no pending message and the IFx is not busy, you can transfer message to message RAM for transmitting.

    There is no similar API in C2xware for DCAN.

    I noticed that the CAN_sendMessage() API in can.c doesn't check the pending status. Please do it in your application code.

  • Hi QJ

    Would you please explicitly show us how to check the pending status?

    Does it make sense to check if CAN_TXRQ_X becomes 0?

  • You can check CAN_TXRQ_21

  • If the mailbox you are using is 10, you can check if there is a pending msg for mailbox 10:

    if ((node->TXRQ21 & 0x0A) != 0U) {

       ....

    }