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

t23319222
Posts: 11
Joined: Tue Mar 04, 2025 6:29 pm

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

Postby t23319222 » Sun Mar 09, 2025 10:24 am

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.

Sprite
Espressif staff
Espressif staff
Posts: 10609
Joined: Thu Nov 26, 2015 4:08 am

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

Postby Sprite » Mon Mar 10, 2025 2:00 am

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.

Who is online

Users browsing this forum: Bytespider, ChatGPT-User, Google [Bot] and 5 guests