Unable to program ESP32-C3-Mini through UART

AndreRamakers
Posts: 9
Joined: Fri Mar 20, 2020 1:18 pm

Unable to program ESP32-C3-Mini through UART

Postby AndreRamakers » Fri May 03, 2024 7:57 am

Hello,
I have my own board which contains a ESP32-C3-Mini. The schematic is an exact copy of the evaluation kit. On my board I have a STM32 which is connected to the ESP through the serial line. This micro also contains a usb to cdc driver (which we have used in the past with Wroom and Wrover modules so I know it is working correctly).

I can put the ESP in boot mode and program it with flash_download_tool 3.9.6 and its own usb. This means that the strapping pins and power supply are ok.

But when I try to program it with through the UART it doesnt work. It does work with Wroom and Wrover but not with the C3 Mini. I always get the message that it can't write to RAM. Lots of people have the same issue. Remarks are that the driver is not good but why does it work with Wroom and Wrover but not with the C3 Mini with the same hardware? Can someone please give me some advice? Thank you in advance.

MicroController
Posts: 1694
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Unable to program ESP32-C3-Mini through UART

Postby MicroController » Fri May 03, 2024 1:35 pm

AndreRamakers wrote:
Fri May 03, 2024 7:57 am
I can put the ESP in boot mode and program it with flash_download_tool 3.9.6 and its own usb. This means that the strapping pins [...] are ok.
Not sure about your setup and what programs what, but being able to program a C3 via its own USB-CDC is not an indication that you connected the strapping pins or UART correctly for programming too.

AndreRamakers
Posts: 9
Joined: Fri Mar 20, 2020 1:18 pm

Re: Unable to program ESP32-C3-Mini through UART

Postby AndreRamakers » Mon May 06, 2024 11:16 am

Strapping is working fine, for now I use RTS and CTS to enter the bootloader, the module replies: "ESP-ROM:esp32c3-api1-20210207...." which proves that the bootloader starts.

Flash program tool sends: C0 00 08 24 00 00 00 00 00 07 07 12 20, 32 times 55, C0
Module replies: C0 01 08 04 00 07 07 12 20 00 00 00 00 C0 01 08 04 00 ...
Sequence repeats over and over again.

I have attached a sreenshot: yellow = IO0, green = ENA, red = module RX, blue = module TX.

So why doesn't the Flash programmer accept the reply from the module?
Attachments
UartBoot.JPG
UartBoot.JPG (146.82 KiB) Viewed 826 times

AndreRamakers
Posts: 9
Joined: Fri Mar 20, 2020 1:18 pm

Re: Unable to program ESP32-C3-Mini through UART

Postby AndreRamakers » Mon May 06, 2024 12:37 pm

Found the issue, it was in the code of the STM32: the data returned from the ESP module was not send back to the pc. Case closed.

Who is online

Users browsing this forum: MicroController and 85 guests