You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works with ESP32-wroom-32E. However, I receive errors trying to use this with SEEED XIAO ESP32S3.
Trying to understand if this a s/w or h/w issue?
Thanks,
`In file included from C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_reg.h:20,
from d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:38:
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c: In function 'CAN_init':
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:33: error: 'DPORT_PERIP_CLK_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_CLK_EN1_REG'?
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:33: note: each undeclared identifier is reported only once for each function it appears in
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:57: error: 'DPORT_CAN_CLK_EN' undeclared (first use in this function)
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:35: error: 'DPORT_PERIP_RST_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_RST_EN0_REG'?
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:87:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
87 | #define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:59: error: 'DPORT_CAN_RST' undeclared (first use in this function)
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t *)(addr))) = (uint32_t)(val)
| ^~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:87:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
87 | #define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:179:44: error: 'CAN_TX_IDX' undeclared (first use in this function)
179 | gpio_matrix_out(CAN_cfg.tx_pin_id, CAN_TX_IDX, 0, 0);
| ^~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:184:43: error: 'CAN_RX_IDX' undeclared (first use in this function)
184 | gpio_matrix_in(CAN_cfg.rx_pin_id, CAN_RX_IDX, 0);
| ^~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:254:24: error: 'ETS_CAN_INTR_SOURCE' undeclared (first use in this function)
254 | esp_intr_alloc(ETS_CAN_INTR_SOURCE, 0, CAN_isr, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~
exit status 1
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This works with ESP32-wroom-32E. However, I receive errors trying to use this with SEEED XIAO ESP32S3.
Trying to understand if this a s/w or h/w issue?
Thanks,
`In file included from C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_reg.h:20,
from d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:38:
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c: In function 'CAN_init':
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:33: error: 'DPORT_PERIP_CLK_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_CLK_EN1_REG'?
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:33: note: each undeclared identifier is reported only once for each function it appears in
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:57: error: 'DPORT_CAN_CLK_EN' undeclared (first use in this function)
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:90:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
90 | #define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:173:9: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
173 | DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
| ^~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:35: error: 'DPORT_PERIP_RST_EN_REG' undeclared (first use in this function); did you mean 'SYSTEM_PERIP_RST_EN0_REG'?
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t )(addr))) = (uint32_t)(val)
| ^~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:87:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
87 | #define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:59: error: 'DPORT_CAN_RST' undeclared (first use in this function)
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:77:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
77 | #define _DPORT_WRITE_PERI_REG(addr, val) (((volatile uint32_t *)(addr))) = (uint32_t)(val)
| ^~~
C:\Users\Steve\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/soc/esp32s3/include/soc/dport_access.h:87:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
87 | #define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
| ^~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:174:9: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
174 | DPORT_CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_CAN_RST);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:179:44: error: 'CAN_TX_IDX' undeclared (first use in this function)
179 | gpio_matrix_out(CAN_cfg.tx_pin_id, CAN_TX_IDX, 0, 0);
| ^~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:184:43: error: 'CAN_RX_IDX' undeclared (first use in this function)
184 | gpio_matrix_in(CAN_cfg.rx_pin_id, CAN_RX_IDX, 0);
| ^~~~~~~~~~
d:\Arduinofiles\libraries\ESP32-Arduino-CAN\src\CAN.c:254:24: error: 'ETS_CAN_INTR_SOURCE' undeclared (first use in this function)
254 | esp_intr_alloc(ETS_CAN_INTR_SOURCE, 0, CAN_isr, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~
exit status 1
Compilation error: exit status 1`
Beta Was this translation helpful? Give feedback.
All reactions