Page 1 of 1

Unable to program ESP32-C3-Mini through UART

Posted: Fri May 03, 2024 7:57 am
by AndreRamakers
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.

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

Posted: Fri May 03, 2024 1:35 pm
by MicroController
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.

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

Posted: Mon May 06, 2024 11:16 am
by AndreRamakers
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?

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

Posted: Mon May 06, 2024 12:37 pm
by AndreRamakers
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.