Second hand built prototype fails to boot load when first prototype worked.

don.vukovic
Posts: 31
Joined: Tue Mar 21, 2017 3:40 am

Second hand built prototype fails to boot load when first prototype worked.

Postby don.vukovic » Sat May 27, 2017 1:15 pm

I have hand built two prototypes using two ESP32-WROOM modules.
The first prototype used a Spark Fun FTDI serial module: https://www.sparkfun.com/products/13746
The ESP32 is powered from the USB port regulator.
I modified the USB module by cutting the trace from CTS and strapping the RTS pin to it.
I hand built the two npn transistor boot/reset circuit on to the prototype board.

The second prototype was built using a CH340G and an extra AP2112-3.3 regulator to power the ESP32.
I also hand built the two npn transistor boot/reset circuit on that prototype board.

I can load code from the Arduino IDE on the FTDI prototype,
but not the CH340G prototype.

The second unit gets an error:
A fatal error occurred: Failed to enter compressed flash mode. Only got 1 byte status response.

Can someone help me decode this error and how I might troubleshoot and fix this.

Thanks
Don

don.vukovic
Posts: 31
Joined: Tue Mar 21, 2017 3:40 am

Re: Second hand built prototype fails to boot load when first prototype worked.

Postby don.vukovic » Sat May 27, 2017 10:30 pm

I found a comment somewhere that stated if I set the "Upload Speed: 115200", things would work.

I did and it now works.

I can auto-boot the ESP32 and load code.

I am wondering if my prototyping skills are a little nosier then it should be.

Don

don.vukovic
Posts: 31
Joined: Tue Mar 21, 2017 3:40 am

Re: Second hand built prototype fails to boot load when first prototype worked.

Postby don.vukovic » Tue Jun 06, 2017 4:36 pm

I have found another ESP32 board that uses the ch340g USB to UART chip.
http://www.ebay.com/itm/252956833758

This board also has the problem that in the Arduino IDE v1.8.2, the maximum baud rate is 115200.
Downloads fail at 921600 and 51200 baud.

So my prototyping skills are no longer in question.

Can anyone shed some light on why this is a problem ?

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: Second hand built prototype fails to boot load when first prototype worked.

Postby ESP_igrr » Tue Jun 06, 2017 5:14 pm

Does ch340g driver actually support these high baud rates? I never got ch340g working higher than 230400...

don.vukovic
Posts: 31
Joined: Tue Mar 21, 2017 3:40 am

Re: Second hand built prototype fails to boot load when first prototype worked.

Postby don.vukovic » Tue Jun 06, 2017 5:47 pm

I have seen several data sheets and they say:
CH340 supports common
baud rate: 50,75,100,110,134.5,150,300,600,900,1200,1800,2400,3600,4800,9600,14400,19200,28800,
33600,38400, 56000,57600,76800,115200,128000,153600,230400,460800,921600,1500000,2000000 and so
on. The baud rate error of serial transfer signal is less than 0.3%, and permission baud rate error of serial
receive signal is not less than 0.2%.


https://cdn.sparkfun.com/datasheets/Dev ... 340DS1.PDF

So the chip must be able to handle those higher baud rates.
The Windows driver I can not comment on.

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: Second hand built prototype fails to boot load when first prototype worked.

Postby ESP_krzychb » Tue Jun 06, 2017 6:00 pm

This board features CH340 - https://www.olimex.com/Products/IoT/ESP ... e-hardware
  • * On Windows 7 I am able to upload it at 921600. EDIT: 2000000
    * The maximum upload baud rate I can get with Linux is 230400.
At 921600 with Linux (Ubuntu 16.04 LTS) it fails as follows:

Code: Select all

esptool.py v2.0-beta3
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-beta3
Connecting........___
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...

A fatal error occurred: Timed out waiting for packet header
/home/krzysztof/esp/esp-idf/components/esptool_py/Makefile.projbuild:52: recipe for target 'flash' failed
make: *** [flash] Error 2
In both cases I used the same short 30cm USB cable.

EDIT:
  • * After seeing eye opening post by @don.vukovic I have checked again upload at 2000000 baud and it works on Windows. Somehow I assumed that 921600 is the maximum it may get. Thanks @don.vukovic!
    * For Linux I have only tried standard baud rates available in menuconfig

don.vukovic
Posts: 31
Joined: Tue Mar 21, 2017 3:40 am

Re: Second hand built prototype fails to boot load when first prototype worked.

Postby don.vukovic » Tue Jun 06, 2017 6:23 pm

Windows 7 64-bit

Arduino: 1.8.2 (Windows 7), Board: "ESP32 Dev Module, 80MHz, 921600, None"

Build options changed, rebuilding all
Archiving built core (caching) in: C:\Users\Donald\AppData\Local\Temp\arduino_cache_353134\core\core_espressif_esp32_esp32_FlashFreq_80,UploadSpeed_921600,DebugLevel_none_730296ffe7e331e221748d7234e0dc99.a
Sketch uses 118186 bytes (11%) of program storage space. Maximum is 1044464 bytes.
Global variables use 9760 bytes (3%) of dynamic memory, leaving 285152 bytes for local variables. Maximum is 294912 bytes.
esptool.py v2.0-beta3
Connecting....
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...

A fatal error occurred: Timed out waiting for packet content
A fatal error occurred: Timed out waiting for packet content

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


OK, does anyone else see this problem ?

Who is online

Users browsing this forum: No registered users and 68 guests