Hi, I’m having some issues with the balenaFin and the PICAN2 canbus shield.
I am trying to get the shield to send can messages to a usb adapter on my pc to no avail, which however works correctly when using a standard Raspberry Pi.
This is my setup:
Raspberry Pi 3 Model B v1.2 2015
balenaFin 1.1 with Compute Module 3+L 2018
PiCAN2 Duo CAN-Bus Board
USBCAN: PCAN-USB FD
I have tried sending first SPI messages to see if there was a problem there, but both devices are able to send messages that I can see on a logic analyzer.
I have then tried sending CAN messages using both cansend and python-can, and using the adapter with candump and a logic analyzer to verify these messages.
The Raspberry works as expected, and I am able to see the messages pass on both devices when using both methods.
The balenaFin fails to send anything, there are no CAN messages going out, nor is there any activity on the SPI lines when the CAN message is being sent.
When I try to send a message from the pc to the balenaFin, there is no ACK and the adapter’s ERROR LED turns on. A message from the pc to the Raspberry Pi works correctly.
I have configured the /boot/config.txt file following the instructions as follows, and use the same file for both the Raspberry Pi and the balenaFin:
dtparam=spi=on # SPI #dtoverlay=spi-bcm2835 # CAN dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=24 dtoverlay=spi-bcm2835-overlay
I have uncommented the SPI section while commenting out the CAN section to test the SPI and viceversa to test the CAN.
Since the software side is the same, this seems to be a hardware configuration issue.
Any input on the possible causes for this behaviour would be greatly appreciated.