for example, running esptool's chip_id command:
Code: Select all
esptool.py --port COM3 --no-stub chip_id
Code: Select all
esptool.py v2.4.1 Serial port COM3 Connecting........_____....._____....._____....._____....._____....._____....._____ A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x08)
I scoped out the signals and observed very strange transitions on the Reset and GPIO0 pins, shown in the next two images. These scope captures reveal a showstopper problem in the boards shipped to me: GPIO0 is HIGH when Reset transitions to High. ESP32 devices will only enter the bootloader when GPIO0 is LOW when Reset goes High. This signal behaviour results in the ESP32 device resetting rather than entering the bootloader. I used the scope's RS232 decode feature to confirm this - I see the MicroPython REPL prompt rather than the bootloader message. The esptool needs the ESP32 to enter the bootloader for commands to work. Neither of these boards will enter the serial bootloader using the esptool.
Using the same setup, I used the esptool to read the chip_id from a WEMOS D1 mini, an ESP8266 device. This device entered the bootloader, with the captured traces showing the expected behaviour. The chip_id was returned by esptool. Here are the WEMOS D1 Mini signals. Both the new Lolin branded boards and the Wemos D1 mini use the CH340 USB to Serial device. The Wemos D1 mini worked with the esptool, so my CH340 driver installation on windows would appear to be OK. Looking at the schematics, all 3 boards show the same autoreset circuitry, using RTS and DTR. Perhaps the Lolin board layouts were done incorrectly, or maybe they have incorrectly placed components?
The same test using an Adafruit ESP32 Huzzah feather also returned chip_id with esptool. Except, unfortunately, the Adafruit board does not breakout the GPIO0 or Rx/Tx signals, so it's not easy to capture the transitions with a scope.
I'm stumped. MicroPython is on these devices, so somehow it was flashed to the ESP32s at the factory. But, in my environment I can't get the esptool working with them.
Any ideas before I ask Aliexpress for a refund? thanks!