ESP32-C3-WROOM-02-H4, No serial data received.

BernatFe
Posts: 4
Joined: Tue Jul 26, 2022 2:04 pm

ESP32-C3-WROOM-02-H4, No serial data received.

Postby BernatFe » Tue Jul 26, 2022 7:54 pm

Hi,

I am struggling to flash for first time my custom board with ESP32-C3-WROOM-02-H4.

You can see attached my schema, where R1 has been added by rework after first failed try.

When I connect board to my pc through a USB/UART adapter (FTDI232) I receive following answers:
  1. ESP-ROM:esp32c3-api1-20210207<CR><LF>
  2. Build:Feb  7 2021<CR><LF>
  3. rst:0x7 (TG0WDT_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)<CR><LF>
  4. Saved PC:0x4004c0dc<CR><LF>
  5. invalid header: 0xffffffff<CR><LF>
  6. invalid header: 0xffffffff<CR><LF>
  7. ...(repeat = invalid header: 0xffffffff<CR><LF>)
Which I suppose that means that ESP32 is trying to access flash but there is no valid program flashed.

After pulling down GPIO9 at startup no message emerges from UART/USB port, but esp-idf tool is not able to connect

Could anyone help to find out what I am doing worng?

Thanks in adavance

Code: Select all

[Codebox=c file=Untitled.c]
[code]C:\Espressif\frameworks\esp-idf-v4.4.1\examples\get-started\hello_world>idf.py -p COM7 -b 9600 flash
Executing action: flash
Running ninja in directory c:\espressif\frameworks\esp-idf-v4.4.1\examples\get-started\hello_world\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\e...f-v4.4.1/examples/get-started/hello_world/build/hello_world.bin"hello_world.bin binary size 0x297f0 bytes. Smallest app partition is 0x100000 bytes. 0xd6810 bytes (84%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\examples\get-started\hello_world\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Espressif/frameworks/esp-idf-v4.4.1/examples/get-started/hello_world/build/bootloader/bootloader.bin"
Bootloader binary size 0x62d0 bytes. 0xd30 bytes (12%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\c...orks/esp-idf-v4.4.1/components/esptool_py/run_serial_tool.cmake"esptool.py esp32 -p COM7 -b 9600 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v3.3-dev
Serial port COM7
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
CMake Error at run_serial_tool.cmake:56 (message):
  C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe
  C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py
  --chip esp32 failed


FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.20.3\bin\cmake.exe -D IDF_PATH="C:/Espressif/frameworks/esp-idf-v4.4.1" -D SERIAL_TOOL="C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Espressif/frameworks/esp-idf-v4.4.1/examples/get-started/hello_world/build" -P C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
[/Codebox]
[/code]
Attachments
esp32_c3_wroom2_h4.jpg
esp32_c3_wroom2_h4.jpg (115.37 KiB) Viewed 4009 times

ESP_Sprite
Posts: 9769
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3-WROOM-02-H4, No serial data received.

Postby ESP_Sprite » Wed Jul 27, 2022 12:33 am

BernatFe wrote:
Tue Jul 26, 2022 7:54 pm
After pulling down GPIO9 at startup no message emerges from UART/USB port, but esp-idf tool is not able to connect
That is a bit suspect; you should still get a startup message (similar to the first three lines of the normal boot message) when starting in download mode. Are you sure you're not seeing that? If not, perhaps there's a short between GPIO9 and something else?

BernatFe
Posts: 4
Joined: Tue Jul 26, 2022 2:04 pm

Re: ESP32-C3-WROOM-02-H4, No serial data received.

Postby BernatFe » Wed Jul 27, 2022 8:29 pm

Thanks for your help,

I have found that adding a 100nF capacitor to GPIO9 boot pin fixed the error

BernatFe
Posts: 4
Joined: Tue Jul 26, 2022 2:04 pm

Re: ESP32-C3-WROOM-02-H4, No serial data received.

Postby BernatFe » Wed Jul 27, 2022 9:15 pm

After adding a capacitor of 100nF to GPIO9 I have been able to receive following start up message, but I am still not able to flash

Code: Select all

[Codebox=c file=Untitled.c]ESP-ROM:esp32c3-api1-2021þESP-ROÍESþESP-ROM:esp32c3-api1-20210207<CR><LF>
Build:Feb  7 2021<CR><LF>
rst:0x1 (POWERON),boot:0x4 (DOWNLOAD(USB/UART0/1))<CR><LF>
waiting for download<CR><LF>[/Codebox]
-----------------------------------------------------------------------------------------------------------------------------------------
Response when trying to flash

Code: Select all

[Codebox=c file=Untitled.c]C:\Espressif\frameworks\esp-idf-v4.4.1\examples\get-started\hello_world>idf.py -p COM7 flash -b 115200
Executing action: flash
Running ninja in directory c:\espressif\frameworks\esp-idf-v4.4.1\examples\get-started\hello_world\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4....1/examples/get-started/hello_world/build/hello_world.bin"
hello_world.bin binary size 0x297f0 bytes. Smallest app partition is 0x100000 bytes. 0xd6810 bytes (84%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\examples\get-started\hello_world\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Espressif/frameworks/esp-idf-v4.4.1/examples/get-started/hello_world/build/bootloader/bootloader.bin"
Bootloader binary size 0x62d0 bytes. 0xd30 bytes (12%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4...sp-idf-v4.4.1/components/esptool_py/run_serial_tool.cmake"
esptool.py esp32 -p COM7 -b 115200 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v3.3-dev
Serial port COM7
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
CMake Error at run_serial_tool.cmake:56 (message):
  C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe
  C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py
  --chip esp32 failed


FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.20.3\bin\cmake.exe -D IDF_PATH="C:/Espressif/frameworks/esp-idf-v4.4.1" -D SERIAL_TOOL="C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py --chip esp32" -D SERIAL_TOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Espressif/frameworks/esp-idf-v4.4.1/examples/get-started/hello_world/build" -P C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1[/Codebox]

BernatFe
Posts: 4
Joined: Tue Jul 26, 2022 2:04 pm

Re: ESP32-C3-WROOM-02-H4, No serial data received.

Postby BernatFe » Thu Jul 28, 2022 3:41 pm

I have found the solution my TX pin was share with uC TX which forced it to high level

ESP_Sprite
Posts: 9769
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3-WROOM-02-H4, No serial data received.

Postby ESP_Sprite » Fri Jul 29, 2022 2:18 am

That'll do it :) glad you found the error.

Who is online

Users browsing this forum: No registered users and 88 guests