0

my question is about using the SPI interface to do some things with CAN. On my Raspberry with the Raspberry OS everything worked fine.

Since I want to use the CAN data with ROS, I decided to install Ubuntu Server 20.04 on it. In doing so, I ran into a problem (Cannot find device "can").

These are my configurations:

$ nano /boot/config.txt

dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25 dtoverlay=spi-bcm2835 dtparam=spi=on

.

$ ./can_setup.sh 
#!/bin/bash

ip link set can0 up type can bitrate 1000000 ip link set can1 up type can bitrate 1000000

.

$ ls /dev/

shows me that spidev0.0 and spidev0.1 are present

I have analyzed MISO MOSI and SCK with a logic analyzer and seen nothing.

Can someone help me?

1 Answers1

0

assuming, that you use Ubuntu as OS for running ROS, you should make your entries for dtoverlay inside the /etc/firmware/config.txt.

My can bus device with MCP2515 works fine with Ubuntu 22.04.

Then try

ls /sys/bus/spi/devices/spi0.0/net

It should show something like

can0

Hope this helps ...

jon_doe
  • 1
  • 1