question

xell1984 avatar image
xell1984 asked

Waveshare RS485 CAN HAT (B) on RP3 B

I bough this Waveshare CAN hat with both RS485 and CAN.


https://www.waveshare.com/wiki/RS485_CAN_HAT_(B)

i got the CAN working with

dtparam=spi=on

dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25,,spimaxfrequency=1000000 dtoverlay=sc16is752-spi1,int_pin=24

But not the RS485 which i need for my EM540. Any Suggestion?


root@raspberrypi2:~# dmesg | grep -i '\(can\|spi\)'

[ 7.034005] CAN device driver interface

[ 7.144451] mcp251x spi0.0 can0: MCP2515 successfully initialized.

[ 7.593323] F2FS-fs (sda): Can't find valid F2FS filesystem in 1th superblock

[ 7.608627] F2FS-fs (sda): Can't find valid F2FS filesystem in 2th superblock

[ 21.665582] can: controller area network core

[ 21.745287] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready

[ 22.513880] can: raw protocol

root@raspberrypi2:~#



I testet it with latest stable and Beta, but i don't know what to do. Thanks for your help!

Best Regards,

Xell1984

Raspberry PiVE.Canrs485
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
bathnm avatar image
bathnm answered ·

@Xell1984 Have you made sure that the overlays exists in the overlay directory (/u-boot/overlays/) If not it will not load. You may also need to add any kernel model that the RS485 might need. You may also need to check that pin 24 and 25 aren't being used as relay GPIO's within the /etc/venus/gpio file as if they are you have a clash of devices trying to use the relevant PIN.

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xell1984 avatar image xell1984 commented ·

@Bathnm

all GPIO Pins are deactivated.

kernel-module-sc16is7xx ... is installed.

i will need to take a look and do some research with the overlays. seems that i need a sc16is752-spi1.dtbo in /u-boot/overlays/

0 Likes 0 ·
Show more comments
xell1984 avatar image
xell1984 answered ·

@Bathnm
all GPIO Pins are deactivated.
i will need to take a look and do some research with the overlays and the kernel model. Don't know exactly what it is, but i hope to find the solution. Thanks!

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

seamaster avatar image seamaster commented ·

@Xell1984 Did you get it working? I have the same one and I would like to get it going


0 Likes 0 ·
xell1984 avatar image xell1984 seamaster commented ·
@Seamaster

No, tried it but bought now a Cerbo and Victron cables.

1 Like 1 ·
seamaster avatar image
seamaster answered ·
tank you for the quick replay. Im struggling to read other NMEA2000 deices on the system. I see tanks, but biting else shows up. i have some N2K temperature sensors but they don't show up. Have you tried any of that with the can hat?
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic

Additional resources still need to be added for this topic

Raspberry Pi running Victron’s Venus firmware - Blog Post

Venus OS Large image: Signal K and Node-RED - Install

raspberrypi install venus image