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.

CAN transmission

Other Parts Discussed in Thread: ISO1050

Hello,

I have started facing a strange problem with CAN transmission. I am using Piccolo F28069 control card. The code which I am using is already being developed by my company. So I play with the program to increase my understanding about our application. But after a few debugging sessions, I am getting a problem with CAN communication. Let me clear that I am able to build the program and debug the program successfully. I even compared all the settings, small and big, with my colleagues system. I even tried reinstalling the CCS. Initially, I was using the latest version of CCS and also the latest compiler version. If that could create some problem, I reinstalled the CCS of older version which currently my colleague uses. 

We have a HMI panel in system, into which CAN is being interfaced, so that we can monitor all the values and eventually evaluate them. After transferring the program, I can view all the real time values into CCS Debug mode, but there is no communication between microcontroller and HMI panel. So all CAN variables will be inactive. 

Also, for all the three LEDs on the control card, LED1 is green, which is for the source. LED2 remains red constantly, which is for GPIO 31. This GPIO 31 is used for CAN TX in our system. So one thing I can figure out is that there is definitely some probelm with CAN tranmission. The third LED3, is for ADC ISR which is programmed to toggle at every 11.11s and it does blink as we expect. 

Please give your suggestions so that I can move further with my research. 

Thanks in advance.

  • If I understand, the same program works for your colleague? Can you eliminate a hardware problem by trying your compile of the project on their hardware? It definitely sounds like something changed. Do you have a CANalyzerthat could help you debug the CAN traffic?
  • Did communication between the Controlcard and the HMI panel ever work? I am not sure what you mean by “debug the program successfully”. Are you implying CAN communication worked successfully at least one time? If so, I wouldn’t suspect a hardware issue.

     

    Is the bus terminated correctly on either ends?

     

    Who is initiating the transmission? F28069 or the HMI panel? I wouldn’t read too much into LED2 being lit constantly. The idle-state of the bus is recessive (CANTX pin would be high). Even when there is activity , the human eye may not be able to discern the pulsing. Please check the CANTX pin with an oscilloscope. Or connect a CAN-bus analyzer and see if it shows any activity. Provide a block-diagram of your system that shows the connections. If you could provide the schematics for at least the CAN portion , that would be even better.

  • Please check for the items in this list. Almost always, taking care of this list solves the issue

    1.  Is clock to the CAN module enabled? (check for this if writes to any registers are not going through)
    2.  Are 32-bit R/W operations used while accessing the eCAN registers? (See TRM for example)
    3.  How easy is it to reproduce the problem? IOW, can the problem be reproduced "at-will"?
    4.  Exactly what happens when this problem is seen? Does the node stop transmitting? Receiving? Both?
    5.  If the above is true, what needs to be done to recover the node? Soft reset? Hard reset through –XRS pin? Power-cycle?
    6.  Before the occurrence of the error condition, were any error-frames seen on the bus?
    7.  Have you tried a lower bit-rate? Say, 50 kbps, for example?
    8.  Are all CAN nodes configured for the same bit-rate?
    9.  How many nodes are there in the bus? (In non-self-test mode, there must be at least two nodes on the network, due to the ACKnowledge requirement mandated by the CAN protocol)
    10.  To see the waveform until the ACK phase, a transceiver must be connected to the node. Without a transceiver, the node immediately goes into an error state.
    11.  What is the end-to-end bus length?
    12.  Has the bus been terminated correctly (with 120-ohms) at either ends (only)? (The must be terminated only at either ends and with a  120-ohm resistor. IOW, no more than two terminator resistors may be present on the bus, unless split termination is followed, in which case there will be two resistors on either ends).
    13. Have you tried to reduce the bus length and number of nodes?

  • Dear Hareesh,

    Sorry for my late reply. I am very thank ful to you that you had suggested me many useful things regarding CAN transmission few months ago. Actually I am new to this field and I lacked a thorough understanding of all the parameters related to CAN. Rather your suggestions had created more questions in return for me. And it took a while for me to get familiarize with all the terminologies and the concepts.

    Now the problem I had faced was long solved. You might not remeber it since I am replying you after ages. The projects or the files I was using were all saved in my documents somewhere. Later I got a suggestion from my colleague that I must copy the project into 'Development Kits' first and then try to import it into CCS. Some of the 'Include files' were creating the problem. They were not included in the project correctly and the whole project wasn't getting executed properly. So to conclude, there wasn't any problem with CAN communication.
  • Now to answer you the questions you had suggested to me.

    1. The clock module is correctly enabled. I understood how can I enable or disable clock signal to a peripheral in µC.
    2. Our project follows completely the instructions suggested in the Technical Manual of TI as to how a 32 bit register must be read or written.
    3. The problem I had faced was not at will. It couldn't be reproduced.
    4. Since the files were not included or in other words the project was not correctly executed, the CAN NODE was not being detected by the systems. There was a warning given by CCS when the project was running that the file or the path is not correct. Since I didn't pay an attention to that warning, I couldn't reach to the solution quickly.
    5. Even Restart or any other thing couldn't solve th issue.
    6. Later when I put my head into the CAN comm. I understood about the Overload and Error frames. I even checked it on the Osciloscope.
    7. The current bit rate we are using for our system is 500kbps.
    8. and 9. Since we have only 3 CAN nodes for our standard system, its easy to maintain all the nodes at the same bit rate.
    10. We have been using TI CAN transciever 'ISO1050 Isolated CAN Transceiver'.
    11. The end to end bus length is 3.3 m
    12. The bus end are correctly terminated with 120 Ohms resistor having 0.1% tolerance.
    13. Not needed.

    I would like to thank you again and would ask to pardon me for my bad communication.

    Thank you.
  • Thank you for following up! Glad to hear you've made progress.

    Regards,
    Elizabeth