Wemos D32 Pro doesn't work - problem with CH340?!?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
lukesky333
Posts: 44
Joined: Fri Sep 02, 2016 4:07 pm
Location: Austria

Wemos D32 Pro doesn't work - problem with CH340?!?

Post by lukesky333 » Fri Apr 12, 2019 11:28 am

Hi,

I've got today my Wemos D32 Pro board and it seems, that the CH340 doesn't work. Both computer (Linux and Windows) don't recognize the board - nothing.

I tried to connect the board via GPIO1 (TX), GPIO3 (RX) and GND. After pushing reset I can see "cryptic" characters at my serial console but nothing readable - ...and i tried all baud rates.

Does anybody know a solution for my problem? Hope to get it running without using the onboard CH340 USB serial adapter...

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by Roberthh » Fri Apr 12, 2019 12:00 pm

When you tell "Both computer (Linux and Windows) don't recognize the board - nothing.", does that mean that not /dev/ttyUSBx appears on Linux when you connect it? That is indeed strange since the CH340 worked for me on Linux always without problems. Did you try simple means like changing the USB cable? If that does nto help I would indeed assume that thereis a problem with the CH340.

As for the cryptic characters: Try to set the baud rate to 74880 on Windows (do not forget to set flow control off in Putty). The initial boot log may come at that baud rate.

lukesky333
Posts: 44
Joined: Fri Sep 02, 2016 4:07 pm
Location: Austria

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by lukesky333 » Mon Apr 15, 2019 7:19 am

Roberthh wrote:
Fri Apr 12, 2019 12:00 pm
When you tell "Both computer (Linux and Windows) don't recognize the board - nothing.", does that mean that not /dev/ttyUSBx appears on Linux when you connect it? That is indeed strange since the CH340 worked for me on Linux always without problems.
Yes... There is no new device after connecting the board - at Windows and at Linux.
Roberthh wrote:
Fri Apr 12, 2019 12:00 pm
Did you try simple means like changing the USB cable? If that doesnt help I would indeed assume that thereis a problem with the CH340.
Yes, I did. The problem is the same. A friend of mine found out, that the CH340 didn't work. Is it possible to "bypass" the CH340 and to connect directly to the onboard serial? I tried it, but without success...
Roberthh wrote:
Fri Apr 12, 2019 12:00 pm
As for the cryptic characters: Try to set the baud rate to 74880 on Windows (do not forget to set flow control off in Putty). The initial boot log may come at that baud rate.
Also with 74880 baud its the same - only cryptic characters.

Any idea what I can try next? I hope I can get it running - it's a long time to wait for the new one from China. ;-)

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by Roberthh » Mon Apr 15, 2019 7:30 am

If you connect another USB/UART bridge to the board, pull GPIO0 low and push reset, do you get the Boot loader message at 115200 baud?
And did you disable all flow control?

lukesky333
Posts: 44
Joined: Fri Sep 02, 2016 4:07 pm
Location: Austria

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by lukesky333 » Mon Apr 15, 2019 8:08 am

Roberthh wrote:
Mon Apr 15, 2019 7:30 am
If you connect another USB/UART bridge to the board, pull GPIO0 low and push reset, do you get the Boot loader message at 115200 baud?
And did you disable all flow control?
I tried a simple USB-Serial-Adapter (Prolific) and connected it to RX, TX and Ground. What do you mean with "pull GPIO0 low"?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by Roberthh » Mon Apr 15, 2019 8:27 am

Connect GPIO0 to GND and push the reset button. Then the ESP32 should be in bootloader mode and issue a corresponfing message. You have to go through that mode anyhow to upload the MicroPyhton firmware. This mode change is normally done through a two transistor logix on the board, controlled by the PC and espressiv bootloader with the modem control lines RTS and DTR.
EDIT: Since you are using an external adapter, you might have to connect TX(board) -> RX(Adapter) and RX(board) -> TX(Adapter). The latter may be a problem, since then the output of the adapter and the CH340 are fighting for driving the RX pin of the ESP32. You might have to remove the TX pin of the CH340 (Pin 2 of the 16 Pin package).

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by Roberthh » Mon Apr 15, 2019 8:45 am

I've seen an insteresting note in the CH340 data sheet about PIN15, which controls the polarity it RX. It should be unconnected and have a low value. It the value is high (to be checked with a voltage meter), then the polarity is wrong. That may happen as a production fault, since it is adjacent to Vcc at Pin 16.

lukesky333
Posts: 44
Joined: Fri Sep 02, 2016 4:07 pm
Location: Austria

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by lukesky333 » Mon Apr 15, 2019 8:46 am

Roberthh wrote:
Mon Apr 15, 2019 8:27 am
Connect GPIO0 to GND and push the reset button. Then the ESP32 should be in bootloader mode and issue a corresponfing message. You have to go through that mode anyhow to upload the MicroPyhton firmware. This mode change is normally done through a two transistor logix on the board, controlled by the PC and espressiv bootloader with the modem control lines RTS and DTR.
EDIT: Since you are using an external adapter, you might have to connect TX(board) -> RX(Adapter) and RX(board) -> TX(Adapter). The latter may be a problem, since then the output of the adapter and the CH340 are fighting for driving the RX pin of the ESP32. You might have to remove the TX pin of the CH340 (Pin 2 of the 16 Pin package).
Still the same, only cryptic characters. The cut at CH340 is only needed for uploading the MicroPython firmware, right? To see "normal" output at boot should work with fully connected CH340.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by Roberthh » Mon Apr 15, 2019 8:51 am

The cut at CH340 is only needed for uploading the MicroPython firmware, right?
Yes. But if you do not get the boot message, then there is a problem with the ESP32.

lukesky333
Posts: 44
Joined: Fri Sep 02, 2016 4:07 pm
Location: Austria

Re: Wemos D32 Pro doesn't work - problem with CH340?!?

Post by lukesky333 » Mon Apr 15, 2019 8:56 am

Roberthh wrote:
Mon Apr 15, 2019 8:51 am
The cut at CH340 is only needed for uploading the MicroPython firmware, right?
Yes. But if you do not get the boot message, then there is a problem with the ESP32.
I get a boot message, but it's unreadable like with a wrong baud rate.

Post Reply