-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
esptool fails to write to ESP8266 with PUYA flash chip - The chip stopped responding (ESPTOOL-699) #890
Comments
Hi @wibbit. Are you able to flash it if you add EDIT: I sorry, for some reason I haven't read everything. |
Hi @wibbit, I have tried reproducing this with several ESP8266's, esptool v4.5.1, and these bin files (please correct me if these binaries are not the right ones). I was not able to reproduce the failure:
Could you please try the following:
|
Two more things to try:
You can create an
This custom configuration will then get loaded by esptool and will allow you to tune it for your environment. Can you please try increasing some of the timeouts and see if that helps? |
I've not yet upgraded/downgraded esptool, however increasing the timeout from 3 to 30 allowed the process to finish without including --no-compress. I'd increased in increments of 5, with 25 still failing. I don't have another non-wemos based ESP8266 board to try with, but I can certainly go ahead and try out the other versions, probably Wednesday evening. |
Thanks for the investigation! |
Working with some people on a Discord channel, we think we have narrowed this down to the flash chip that is present. The v3's (and good v4's) tested come with a T25S32 chip whereas the problematic v4's come with a puya branded chip, indicative throughput differences below. So, I assume the problem is that the CPU on the card is waiting on IO, and esptool eventually times out. This is obviously an issue with the card, I'm not sure if there is anything in esptool that could be done to notify/warn a user, I'll leave this down to you lot to decide, as you obviously have a FAR more intimate understanding of the ecosystem then I do. |
Nice investigation! Maybe we could detect the faulty flash chip in esptool and at least provide a warning or a note. |
Good chip Problematic chip |
OMG... I really hoped those awfull Puya chips would be a one-time only disaster with their 1M chips. Do you know if those 4M units also need the 'PUYA' patch for ESP8266, which essentially does read the entire sector, alter it in memory and write it back, because those chips actually write what you tell them to write, instead of only turning a 1 into a 0 like normal flash chips do. |
@wibbit I will try to get my hands on one of these devkits with Puya flash chips and investigate. |
So I have ordered a batch of devkits, that were supposed to have the problematic PUYA flash chips. Unfortunately, they all arrived with the good stuff - I guess the manufacturer knows about the issues and maybe started sourcing only the good flash chips. |
Well that's not infuriating at all, i wonder if I can get a refund and a replacement product sent out. Is there any thing I can do to provide additional information? |
Hi there Thank you so much for this hint. I stuck at the same problem and also tried every baud rate, different com ports and PCs. The option --no-compress made it work. I have uploaded the files with the actual esptool version v4.6.2. @radimkarnis I have ordered multiple v4 boards with the problematic chip and I would like to conribute one chip to you if it helps others not wasting hours of playing try and error. |
@Sbsin-Ks Thanks for the heads up and the
That would be appreciated, I didn't manage to get my hands on one of these. On the other hand, we didn't get any more reports of issues with these chips in the wild. Do you reckon adding a warning to esptool would be useful? |
Operating System
Fedora38
Esptool Version
esptool-4.5.1-2.fc38.noarch
Python Version
https://packages.icinga.com/epel/8/release
Chip Description
ESP8266
Device Description
Wemos D1 Mini v4
Hardware Configuration
No response
How is Esptool Run
CLI
Full Esptool Command Line that Was Run
esptool write_flash 0x0 OTGW-firmware-0.10.2+50c3ed2.ino.bin 0x200000 OTGW-firmware-0.10.2+50c3ed2.littlefs.bin
Esptool Output
More Information
I am able to always successfully flash the ino file, however, flashing the littlefs always failed.
I tried pretty much all baud rates from 9600 up to 115200, the errors would sometimes vary, including stating an "A serial exception error occurred: Write timeout".
This was tested with 2 v4 cards, multiple USB cables, multiple ports, and multiple machines.
I eventually got this to work (100% of the time), when including the --no-compress flag to the write_flash subcommand.
I've spoken to someone who's not had an issue writing to this hardware, however, they are using esptool v2.8
Though I've got this working, there was no apparent output to suggest --no-compress could resolve the issue, and as a new user this was a very painful experience.
Posting here so that.
a) the tooling can some how be updated to address this failure scenario.
b) some one searching for the same issue, may find this bug report, and the solution that worked for me.
Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: