Esp32-c3-mini-1 issues

Hi all,

I’m trying to get a ES32-C3-MINI-1 chip to work on a custom PCB. Using ESP-IDF 4.4 it all works nicely and the example output from the serial when running hello world is:

Restarting now.
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403804c6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x16b4
load:0x403ce000,len:0x930
load:0x403d0000,len:0x2d40
entry 0x403ce000
<ESC>[0;32mI (35) boot: ESP-IDF v4.4 2nd stage bootloader<ESC>[0m
<ESC>[0;32mI (35) boot: compile time 10:45:14<ESC>[0m
<ESC>[0;32mI (35) boot: chip revision: 3<ESC>[0m
<ESC>[0;32mI (37) boot.esp32c3: SPI Speed      : 80MHz<ESC>[0m
<ESC>[0;32mI (41) boot.esp32c3: SPI Mode       : DIO<ESC>[0m
<ESC>[0;32mI (46) boot.esp32c3: SPI Flash Size : 2MB<ESC>[0m
<ESC>[0;32mI (51) boot: Enabling RNG early entropy source...<ESC>[0m
<ESC>[0;32mI (56) boot: Partition Table:<ESC>[0m
<ESC>[0;32mI (60) boot: ## Label            Usage          Type ST Offset   Length<ESC>[0m
<ESC>[0;32mI (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000<ESC>[0m
<ESC>[0;32mI (75) boot:  1 phy_init         RF data          01 01 0000f000 00001000<ESC>[0m
<ESC>[0;32mI (82) boot:  2 factory          factory app      00 00 00010000 00100000<ESC>[0m
<ESC>[0;32mI (89) boot: End of partition table<ESC>[0m
<ESC>[0;32mI (94) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=06d30h ( 27952) map<ESC>[0m
<ESC>[0;32mI (106) esp_image: segment 1: paddr=00016d58 vaddr=3fc8a000 size=013dch (  5084) load<ESC>[0m
<ESC>[0;32mI (111) esp_image: segment 2: paddr=0001813c vaddr=40380000 size=07edch ( 32476) load<ESC>[0m
<ESC>[0;32mI (125) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=127c8h ( 75720) map<ESC>[0m
<ESC>[0;32mI (139) esp_image: segment 4: paddr=000327f0 vaddr=40387edc size=02004h (  8196) load<ESC>[0m
<ESC>[0;32mI (141) esp_image: segment 5: paddr=000347fc vaddr=50000010 size=00010h (    16) load<ESC>[0m
<ESC>[0;32mI (148) boot: Loaded app from partition at offset 0x10000<ESC>[0m
<ESC>[0;32mI (151) boot: Disabling RNG early entropy source...<ESC>[0m
<ESC>[0;32mI (168) cpu_start: Pro cpu up.<ESC>[0m
<ESC>[0;32mI (176) cpu_start: Pro cpu start user code<ESC>[0m
<ESC>[0;32mI (176) cpu_start: cpu freq: 160000000<ESC>[0m
<ESC>[0;32mI (176) cpu_start: Application information:<ESC>[0m
<ESC>[0;32mI (178) cpu_start: Project name:     hello_world<ESC>[0m
<ESC>[0;32mI (184) cpu_start: App version:      1<ESC>[0m
<ESC>[0;32mI (188) cpu_start: Compile time:     Apr 23 2022 10:44:00<ESC>[0m
<ESC>[0;32mI (194) cpu_start: ELF file SHA256:  92c372315e8ee5a2...<ESC>[0m
<ESC>[0;32mI (200) cpu_start: ESP-IDF:          v4.4<ESC>[0m
<ESC>[0;32mI (205) heap_init: Initializing. RAM available for dynamic allocation:<ESC>[0m
<ESC>[0;32mI (212) heap_init: At 3FC8C240 len 00033DC0 (207 KiB): DRAM<ESC>[0m
<ESC>[0;32mI (218) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM<ESC>[0m
<ESC>[0;32mI (225) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM<ESC>[0m
<ESC>[0;32mI (232) spi_flash: detected chip: generic<ESC>[0m
<ESC>[0;32mI (236) spi_flash: flash io: dio<ESC>[0m
<ESC>[0;33mW (240) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.<ESC>[0m
<ESC>[0;32mI (253) sleep: Configure to isolate all GPIO pins in sleep state<ESC>[0m
<ESC>[0;32mI (260) sleep: Enable automatic switching of GPIO sleep configuration<ESC>[0m
<ESC>[0;32mI (267) cpu_start: Starting scheduler.<ESC>[0m
Hello world!
This is esp32c3 chip with 1 CPU core(s), WiFi/BLE, silicon revision 3, 2MB external flash
Minimum free heap size: 329692 bytes
Restarting in 10 seconds...

At least the hardware seems ok, though so far I’ve not been able to get esphome going which is the goal here.

My config looks like the following:

esphome:
  name: vpp-test
  
esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: esp-idf
    version: latest

Using 2022-04 release, this compiles and even starts to run. However once running it enters into a boot loop with 2 different messages being output (somewhat randomly which one):

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40049a42
SPIWP:0xee
mode:QIO, clock div:1
load:0x3fcd6100,len:0x19b0
ets_loader.c 78 

and

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:QIO, clock div:1
load:0x3fcd6100,len:0x19b0
ets_loader.c 78

This initially felt related to current but even with significant increase in load the regulator keeps it stable and ESP-IDF generated code just runs, so pushing that lower on the suspect list.

Any ideas here? Thanks

In Boot loop on ESP32-C3 · Issue #622 · platformio/platform-espressif32 · GitHub part of this gets discussed as well, and though it looks like it’s not working for everybody. flash_mode dio made a difference for me with the versions used above.

The following works for me:

esphome:
  name: vpp-test
  platformio_options:
    board_build.flash_mode: dio
  
esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf
    version: latest

The serial output of this is

Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x0 (USB_BOOT)
Saved PC:0x40380786
wait usb download
<NUL>ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x19b0
load:0x403ce000,len:0x8d4
load:0x403d0000,len:0x2dc0
entry 0x403ce000
<ESC>[0;32mI (30) boot: ESP-IDF 4.3.2 2nd stage bootloader<ESC>[0m
<ESC>[0;32mI (30) boot: compile time 11:38:46<ESC>[0m
<ESC>[0;32mI (30) boot: chip revision: 3<ESC>[0m
<ESC>[0;32mI (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0<ESC>[0m
<ESC>[0;32mI (39) boot.esp32c3: SPI Speed      : 80MHz<ESC>[0m
<ESC>[0;32mI (44) boot.esp32c3: SPI Mode       : DIO<ESC>[0m
<ESC>[0;32mI (48) boot.esp32c3: SPI Flash Size : 4MB<ESC>[0m
<ESC>[0;32mI (53) boot: Enabling RNG early entropy source...<ESC>[0m
<ESC>[0;32mI (58) boot: Partition Table:<ESC>[0m
<ESC>[0;32mI (62) boot: ## Label            Usage          Type ST Offset   Length<ESC>[0m
<ESC>[0;32mI (69) boot:  0 nvs              WiFi data        01 02 00009000 00004000<ESC>[0m
<ESC>[0;32mI (77) boot:  1 otadata          OTA data         01 00 0000d000 00002000<ESC>[0m
<ESC>[0;32mI (84) boot:  2 phy_init         RF data          01 01 0000f000 00001000<ESC>[0m
<ESC>[0;32mI (92) boot:  3 app0             OTA app          00 10 00010000 001c0000<ESC>[0m
<ESC>[0;32mI (99) boot:  4 app1             OTA app          00 11 001d0000 001c0000<ESC>[0m
<ESC>[0;32mI (107) boot: End of partition table<ESC>[0m
<ESC>[0;32mI (111) boot: No factory image, trying OTA 0<ESC>[0m
<ESC>[0;32mI (116) boot_comm: chip revision: 3, min. application chip revision: 0<ESC>[0m
<ESC>[0;32mI (123) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=0d918h ( 55576) map<ESC>[0m
<ESC>[0;32mI (140) esp_image: segment 1: paddr=0001d940 vaddr=3fc8a600 size=01ae0h (  6880) load<ESC>[0m
<ESC>[0;32mI (141) esp_image: segment 2: paddr=0001f428 vaddr=40380000 size=00bf0h (  3056) load<ESC>[0m
<ESC>[0;32mI (153) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=1b520h (111904) map<ESC>[0m
<ESC>[0;32mI (174) esp_image: segment 4: paddr=0003b548 vaddr=40380bf0 size=09874h ( 39028) load<ESC>[0m
<ESC>[0;32mI (181) esp_image: segment 5: paddr=00044dc4 vaddr=50000000 size=00010h (    16) load<ESC>[0m
<ESC>[0;32mI (184) boot: Loaded app from partition at offset 0x10000<ESC>[0m
<ESC>[0;32mI (222) boot: Set actual ota_seq=1 in otadata[0]<ESC>[0m
<ESC>[0;32mI (222) boot: Disabling RNG early entropy source...<ESC>[0m
<ESC>[0;32mI (234) cpu_start: Pro cpu up.<ESC>[0m
<ESC>[0;32mI (246) cpu_start: Pro cpu start user code<ESC>[0m
<ESC>[0;32mI (246) cpu_start: cpu freq: 160000000<ESC>[0m
<ESC>[0;32mI (246) cpu_start: Application information:<ESC>[0m
<ESC>[0;32mI (249) cpu_start: Project name:     vpp-test<ESC>[0m
<ESC>[0;32mI (254) cpu_start: App version:      2022.4.0<ESC>[0m
<ESC>[0;32mI (259) cpu_start: Compile time:     Apr 23 2022 11:35:51<ESC>[0m
<ESC>[0;32mI (265) cpu_start: ELF file SHA256:  1fd5babd28e5d345...<ESC>[0m
<ESC>[0;32mI (271) cpu_start: ESP-IDF:          4.3.2<ESC>[0m
<ESC>[0;32mI (276) heap_init: Initializing. RAM available for dynamic allocation:<ESC>[0m
<ESC>[0;32mI (283) heap_init: At 3FC8D060 len 00032FA0 (203 KiB): DRAM<ESC>[0m
<ESC>[0;32mI (290) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM<ESC>[0m
<ESC>[0;32mI (296) heap_init: At 50000010 len 00001FF0 (7 KiB): RTCRAM<ESC>[0m
<ESC>[0;32mI (303) spi_flash: detected chip: generic<ESC>[0m
<ESC>[0;32mI (307) spi_flash: flash io: dio<ESC>[0m
<ESC>[0;32mI (311) sleep: Configure to isolate all GPIO pins in sleep state<ESC>[0m
<ESC>[0;32mI (318) sleep: Enable automatic switching <ESC>[0;32m[I][logger:214]: Log initialized<ESC>[0m<LF><ESC>[0;32m[I][app:029]: Running through setup()...<ESC>[0m<LF><ESC>[0;32m[I][app:062]: setup() finished successfully!<ESC>[0m<LF><ESC>[0;32m[I][app:102]: ESPHome version 2022.4.0 compiled on Apr 23 2022, 11:35:50<ESC>[0m<LF><ESC>[0;35m[C][logger:233]: Logger:<ESC>[0m<LF><ESC>[0;35m[C][logger:234]:   Level: DEBUG<ESC>[0m<LF><ESC>[0;35m[C][logger:235]:   Log Baud Rate: 115200<ESC>[0m<LF><ESC>[0;35m[C][logger:236]:   Hardware UART: UART0<ESC>[0m<LF>

Maybe this will help somebody else on the same path :slight_smile:

1 Like

Many thanks - this helped me out

Hai all, I have followed this schematic and designed assembled similar custom pcb with ESP32C3MINI, we have used FTDI and used USB TTL converter to flash I have used ESPIDE to flash the hello world it always showing Chip failed can anyone help me in this to sort this issue. esp32c3 mini|690x443