Jump to content
  • 0

ZedBoard and PmodCAN


YellowYoung

Question

Hello members,

I have the ZedBoard and I'm going to make the CAN communication work on it.

I had bought a Pmod CAN transceiver as the link attached below, and installed the provided Vivado IP library. As the screen shot shows, I had build a new project and assigned JB to the Pmod CAN IP. Note that I do not activate the CAN0/1 in the processing system and assign MIO to the Tx and Rx.

http://store.digilentinc.com/pmod-can-can-2-0b-controller-with-integrated-transceiver/

image.thumb.png.9f986118667dee11c503481f5b1fbf5b.png

image.thumb.png.24d506fcd6c03c90eaef0f888cf84b66.png

Following the provided example code. I launched the SDK and using the Tx.c as the main source file. Then build the database in Vector CANalyzer. However, after I connected the CAN tool to the transceiver, it seems like I cannot receive the CAN message that send form the controller. I'm wondering whether there's anything missing during these process. How are we going to recieve the message send out from the controller? I believe the CAN tool is needed.

Really looking forward that you could enlighten me on that. 

Thank you!

image.thumb.png.892c116a1fc56fb00c7cc131b62e26dd.png

image.thumb.png.e400f44e0f950cb2dca79f6ef061cb7f.png

 

Which CAN Controller shall I use and how do I make it work?

I have implemented a basic design for Zybo in Vivado and added the IP core for PmodCAN. Is something more I need?

image.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi @YellowYoung,

Welcome to the Digilent forums!

The PmodCAN facilitates CAN communication to another device through the PL.The PmodCAN uses SPI communication to communicate between the host board and itself.  It would not be able to connect to the CAN on the PS. 

To use the CAN bus on the PS you would need to use the MIO Pmod JE1 as discussed in the user guide for the Zedboard here in section 2.9.2 Digilent Pmod Compatible Headers (2x6). The user guide states the bank that the MIO pins are connected to a 3.3V bank so you would need to make a level shifting circuit for CAN communication to work since CAN uses voltage level as part of its communication. 

If all you need to do is communicate data from the Zedboard using CAN communication. Then you can send data from the PS to the PL and then send that data through the PmodCAN. Here is an Avnet forum thread that discusses sending data from the PS to the PL. Here is a Xilinx forum thread that initially discusses how they accomplished sending data from the PS to the PL.

best regards,

Jon

Link to comment
Share on other sites

Hi @jpeyron

Thank you for your response!

I probably need to correct my description. I'm now using PmodCAN to connect the ZedBoard and CAN tools. No need to activate the CAN module on the PS side. The problem I'm facing now is, when I run the example code, (Tx.c or LoopBack.c), I could observe the printed message on the Terminal in SDK, it stops at "waiting to send", but nothing  appears on the CAN tool side. Does that mean the code is stuck on somewhere.  Just want to make sure there's nothing wrong on the Vivado and SDK side. 

For your information:

I terminated the CANH and CANL pins with 120ohm resistor.

Pulses could be detected on the CANH and CANL terminals. Seems there are some messages flowing on the CAN bus.

There's no voltage shift circuit between the CAN tool and zedboard.

The CAN tool side sets the baud rate at 500kbaud.

There's an error report on "CAN overload frame". 

 

Thank you again, Jon!

image.png.dc0ed29a6845350f5e06abf34b464fe5.png

image.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...