cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
samlei
Visitor
Visitor
560 Views
Registered: ‎11-05-2020

CAN Driver on Linux (Zynq7000)

Hi,

I am currently in the process of putting the CAN driver for my AXI CAN IP cores into operation. If I use the standard commands:
-ip link set canX type can bitrate 500000
-ip link set canX up
the CAN channel is still in SLEEPING state. Does anyone now why? Screenshot is attached.

If I deactivate the channel with "ip link set canX down" and activate it again with "ip link set canX up" the following message appears:
"RTNETLINK: No such device". Does anyone know why?

Thanks in advance!

Samuel

CAN4_IP_LINK_SHOW.PNG
0 Kudos
6 Replies
venui
Moderator
Moderator
485 Views
Registered: ‎04-09-2019

Looks it is in sleep state can you please change the state to Loopback and check the can state is getting changed or not.

ip link set canX type can bitrate 100000 loopback on

If it is is not changing please let me know. Before that the make sure that you configure for the same node and the bus is formed.

 

Regards,

Venu

0 Kudos
samlei
Visitor
Visitor
476 Views
Registered: ‎11-05-2020

Thanks for your answer!

The picture is from CAN2, but my other channels are showing the same issue.

Now the following details are set (however SLEEPING is still there):

CAN_Loopback.PNG
0 Kudos
venui
Moderator
Moderator
468 Views
Registered: ‎04-09-2019

Can you please try to send a message with same node and check the status after the data transfer.

Regards,

Venu

0 Kudos
samlei
Visitor
Visitor
459 Views
Registered: ‎11-05-2020

The -details still show the same

State_CANSEND.PNG
0 Kudos
venui
Moderator
Moderator
410 Views
Registered: ‎04-09-2019

Can you please let me know the which version of xilinx tools are you using.

0 Kudos
samlei
Visitor
Visitor
363 Views
Registered: ‎11-05-2020

Sorry for the late response...

I am using:

Vivado/Vitis 2020.1

Kernel : https://github.com/mathworks/xilinx-linux.git (Version: mathworks_zynq_R20.2.0)

Uboot: https://github.com/mathworks/xilinx-uboot.git (Version: mathworks_zynq_R20.2.0)

 

It is included in a buildroot buildsystem provided by mathworks. But the base configuration is from XILINX. I included the dts-files & boot files generated out of my Vivado project from the .xsa file.

Thank you!

0 Kudos