Xinyuan-LilyGO / T-Deck

191 stars 43 forks source link

ESP32C3 Programming #4

Closed hypercreeper closed 10 months ago

hypercreeper commented 11 months ago

Im having issues with the Keyboard_ESP32C3 Example, when i try to upload the example to the esp32c3, it will bootloop with this message:

rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cf80c
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x918
load:0x403ce710,len:0x24e4
entry 0x403cc710
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cf80c
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x918
load:0x403ce710,len:0x24e4
entry 0x403cc710
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cf80c
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x918
load:0x403ce710,len:0x24e4
entry 0x403cc710

But when i upload the firmware from the firmware folder it works, but the example doesnt work and keeps bootlooping

hypercreeper commented 11 months ago

Solved by adding board_build.flash_mode = dio to the [env:T-Keyboard] in the platformio.ini file

hypercreeper commented 11 months ago

Solved by adding board_build.flash_mode = dio to the [env:T-Keyboard] in the platformio.ini file

This solution breaks i2c with this error:

E (2341) i2c: i2c_set_pin(870): sda gpio number error
[  1950][E][esp32-hal-i2c.c:88] i2cInit(): i2c_param_config failed

ESP32C3 cannot communicate with ESP32S3

lewisxhe commented 11 months ago

First you have to set the default env to T-Keybord Did you do that? As shown below :

image

I have tested everything is normal, because board = ttgo-t-oi-plus the default flash mode is dio

mischief commented 10 months ago

Solved by adding board_build.flash_mode = dio to the [env:T-Keyboard] in the platformio.ini file

This solution breaks i2c with this error:

E (2341) i2c: i2c_set_pin(870): sda gpio number error
[  1950][E][esp32-hal-i2c.c:88] i2cInit(): i2c_param_config failed

ESP32C3 cannot communicate with ESP32S3

see #10 - there is a weird bug with function overloading in the Wire class that causes the sketch in the repo to try to setup as a master, not slave.

hypercreeper commented 10 months ago

Solved by adding board_build.flash_mode = dio to the [env:T-Keyboard] in the platformio.ini file

This solution breaks i2c with this error:

E (2341) i2c: i2c_set_pin(870): sda gpio number error
[  1950][E][esp32-hal-i2c.c:88] i2cInit(): i2c_param_config failed

ESP32C3 cannot communicate with ESP32S3

see #10 - there is a weird bug with function overloading in the Wire class that causes the sketch in the repo to try to setup as a master, not slave.

Thank you so much, I've been using the default bin file for the time being but I will try this fix and see if it works.