Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: javier.reyes.g on April 09, 2018, 03:22:39 PM

Title: Zynqberry 726 + Petalinux + Kernel + CAN support
Post by: javier.reyes.g on April 09, 2018, 03:22:39 PM
Dear all

I am trying to build an image for the Zynqberry 726 with Petalinux. I am using the scripts in the test_board project provided (for Vivado & Petalinux 2017.4), and adding the CAN peripheral in the IP Core (before running the hardware export), as well as the necessary configurations for mapping the CAN signals to EMIO to header pins.

Following the Petalinux Kickstart (https://wiki.trenz-electronic.de/display/PD/PetaLinux+KICKstart), and the Getting started Wiki (https://eewiki.net/display/Motley/Getting+Started+with+the+ZynqBerry), I can observe that in the kernel config, it is necessary to include the drivers for the USB to Ethernet module.

My question is: Should I also config something in the kernel (or later in the device tree), to be able to use the CAN module?

Thanks in advance.

Best regards

Javier
Title: Re: Zynqberry 726 + Petalinux + Kernel + CAN support
Post by: JH on April 10, 2018, 10:28:55 AM
Hi,

i think CAN driver will be set automatically during hdf import. But you can also check:
for CAN, see also:
br
John
Title: Re: Zynqberry 726 + Petalinux + Kernel + CAN support
Post by: javier.reyes.g on May 09, 2018, 10:42:57 PM
Thanks for the link.

I was trying to build the linux image, and the command petalinux-build failed for the Device Tree, after I added the section that is shown here (http://www.wiki.xilinx.com/Linux+CAN+driver (http://www.wiki.xilinx.com/Linux+CAN+driver)) into the system-user.dtsi file.


zynq_can_0: can@e0008000 {
    compatible = "xlnx,zynq-can-1.0";
    clocks = <&clkc 19>, <&clkc 36>;
    clock-names = "can_clk", "pclk";
    reg = <0xe0008000 0x1000>;
    interrupts = <0 28 4>;
    interrupt-parent = <&intc>;
    tx-fifo-depth = <0x40>;
    rx-fifo-depth = <0x40>;
};


I cannot find any other helpful information on how to enable the can controller in the linux image build process. What could I do?
Title: Re: Zynqberry 726 + Petalinux + Kernel + CAN support
Post by: JH on May 14, 2018, 08:05:59 AM
Hi,

did you enable the same CAN controller on the PS in your design?
Did you use the new generated HDF for your petalinux project?
Which Vivado and Petalinux version did you use?
Petalinux generate a log file, did you check this? See console output to find the log file.

br
John