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.

TMS320F280039: MCAN no TX output

Part Number: TMS320F280039

Hi Champs,

I ask this for our customer.

 Now customer find strange phenomena when using MCAN. After I checking with customer, I still can't locate the cause of the issue. Could you help analyze it? Here is a description of the problem:

The issue only occurs in stand-alone mode. When connecting to the emulator and debugging with CCS, everything is normal. MCAN communication failure issue will occur during the process of booting to the app. If you only run boot or app, will not have this issue.

When communication failed, the waveform is as follows. Customer can confirm that the content of Rx is correct, but there is no response message from Tx. (Pink: differential signal of CAN bus; green: C2000 RX signal; yellow: C2000 TX signal)

Since customer only find this issue in stand-alone mode, it is difficult to observe the registers. I asked the customer to read the following registers through some methods, but no issue was found:

MCAN_ECR[REC] is 0, MCAN_ECR[TEC] is 0, MCAN_PSR[LEC] is 0, MCAN_CCCR[INIT] is 0.

In addition, when this issue occurs, the MCAN interrupt cannot be entered. When this issue is detected, if we clear MCAN interrupt bit, MCAN communication can resume. Although this can temporarily solve the communication issue, it is not what customer want. They want to find the cause of the MCAN communication failure then fix it. But by checking some of MCAN register, I didn't find anything wrong. This is really hard to explain, can you help analyze it? Do I need to check some other registers to locate the cause of MCAN communication failure?

Best Regards,

Julia

  • Hi Julia,

    Can you please ask customer to share a part of the *.map file?  I'm interested to see what is in "codestart" entry.  The *.map file will be in the same subdirectory where the *.out file is located.  Just wanted to quickly check where he code branches first during boot.

    Thanks,

    Joseph

  • Hi Joseph,

    Please check the codestart part:

    I'm curious why this part affects MCAN communication, and I can't see any problem after checking the registers.

    Best Regards,

    Julia

  • Hi Julia,

    I just want to make sure that boot up calls the branch code from flash and this shows that it does.  There have been instances where the branch code somehow does not get compiled, and causes start up issues.  

    Next, let's check if the MCAN registers are properly initialized.  To do this, you would need to run the application without the debugger connected.  User also has to modify the ccxml target file in CCS and remove the gel file in order not to reset the part and initialize memories when the debugger is connected.

    The gel file can be removed in CCS using Tools->GEL files on the top toolbar.  A GEL window will appear at the bottom of the pane to show the gel file.  in the GEL file window, right click on the GEL file and choose remove.  Once this process is completed, connect the emulator/target then inspect the MCAN registers and other relevant register and even the program counter (PC) to indicate where the program might be stuck.

    Hopefully this will provide a clue on what the issue may be.

    Regards,

    Joseph

  • Hi Joseph,

    Thanks for the suggestion! I'll let the customer check this out. Before doing this, I would like to confirm with you that which of the following is the correct method?

    1. let the code run in standalone mode first. When MCAN communication issue occur, do the steps you mentioned and connect to CCS to see the registers and where the code stops?

    2. Do the steps you mentioned first and then run the code under these conditions?

    Thanks!

    Best Regards,

    Julia

  • Hi Julia,

    Please let customer follow step#1.

    Thanks,

    Joseph