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 communication 28377 issue

Other Parts Discussed in Thread: SN65HVD230, CONTROLSUITE

I am ultimately trying to set up can communication between a 28277D and a LabView Compact Rio module. However, I am first trying to establish communication between two 28377 modules. I have been able to successfully communicate between two 28377D control card docking stations using two SN65HVD230 transiever modules. I have also been able to establish CAN communication between two LaunchPad XL 28377S boards which have the SN65HVD234DR CAN modules included. However, I am not able to communicate between a LaunchPad XL SN65HVD234DR and the 28377D docking station with the SN65HVD230. Can someone help me understand why this might be? Is there some issue communicating between a SN65HVD234DR and an SN65HVD230? Thanks for your help. 

I have attached a picture of what the CAN bus looks like when they are both running but not receiving data.

And below is a correct communication betwen two 28377Ds using two SN65HVD230 transievers.

  • Adam,

     Is the bus terminated correctly on either ends?

    Which signal is depicted in the scope waveforms you have shown? This doesn't look like the differential bus. Have you scoped the CANTX pin of the transmitting node? How does it look like?

  • Hareesh,

    As far as I can tell it is terminated correctly. I use a can transceiver that has the built in resistance which I purchased from Amazon here:

    www.amazon.com/.../B00DU4WSVW

    The LaunchPad also has a built in resistor with its CAN module. And considering the fact that I have been able to communicate between LaunchPad to LaunchPad or Control Card to Control Card I do not think the termination is an issue. I have just not been able to communicate between LaunchPad and Control Card.

    My can bus wiring has been double checked and is also correct.

    The images I posted previously were of the CAN bus. Today I tried to recreate the image but am unable. What is happening today is when I start one (28377D) transmitting it sends the data waiting for an acknowledge. Then when I start the other (LaunchPad) the 28377D transmit signal begins to fade out lasting for a couple of seconds then goes to high and stays at high. Then if I stop the Launcpad the 28377D transmit still remains high. If I start the Launchpad first it begins to transmit but then when I start the 28377D the LaunchPad stops transmitting. So same result just depends on which one gets started first. The watch window indicates that they are still transmitting even though the transmit pin is stuck high. This also was happening yesterday but I did not include it because there are no interesting images to show. The transmit is high, the receive is picking up what is being sent by the board that was started last and the CAN bus shows the same. I thought the strange CAN bus signal I saw yesterday might tell you something about what is going on. But as I said I cannot reproduce this strange waveform today.

    Please help me understand what you think might be the problem.

    -Adam
  • OK. So what you are saying is this: Regardless of which node starts the transmission first (Launchpad or Controlcard), the transmission is "successful"

    (i)  with the exception that the transmitted frame is not ACKnowledged

    (ii) and the other node is not brought into the circuit.

    I wonder if there is some mix-up in the wiring of the bus. Have you checked CAN_H is connected to CAN_H (and likewise with CAN_L)? When a frame looks OK up until the ACK phase, it likely points to some physical layer issue.

  • Yes, (i) and (ii) are correct. In addition to these:
    (iii) Both transmit but not succesful. The can bus in this case looks like the oscillogram in my original post. I have not been able to reproduce iii today but only ii.

    The wiring is correct, I have checked this many times.

    -Adam
  • Adam,

    If there is at least one other node on the bus configured for the correct bit rate (to provide the ACK) and if there are no physical layer issues, then the communication absolutely has to work. Few more things to check:

    1. Are both nodes configured for the same bit rate? Please have the nodes transmit (not at the same time, of course) and capture the signal at the CANTX pin to verify. Do not rely on the register values.
    2. Provide the scope capture of CAN_H & CAN_L lines for the working & non-working case. Your original capture shows  only one signal.
    3. Please check the parameters per the attachment.CAN-Troubleshooting-Quick-Reference-v1.1.pdf

  • Hareesh,

    It appears the bit rate is the problem. For some reason the same code when run on the LaunchPad runs at 250 kb/s while on the 28377D it runs at 500kb/s. Do you know why this is? They should both be at 500kb/s.

    Thanks for the troubleshooting reference as well. This is helpful.

    Adam

  • Adam,

    The external oscillator for the launchpad runs at 10MHz while the one on the controlCARD runs at 20MHz. The source code in controlSUITE is setup for controlCARDs. So for the launchpad, you will have to change the multiplier in the SysCtrl.c file within InitSysCtrl() for the InitSysPll() call from IMULT_20 to IMULT_40 in order to run it at 200Mhz.

    Best Regards
    Chris
  • Chris you nailed it! That was the issue. I made the change to InitSysCtrl(). All is good now.

    Thank you both for your suggestions.

    -Adam