News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

XC7Z010 PS CAN baud rate config

Started by javier.reyes.g, March 08, 2018, 04:08:09 PM

Previous topic - Next topic

javier.reyes.g

Dear all,

I am using the XC7Z010 chip from the Zynqberry 726. I need to create a standalone Application for CAN communication. I have followed the information in UG585 and created the hardware in Vivado (To configure the Zynq7 IP Module, I am using the tcl file that is available from Trenz Wiki in the HelloWorld example). I attached the current clock config for my PS system.

I have not been able to config correctly the CAN baud rate, as I am not sure exactly which is the clock that is being used as the reference clock. Is it 100MHz? Is it 23.8095? I have seen some Xilinx forums where they say this config, and round it to 24MHz, and use a website (http://www.bittiming.can-wiki.info/) to calculate the right prescaler and other values. Is this correct?

I appreciate any help or comment about this issue. It is a really simple task, and I am delayed in schedule because of this.

Best regards

JH

Hi,
this is internal reference CLK only, default should work
Xilinx provide bare-metal app and linux driver (use petalinux for example) for this IP.
Baremetal see SDK example or: http://www.wiki.xilinx.com/Baremetal+Drivers+and+Libraries
Linux see petalinux configs.

For more details to this interface on zynq, see:
br
John

javier.reyes.g

Thanks for the material

In case someone else gets this thread, the CAN CLK on the Zynq7 IP Core config was by default at 100 MHz, and with that clock there was no easy way to get a CAN timing with 16 tq (according to the calculator http://www.bittiming.can-wiki.info/ ). I found out that the fastest speed that is able to get exactly 16 tq is 80 MHz. After changing this value, the CAN communication worked perfectly.