• 0

PmodCAN: ZedBoard, PetaLinux and Device Tree Overlay



I am trying to use the PmodCAN module together with PetaLinux on the ZedBoard, to display a CAN interface within the OS.

So far I can make it show up in the interface overview with the following device tree overlay:

/* <petalinux-project-root>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi */

/include/ "system-conf.dtsi"
/ {
    osc: can_osc {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency  = <20000000>;
&gpio0 {
        #interrupt-cells = <2>;

&spi1 {
  is-decoded-cs = <0>;
  num-cs = <1>;
  status = "okay";
  [email protected] {
    compatible = "microchip,mcp25625";
    spi-max-frequency = <10000000>;
    clocks = <&osc>;
    interrupt-parent = <&gpio0>;
    interrupts = <0 0x2>;
    reg = <0>;


I can even send and receive messages using `candump` and `cansend`, but the interface behaves strange together with some CAN libraries. E.g. Messages are sometimes not sent, when the library tries to send multiple messages without any delay between them. On the other hand, when I connect the PmodCAN to a RaspberryPi and use same said libraries, everything works fine. So the only difference I can see between the working Raspberry Pi and the "strange" behaving Zynq setup, is the manually defined device tree overlay you see above.

Long story short: Is my device tree overlay for the PmodCAN correct, to use it together with the ZedBoard on the JE Pmod connector? Maybe there is even a template somewhere? Based on the issues I have, I suspect something might be wrong with the clock and frequency definitions ...

Edited by Nico89
Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now