Page 1 of 1

Is it possible to receive can/twai messages in a custom bootloader?

Posted: Sun Mar 09, 2025 10:24 am
by t23319222
Is it theoretically possible to receive CAN / Twai messages in a custom bootloader in any way?

I have already tried to import the driver component in bootloader_components\main\CMakeLists.txt: set(requires “bootloader” “bootloader_support” “spi_flash” ‘driver’), but the line #include “twai.h” in bootloader_start.c does not work.

Re: Is it possible to receive can/twai messages in a custom bootloader?

Posted: Mon Mar 10, 2025 2:00 am
by Sprite
Yes, but not with the driver, as it requires FreeRTOS. You would need to write something that talks to the twai HAL directly, effectively writing an alternate driver that does not require FreeRTOS. It's possible, although not trivial.