Re: STM32 CAN bus driver issues #stm32 #can


Josef Raschen <josef@...>
 

Update: CAN bus is working now with my board. I had to move by board config into the Zephyr tree, then pinmuxing seems to work. I still do not know the root cause. My configuration (for CAN) was identical to the one of the STM32F072B Discovery board in the Zephyr tree, but still pinmuxing was not working - at least for pins PB8 and PB9 where my CAN transceiver is connected to. Maybe I missed to set a variable for out-of-tree board definitions, or maybe there is a bug in the build scripts for out-of-tree builds. I thought that setting the BOARD_ROOT variable for CMake should be sufficient. Also the CONFIG_* flags were all set correctly, just my pinmuxing was ignored.

Anyway, I can live with having my board config in the Zephyr tree.

In case anybody is interested, I pushed everything to github: https://github.com/JosefR/zephyr (board name: hvac_sensors)

Thank you for all your help,
Josef

On 30.03.19 12:13, Josef Raschen wrote:
Hi,
the driver is built into the kernel, but what I found out yesterday is, that the pinmuxing is not set up correctly. And the STM32 CAN controller will wait until it has received some bits before it leaves the init mode. So I think, when I fix that, it should work.
Thanks,
Josef
On 30.03.19 04:03, Lawrence King wrote:
To me, the problem look more like you didn’t include the CAN bus drivers when you built the kernel. Try running ‘make menuconfig’ and turning on the CAN bus, then rebuilding.

Join users@lists.zephyrproject.org to automatically receive all group messages.