PlatformIO Community

CAN BUS support on ESP32-S2

Not sure if this is the right place to ask nor if it’s a PIO issue, but any help is welcome.

I’m developing some CAN related stuff using the standard ESP32 and it works fine. According to espressif’s docs, the ESP32-S2 has a built in CAN controller (now renamed to TWAI - Two Wire Auto Interface). But if I choose any S2 board (I’m using the WEMOS lolin_s2_mini) the build fails due to missing headers CAN headers. Looks like this SDK was compiled without CAN option in menuconfig.

For example, this header is missing on the S2 board but works on the standard ESP32

~.platformio\packages\framework-arduinoespressif32\tools\sdk\esp32\include\soc\esp32\include\soc\gpio_sig_map.h @ 240

Any help is welcome.

If Arduino-ESP32 fails to give you CAN bus support on ESP32-S2, open an issue in Issues · espressif/arduino-esp32 · GitHub. PlatformIO just gives you the core they produce.

Good to know, thank you for pointing out.