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.

TMS320F280049: DCAN takes too long to send and receive messages

Part Number: TMS320F280049


Dear team:

My customer calculates the time it takes the DCAN module to send and receive messages by counting the timer counts before and after the function is executed.

The test found that the execution time of CAN_sendMessage() and CAN_readMessage() is too long, and it takes 4.2us for CAN_readMessage to receive 8bytes messages, and the required time has nothing to do with the baud rate.

Is this normal? Or is there something wrong with the way he tests?

Best regards,

Green

  • Green,

              Please take a look at this post. The most reliable way to verify this is as follows:

    For transmit, toggle a GPIO pin just before the write to the IFxCMD register and then verify how long it takes for the CANTX pin to go low. You can see in that post that it takes anywhere from 330 nS to 1 uS. 

    For receive, you can poll the RxOK bit and toggle a GPIO pin as soon as the bit becomes 1. You then need to measure the time from the EOF bit to the GPIO toggle. 

    It is important that the device does nothing else other than the CAN activity.

  • Hi Hareesh:

    The customer tests according to the method you said, but the test results are basically the same as his: the sending time is short and the receiving time is long.
    Especially the CAN_readDataReg function when receiving data, the "for" loop takes 2.8us to receive 8 bytes.

    Is this normal?

  • Exactly what takes 2.8 uS? The execution of the "for" loop alone? Can you toggle a GPIO pin before and after the loop and send me the waveform?