Problem with CH340G flashing

LeonardoF
Posts: 5
Joined: Thu Dec 08, 2022 7:00 pm

Problem with CH340G flashing

Postby LeonardoF » Thu Dec 08, 2022 7:10 pm

Hello, I'm having a very strange issue with a ESP32 board so, heres the problem:
When I try to communicate to the board via serial (i'm using the CH340G) it works, i see messages that the board sends me and i can send the board messages, but when I try to flash it refuses to work, done the usual (IO0 -> GND, RESET) combination and via serial i get the acknowledgment from the board that is ready to be programmed but it won't work (i'm using the Arduino IDE) here's the acknowledgment message;
20:09:37.978 -> rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_rEO_V2))
20:09:37.978 -> waiting for download
Does anyone know how to fix this issue? is it hardware or software? What i can do?

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

Re: Problem with CH340G flashing

Postby ESP_Sprite » Fri Dec 09, 2022 12:36 am

That looks good. In what way is flashing failing? Perhaps there is an issue between the CH340 and the ESP32 Rx line?

LeonardoF
Posts: 5
Joined: Thu Dec 08, 2022 7:00 pm

Re: Problem with CH340G flashing

Postby LeonardoF » Fri Dec 09, 2022 11:42 am

ESP_Sprite wrote:
Fri Dec 09, 2022 12:36 am
That looks good. In what way is flashing failing? Perhaps there is an issue between the CH340 and the ESP32 Rx line?
The flashing just times out as it stays on "Connecting..........." and then fails to upload any code, I don't believe it's a problem with the Rx line as I can get regular UART messages without any problems it's the flashing process that fails

LeonardoF
Posts: 5
Joined: Thu Dec 08, 2022 7:00 pm

Re: Problem with CH340G flashing

Postby LeonardoF » Fri Dec 09, 2022 12:30 pm

Here is some extra information captured with my oscilloscope
BLUE= ESP32 TX
YELLOW = ESP32 RX

Here, the ESP32 is talking to me and I see the messages from the esp to my computer:
IMAGE1.jpg
IMAGE1.jpg (39.54 KiB) Viewed 3962 times
Here is when the programmer tries to talk with the esp (the esp is already in programming mode (IO0->GND, RESET))
IMAGE2.jpg
IMAGE2.jpg (39.67 KiB) Viewed 3962 times
But the ESP does not respond to the programmer and so, the software on the pc eventually times out

(i tried to change the USB cable and TX RX wires, same result)

I STILL have no clue on why this is happening, the serial communication looks fine.

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

Re: Problem with CH340G flashing

Postby ESP_Sprite » Sat Dec 10, 2022 2:53 am

LeonardoF wrote:
Fri Dec 09, 2022 11:42 am
I don't believe it's a problem with the Rx line as I can get regular UART messages without any problems it's the flashing process that fails
No, I mean the other line: Tx from the CH340 to Rx of the ESP32. If that's not OK, the ESP32 won't respond to flash commands either.

Your scope images look OK to me. Can you show the schematic of your board?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: Problem with CH340G flashing

Postby chegewara » Sat Dec 10, 2022 10:07 am

Sometimes even with devkits from espressif i have to press BOOT to keep IO0 low until flashing start. You can try this.

LeonardoF
Posts: 5
Joined: Thu Dec 08, 2022 7:00 pm

Re: Problem with CH340G flashing

Postby LeonardoF » Sat Dec 10, 2022 10:27 am

ESP_Sprite wrote:
Sat Dec 10, 2022 2:53 am
LeonardoF wrote:
Fri Dec 09, 2022 11:42 am
I don't believe it's a problem with the Rx line as I can get regular UART messages without any problems it's the flashing process that fails
No, I mean the other line: Tx from the CH340 to Rx of the ESP32. If that's not OK, the ESP32 won't respond to flash commands either.

Your scope images look OK to me. Can you show the schematic of your board?
I "fixed it" I've used a different programming board (as the esp board was a DIY one and it didn't come with an on-board programmer) using a different programmer solved the issue, so the chip in the other programmer must be somehow defective.

LeonardoF
Posts: 5
Joined: Thu Dec 08, 2022 7:00 pm

Re: Problem with CH340G flashing

Postby LeonardoF » Sat Dec 10, 2022 10:33 am

chegewara wrote:
Sat Dec 10, 2022 10:07 am
Sometimes even with devkits from espressif i have to press BOOT to keep IO0 low until flashing start. You can try this.
The board isn't by espressif, I've made it from scratch, and everything works, the only thing i also wanted to DIY was a programmer, and I wasn't successful at it. I've decided to re draw the programmer, so if anyone sees any problems with it let me know. (i the older one i messed up the clock circuit and maybe this was why it was acting strangely)
Schematic_TR_Programmer_2022-12-10.png
Schematic_TR_Programmer_2022-12-10.png (81.87 KiB) Viewed 3914 times

if you guys find any mistakes let me know!

Who is online

Users browsing this forum: Google [Bot] and 85 guests