Reading Raspi's canbus data by Using Pcan-usb on desktop.

USB to CAN Interface
Post Reply
ShivaP
Posts: 1
Joined: Mon 28. Nov 2022, 10:19

Reading Raspi's canbus data by Using Pcan-usb on desktop.

Post by ShivaP » Mon 28. Nov 2022, 10:47

I have a setup where I am using raspberry pi 3 with can sheild to send data on canbus and trying to read this data of canbus using pcan usb on desktop.

Problem:
Whenever I send data using raspberry pi, pcan's status shows BUSHEAVY and I cant see any data on Receive window of PCAN-View.
pcan widow.PNG
pcan widow.PNG (26.58 KiB) Viewed 268 times
My configurations on PCAN are
pconf.PNG
pconf.PNG (45.84 KiB) Viewed 268 times
but I have also tried using different Database Entry(Bitrates) but nothing solved the problem.

Configuration on Raspi are :
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=22
dtoverlay=mcp2515-can1,oscillator=8000000,interrupt=22

sudo ip link set can0 up type can bitrate 500000 sample point 0.875
sudo ip link set can1 up type can bitrate 500000 sample point 0.875
Here I have also tried putting different bitrates with respect to bitrate I put in Pcan configuration but problem still remains.

What I have also tried:
I put another raspberrypi+cansheild setup as extra node on canbus to check if there is any problem while sending data by the first raspberrypi, but seems like this new raspberry pi is able to read the canbus without any problem but pcan cant read.
I have also checked for 120ohm termination resistors on canbus(120 ohm on each end) by using multimeter and its equivalent is 60 ohm (because they are in parallel), so resistor is also not the problem.
I am not getting what is wrong with pcan, can someone please help me?

M.Maidhof
Support
Support
Posts: 1521
Joined: Wed 22. Sep 2010, 14:00

Re: Reading Raspi's canbus data by Using Pcan-usb on desktop.

Post by M.Maidhof » Mon 28. Nov 2022, 11:19

Hi,

looks like a bitrate missmatch. Please try a bitrate with a different sample point and a higher SJW in PCAN-View. As a test, please measure the real bitiming of your RPI with a scope. As a workaround, you can also use the PCAN-USB on the RPI.

regards

Michael

Post Reply