This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Zephyr with CAN bus support on nrf52 - partly works on powerup

Hi all,

trying to get CAN-bus support under Zephyr. Have a seed CAN bus shield link connected to PCA10040. The shield use SPI2 connected to MCP2515 CAN controller link.

Have made some hardware modifications to PCA10040 to make it work like cutting SB19 and SB30 and also soldering SB18 to bypass I2C I/O-expander. With these changes we can toggle LEDs from code. 

We are using nrf Connect SDK 1.3.2 and running the zephyr/drivers/can/demo application. zephyr.config and DTS-files attached. Have enabled the DF-Robot V2 CAN shield and adapted the shield overlay to reflect the Seed shield (another Chip Select). I believe hardware modifications are done ok. We see that the intended CAN message gets sent over the CAN-bus and well received when power cycling PCA10040. Even in a while loop that continuously send messages only one message is received on startup. See main.c attached.

Someone that have seen something similar? I would suspect kernel config, timing settings or similar that makes it possible to send one message but not more. When debugging the code it halts after sending the message but the message is never seen on the CAN-bus (using oscilloscope) unless power cycling the device. As we are new to the Zephyr environment I would guess there are some obvious things we should do / or test with that we don't know of.

Any ideas? 

thanks Olov

0574.misc project files.zip

Parents Reply
  • Hello Heidi, 

    many thanks or for the update. Have moved over to nrf91-board on sdk 1.4.0. Spent a few hours today and now have controller communication up and running! Some patch work was needed due to different voltages and I will probably need more patching before getting transceiver is up and running too. That said it feels like we found a path forward and we are OK that you close this ticket. Thanks!

    Best Olov

Children
No Data
Related