Post

CAN configuration on RPI Zero 2W

In order to config a driver add this to /boot/config.txt file:

1
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25

Then run this

1
sudo /sbin/ip link set can0 up type can bitrate 500000

Now CAN can be seen here

1
ifconfig

To stop CAN if some error appears or resource is not released properly:

1
sudo /sbin/ip link set can0 down
This post is licensed under CC BY 4.0 by the author.