You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a VM that I'm trying to set up with a static/encapsulated development environment for some ESP32 work and I'm having a hard time getting esptool to talk correctly to my ESP32. I have USB pass-through enabled on the host OS (another Debian 9.6 install) so the VM can see the USB port and is able to do some signaling to the ESP32 itself, but it looks like some timing issue is in place that causes the ESP32 to reboot before esptool can run its commands. In the capture below, you can see the ESP32's bootloader dumping info to the console while esptool is trying to sync to the chip. I tried extending some of the sleep calls in esptool to see if that would help, but I've had no luck thus far; maybe I'm just not hitting the correct timeout value?
This is being run in a QEMU/KVM virtual machine, so timing is probably way worse than if I was running this on a native Linux box.
This is the root cause here. Unfortunately the RTS & DTR timing for the GPIO0 & EN pins, combined with the automatic reset circuit, require quite tight timing. esptool.py has to send two separate commands - one to assert DTR (GPIO0 low) and one to release RTS (EN high) to boot the chip in download mode. If there is too long of a delay between them, the automatic reset circuit sees DTR & RTS asserted together and boots the ESP32 into normal running mode.
Including some workarounds for different platforms (to udpate DTR & RTS simultaneously). However there's nothing which doesn't require significant modifications of pyserial.
Another workaround that will work is to hold down the BOOT button on Dev Kit C when flashing.
Thanks for the information! I guess with this in mind, I'll go ahead and close the issue. I'll just stick to doing flash operations using the host OS rather than the guest.
Summary
I have a VM that I'm trying to set up with a static/encapsulated development environment for some ESP32 work and I'm having a hard time getting esptool to talk correctly to my ESP32. I have USB pass-through enabled on the host OS (another Debian 9.6 install) so the VM can see the USB port and is able to do some signaling to the ESP32 itself, but it looks like some timing issue is in place that causes the ESP32 to reboot before esptool can run its commands. In the capture below, you can see the ESP32's bootloader dumping info to the console while esptool is trying to sync to the chip. I tried extending some of the sleep calls in esptool to see if that would help, but I've had no luck thus far; maybe I'm just not hitting the correct timeout value?
General Information
Full esptool.py command line as run:
./esptool.py --trace read_mac
Full output from esptool.py (please copy and paste all lines of output)
What is the expected behaviour?
The esptool reads MAC address of ESP32 chip.
Do you have any other information from investigating this?
This is being run in a QEMU/KVM virtual machine, so timing is probably way worse than if I was running this on a native Linux box.
The text was updated successfully, but these errors were encountered: