Jump to content
  • 0

Zybo and PmodCAN


mbo

Question

Hello members,

I have the Zybo-Z7 Board and I want to connect it with other Zybo-Z7 Board via CAN.

The board has an integrated CAN Controller and I need following PmodCAN-Connector which has also can controller integrated.

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

 

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?

 

Cheers,

mb

 

zybo_can.JPG

Link to comment
Share on other sites

Recommended Posts

Hi @jpeyron,

yes exactly.

I am using a d-sub 9-pin zero modem cable to connect them. The weird thing is that the loopback demo is working which means that pmod hardware is working fine.

I suggest the pin assignment is not correct wether in the cable or in vivado.

But I have no idea how to check the pin assignment in the cable.

I did not found a d-sub cable with 9 pin socket in digilent store.

 

The error in rx program is that it fails to check the CAN status.

When I connect two pmod CANs together via cable do I have to set the jumper on pmod at specific position?

 

Thanks,

Mirco

 

 

Link to comment
Share on other sites

@BogdanVanca and @artvvb,

after a long time I got my Zybo Z7-Boards and Pmod CAN.

The loopback-demo is working fine and my next step was to implement the Rx.c and Tx.c from Pmod_CAN source.

But there is one problem...
In Rx.c the status is always "Error, message not received" but I dont know what the cause of the problem is.

Thanks,
Mirco

Link to comment
Share on other sites

@BogdanVanca and @artvvb,

thank you so much for your replies.

I will try it as soon as possible. Due to organizational problems it will take some weeks but I will let you know about the progress of testing and if it works.

Thank you so much!

Cheers,

Mirco (mbo)

 

ADDED:
Yes, I have completed the Getting Started Guide with Pmod IP Cores.

Link to comment
Share on other sites

@mbo

Have you completed the Getting Started with Pmod IP Cores tutorial through to using Vivado SDK and programming your board? Your hardware looks fine. Using Pmod Header JF would be significantly more difficult than using any other header, since the MIO/EMIO pins don't use the same drivers as the AXI SPI controller that the Pmod CAN IP core wraps. The MIO pins are configured by customizing the Zynq7 Processing System block in Vivado IPI (they appear in the block design as part of the FIXED_IO interface).

You can use the LoopBack.c example to make sure that your Zybo can talk to the Pmod CAN. LoopBack places the CAN controller into a mode where the controller receives it's own messages in hardware, so it is a good way of making sure that your hardware works. After that, you can program your hardware onto both Zybos, connecting each to a CAN, and connecting each of the CANs to one another. You can program one Zybo with the RX.c example and the other with the TX.c example. This set up should be able to send a packet defined in the example code from one Zybo to the other. You can demonstrate that this communication has happened by connecting both boards to serial terminals.

Thanks,

Arthur

Link to comment
Share on other sites

Hello @BogdanVanca,

thank you for your reply.

If I want to connect PmodCAN to standard Pmod Connector JE, which I/O ports do I have to connect CAN0 to get it work with Pmod Connector JE? I have looked up the table 16.1 in the Zybo-Z7 Reference Manual. Do I have to set it to EMIO or to specific ports?

Further in the board overview with the connected ports in vivado there is no Pmod Connector JF but there should be one which is for MIO.
I installed the right board files from Digilent github repository.

Cheers,
Mb

Link to comment
Share on other sites

Hello @mbo,

On a first look your Block Design looks good. Please make sure that you validate it and you don't have any errors. As a starting point for your design, if you fallow into the "vivado library master" folder this path : vivado-library-master -> ip -> Pmods ->PmodCAN_v1_0 -> drivers, you can find example projects. Also in the main folder there is a ReadMe file, that gives you instruction on how to use the Pmod IP core for Zynq projects.I have reached out to more experienced engineers to see if they have more input for this issues.

Best Regards,

Vanca Bogdan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...