Arduino ESP32 CAN is not compiled under ESP32-C3

Yuriy_m
Posts: 9
Joined: Tue Apr 19, 2022 8:38 am

Arduino ESP32 CAN is not compiled under ESP32-C3

Postby Yuriy_m » Tue Apr 19, 2022 8:54 am

Good day! I have two esp32 and esp32-c3 modules. The library http://www.iotsharing.com/2017/09/how-t ... rface.html works for esp32. compilation error for esp32-c3.

C:\Users\Yuriy\Documents\Arduino\libraries\esp32-can-protocol-demo-master\src\CAN.c:36:10: fatal error: soc/dport_reg.h: No such file or directory
#include "soc/dport_reg.h"
^~~~~~~~~~~~~~~~~

I assume that there are slightly different platforms. How to fix it ? Maybe someone did CAN under esp32-C3?

**txf**
Posts: 10
Joined: Thu Apr 21, 2022 3:03 pm

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Postby **txf** » Fri Apr 29, 2022 8:50 am

As far as I know that library only works on the original ESP32, on account that it configures and accesses CAN directly at the register level.

To use CAN on later esp32 devices I just use the built-in IDF functions for TWAI. It works just fine. I'd check out their TWAI examples.

--TBM--
Posts: 1
Joined: Fri Jul 01, 2022 9:04 pm

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Postby --TBM-- » Sat Jul 02, 2022 7:36 am

Hello. I have exacly same problem. I would like to compile with arduino IDE. I have that error only when try to compile for esp32-c3 (for s2, s3 or other boards compiling just fine). Please help

wangjb2023
Posts: 1
Joined: Mon Jul 03, 2023 3:19 am

Re: Arduino ESP32 CAN is not compiled under ESP32-C3

Postby wangjb2023 » Mon Jul 03, 2023 3:22 am

微信图片_20230703112129.png
微信图片_20230703112129.png (116.56 KiB) Viewed 1965 times

Who is online

Users browsing this forum: gfvalvo and 55 guests