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.

Output CAN message on scope lm4f232h5qd

I'm trying to scope the CAN0TX signal on an oscilloscope to view a CAN message. I get an output, but it doesn't reflect our expected output.

I'm using the EKS-LM4F232 Evaluation Kit and using the simple_tx.c example given in Stellarisware.

 

Is it possible to actually view the signal without connecting to a transceiver? I want to see the start of frame, identifier, rtr fields..etc.

 

I have the CAN0RX connected to 3.3v to get the output I have. This was suggested by another member on this forum.

 

The only thing I can do to modify the output is change the bitrate. Changing the data does nothing.

Here's the pattern I'm getting.

  • Hello Andrew,

    Glad to see you've made some progress from ...unable to see output... You should close out that post with a verify so that it can help others that may encounter the same problem.

    Now I see the image.

    Are you familiar with the CAN protocol?  I'm no expert on it, but I would think that it would first check to see if the line is busy by listening, then set the line low to indicate it was going to transmit, or something along those lines.  It has been over 8 years since I played around with the CAN.  You can look up how the protocol works on the net, or even in the manual.  I'm sure there is information there.

    Or you could try a simple loopback with Rx connected to Tx.  Don't blame me though if it blows up.  All the standard disclaimers apply.

    Thanks,

  • Andrew Choe said:
    I get an output, but it doesn't reflect our expected output

    Have you verified that you expectation is correct?

  • Our expected output was a CAN message frame with a specific sequence in the data frame. We expected to have 4 bytes of 0xAA along with the rest of the message frame surrounding that. Attached is our expected waveform.

    Stepping through the program and checking the registers, many of the fields can be verified such as the identifier, control field, data frame,etc. However, it's difficult to derive any meaning from the output we are getting.

  • If you are using Keil, it has an excellent CAN simulator.  You can set up your messaging and view the output waveform.  This will show you exactly you will be getting when you finally hook two controllers together.  I don't know about the IAR simulator.

    Thanks,