New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WeMos D1 Mini works at baud rates 460800 & 1000000 but not 921600 (ESPTOOL-113) #435
Comments
Interesting: (cc @earlephilhower as this may be useful info.) |
I can also reproduce the Linux: ./esptool -cd nodemcu -cb 921600 -v -cp /dev/ttyUSB0 -cf ../esptool/test/images/fifty_kb.bin
Linux: esptool.py --chip esp8266 --port /dev/ttyUSB0 --baud 921600 write_flash 0x0 images/fifty_kb.bin
Windows: python esptool.py --chip esp8266 --port COM7 --baud 921600 write_flash 0x0 test/images/fifty_kb.bin
Windows: python esptool.py --chip esp8266 --port COM7 --baud 1000000 write_flash 0x0 test/images/fifty_kb.bin
|
Thanks for confirming @pfeerick . Interesting both work with the Windows driver. Oddly, the Linux driver code suggests 921600 should be perfectly accurate and 1000000 will have a small baud rate error: For 921600, For 1000000, It certainly merits further investigation. :) |
There is a known issue with the high speed baud rate of 921600 when will use the Python epstool (esptool.py) on targets with the CH341 USB-to-RS232 converter, see: espressif/esptool#435 Signed-off-by: Stephan Linz <linz@li-pro.net>
There is a known issue with the high speed baud rate of 921600 when will use the Python epstool (esptool.py) on targets with the CH341 USB-to-RS232 converter, see: espressif/esptool#435 Signed-off-by: Stephan Linz <linz@li-pro.net>
FTR, recent linux kernels (5.5+) has some fixes in ch341 driver w.r.t baudrate setting; I've played with backported ch341 module, it improved things a bit for me (top speed was 500k before, 576k after; still no luck with 921600/1M/1152k/1.5M; fwiw, |
I have exactly the same problem with a CH340G and an ESP32, including the error 0xE0, although often it instead says timeout waiting for packet content or packet header. |
do they fixed the 921600 baud rate problem? |
I don't have any issues with 460800, which is what the Arduino ESP8266 core remaps anything above 460800. So I generally don't go above that, unless I'm on a hardware/OS combination that will take the higher baud rate... which is becoming increasingly less often as I do more and more OTA update/programming instead. |
@pfeerick thanks for the answer, it's always a pleasure to read your posts on GitHub 😃 I think that there is something else in Arduino ESP8266 since I'm using it I think that Arduino ESP8266 can accept values greater than 460800 now. |
but is this a problem of the ESPTool? does a sketch work well at 921600 ? |
I tested this extensively with both the WeMos D1 Mini and Mini Pro (CH340G/C) and couldn't reproduce the issue on Windows and Linux. All mentioned baudrates work fine. This leads me to believe this is not an esptool issue (more likely a CH341/Linux one). |
Full esptool.py command line as run:
(as run by test_esptool.py)
Full output from esptool.py (please copy and paste all lines of output)
What is the expected behaviour?
As noted in the Arduino ESP8266 repo, flashing this board with 921600bps works in esptool-ck:
And using 460800bps serial works fine in esptool.py as well.
Do you have any other information from investigating this?
Probably the "switch to new baud rate" has a bug, or actually works less well on some devices (or with some drivers?).
Further investigation needed. This is not high priority, as @earlephilhower notes at the linked PR esptool.py is still faster here due to the compressed upload feature (beyond a certain point, the limiting factor becomes flash erase & write times rather than serial transfer times.)
The text was updated successfully, but these errors were encountered: