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.

[FAQ] TDA4VM: Not able to receive messages for a particular CAN ID, how to debug?

Part Number: TDA4VM
Other Parts Discussed in Thread: TDA4

I am using MCAL CAN driver and able to transmit any message from the TDA4 using MCU MCAN0.

However when I try to receive messages for a particular CAN ID from an external CAN emulator, I am not getting that on the TDA4's MCU MCAN0.

How can I debug the issue?

  • If the CAN transmission is happening correctly then this rules out the problem with CAN Transceiver configuration and CAN bitrate.

    Please try the below suggestions:

    -1-

    Check the filter setup

    The CAN bus is a broadcast type of bus. This means that all nodes can 'hear' all transmissions.

    For receiving a CAN message the CAN controller (MCAN) does an acceptance filtering on the heard message. If there is no filter setup for the particular CAN ID you are trying to receive, then the message will be discarded.

    This can be verified in the pre compiled configuration passed. For can_profile_app this is present at the below location:

    mcusw/mcuss_demos/mcal_config/Can_Demo_Cfg/output/generated/soc/j721e/mcu1_0/src/Can_Cfg.c

    -2-

    Check if interrupt is getting hit and check interrupt status

    If the filter configuration is correct then check if the ISR is getting hit upon reception of a message. You can do this by adding a breakpoint on the ISR function and then sending only one message from the external CAN emulator.

    The top level ISR for the CAN driver is Can_mcanProcessISR(). This will get hit for a Tx and Rx event and based the the interrupt status branch off to Tx or Rx specific routing.

    If this is getting hit when sending a message from the external CAN emulator then check the interrupt status, this can be inferred from the MCAN_IR register.

    If the ISR is triggered by a message lost then the issue is that you are not draining the message out of the MCAN message RAM and hence there is no space for a new message. In such a case you can increase the number of buffers / size of FIFO being used.

    -3-

    Check MCAN protocol status register

    You can also check additional MCAN registers if the above two do not solve the issue.

    MCAN_PSR's LEC and DLEC fields can be used to check for protocol errors during data or arbitration phase. Also refer the FAQ for some additional details: https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/07_03_00_07/exports/docs/pdk_jacinto_07_03_00_29/docs/userguide/jacinto/faq/faq_can.html 

    Regards

    Karan