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.

TMS320F28379D: DCAN not communicating

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

I am using two F28379D launchpads to send some data from one launchpad to the other using CAN communication protocol. I have connected the CAN_H pins and CAN_L pins of both the launchpads through jumpers. I am using the example project named "can_ex4_simple_transmit.c" to send some data from one launchpad to the other launchpad where I am running  "can_ex_5_simple_receive.c". In the debug window of the CCS using which I am transmitting data ("can_ex4_simple_transmit.c" ), I can see that the CanaRegs.CAN_ES.BOff is high and CanaRegs.CAN_ERRC.TEC is fixed at 0xF8. Meaning thereby that the bus is in recessive state although when I try to step into while putting break-point then Bus is always at dominant state and  CanaRegs.CAN_ERRC.TEC is also 0. Can someone help me to understand why the example code provided by TI is not working? Or is there something else that I am missing? 

  • Please download the most recent version of C2000ware (https://www.ti.com/tool/C2000WARE) and try the examples. 

    Please download my Application report http://www.ti.com/lit/SPRACE5 and read through the Debug tips carefully. Most CAN issues can be resolved by going through this checklist. 

    Make sure you have connected the grounds of the Launchpads.

    Meaning thereby that the bus is in recessive state although when I try to step into while putting break-point then Bus is always at dominant state

    Clarify what you mean when you say bus is in recessive/dominant state. What did yu measure? where?

  • Thanks for the support. I have downloaded recent version of C2000 ware and tried to use CAN module to transmit some data from one node to the other. I have connected the CAN_H and CAN_L pins of two nodes. I ensured that MSGID of transmitting node and receiving nodes are same as you mentioned in your application notes. As I understood from your application report when on node transmits data then other node should acknowledge that if silent mode is disabled. I have verified that silent mode was disabled in the receiving node but still the CAN bus was at 2V when I probed CAN_H and CAN_L using DSO (logic high/ recessive state). In debug window of CCS, CanaRegs.CAN_ES.BOff=1 and CanaRegs.CAN_ERRC.TEC=0xF8, which means the transmit error count is at -8 (decimal) and can bus is in recessive state (logic high). If I try to do CanaRegs.CAN_CTL.ABO=1, to enable automatic bus on feature then also  CanaRegs.CAN_ES.BOff becomes 1 immediately. Please suggest me if I am doing something wrong here. 

  • Make sure you have connected the grounds of the Launchpads.

    You have not responded to the above.

    I presume you are running C:\ti\c2000\C2000Ware_5_02_00_00\driverlib\f2837xd\examples\cpu1\can\can_ex4_simple_transmit.c in the transmitter and C:\ti\c2000\C2000Ware_5_02_00_00\driverlib\f2837xd\examples\cpu1\can\can_ex5_simple_receive.c in the receiver. I once again request you to go through SPRACE5 very carefully (not just the debug tips, but the entire document). Everything you need to get your first project running is in that document. 

    I have created a video to help with the first communication project using DCAN: https://training.ti.com/getting-started-dcan-module. Please take a look. 

    Consolidated resource list: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1033069/faq-what-kind-of-resources-does-ti-provide-to-help-with-can-and-canfd

     Beyond this, I am afraid I don’t have much to offer by way of help.

  • Thanks a lot for your support. As you have asked in your last post, by recessive state I mean BUS is in logic high state and by dominant state I mean BUS is in logic low state. I have connected the grounds of both the launchpads and GPIO mapping is also done properly as you have pointed out in your video. Still the issue is not resolved. I will try to debug further on my own. Thanks once again for the debugging tips and the video. They were very much helpful.

  • GPIO mapping is also done properly as you have pointed out in your video.

    For GPIO re-mapping, please stick to the instructions in SPRACE5. The video was made for F280025, a different device (although the concepts are still the same).

    In debug window of CCS, CanaRegs.CAN_ES.BOff=1

    Bus-off is a serious error. In a simple two-node network, that too with identical H/W and running TI-provided examples you should not see BO.

    Bus is always at dominant state a

    Bus should never be "always" at dominant state.