Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: Yasen6275 on November 12, 2022, 01:13:10 PM

Title: Help with ESP-C3 and ESP-PROG
Post by: Yasen6275 on November 12, 2022, 01:13:10 PM
I messed up my C3 trying to program it with Arduino IDE.

Now I'm trying to restore it to working condition with ESP-PROG, but I cant find the proper baud rate in the documentation. Can someone help with proper value.
Title: Re: Help with ESP-C3 and ESP-PROG
Post by: LubOlimex on November 14, 2022, 11:43:13 AM
Default baud rate is 115200, according to this:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/establish-serial-connection.html
Title: Re: Help with ESP-C3 and ESP-PROG
Post by: Yasen6275 on November 16, 2022, 12:10:01 AM
I'm not talking about
https://www.olimex.com/Products/IoT/ESP32-C3/ESP32-C3-DevKit-Lipo/open-source-hardware
But about
https://www.olimex.com/Products/IoT/Programmer/ESP-PROG/open-source-hardware
Because the former is not communicating with PC when connected alone.
Title: Re: Help with ESP-C3 and ESP-PROG
Post by: LubOlimex on November 16, 2022, 09:09:26 AM
ESP32-PROG baudrate is variable and minimum and maximum are compliant with those of main chip CH340T, e.g. between 50 and 2milion. The datasheet of CH340T can be found here:

https://www.olimex.com/Products/Breadboarding/BB-CH340T/resources/CH340DS1.PDF

If ESP32-PROG is not recognized by your OS, then try installing the drivers from the product page, under "SOFTWARE" section.

It should get listed as COM port.
Title: Re: Help with ESP-C3 and ESP-PROG
Post by: KNK on January 14, 2023, 05:09:15 PM
I messed up my ESP32-C3 board with Arduino IDE too, but fixed it by manually connecting GPIO9 to GND and reset to put it back in programing mode.

Symptoms:
Windows does not recognize the chip after uploading a simple program
Device USB\VID_0000&PID_0002\6&18d0524&0&1 had a problem starting.

By putting the board in programing mode it is detected as
Device USB\VID_303A&PID_1001\<Board MAC address>

By connecting USB-SERIAL-F to the board I can see the program output, but not via the built-in USB-C, so the question is:

How to enable the built-in USB from Arduino as a serial console?
Title: Re: Help with ESP-C3 and ESP-PROG
Post by: LubOlimex on January 17, 2023, 11:13:23 AM
So you can program the board via the USB but not get serial output on the same USB? Seems like some bug in the Arduino IDE package. I feel like this should be a well-known issue within the Arduino IDE community for ESP32-C3.
Title: Re: Help with ESP-C3 and ESP-PROG
Post by: KNK on January 17, 2023, 08:47:03 PM
I figured it out:

1. 'USB CDC On Boot' is 'disabled' by default in Arduino IDE
2. I have the habit to keep the serial monitor opened, but it requires reopen after reboot of the board

Also if instead of Serial.print() i use log_n(), then even with 'USB CDC On Boot' disabled, the messages are printed