-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
I'm having a very weird problem that I know is not related to the code I'm running. I have a bunch of ESP32 Dev kits I'm using for a project, they're made by doit.am, and about half of them refuse to boot into run mode unless I press the EN/FLASH button. They do this regardless of the code, I've checked with several different example sketches and they all exhibit the same issue. I need a fix for this as these will be deployed to a customer very soon. I never noticed this issue because my test modules weren't doing it, but I don't have enough time to get different modules. Furthermore the doit.am boards are a different pinout than pretty much every other ESP32 module, so I'd have to redesign my carrier boards and that's not possible. So if anyone can help me I would greatly appreciate it.
I'll run through what I have seen so far.
- Plug in usb cable
- Put ESP32 into programming mode by pressing BOOT and EN at the same time
- Load any sketch or example code
- ESP32 sits there and does nothing until you press EN/RESET.
- Once reset manually, ESP32 works normally.
- When next powered up, boards sit there and do nothing until you press EN/RESET
- This mode is not programming mode as I still have to press BOOT and EN at the same time to load sketches - otherwise esptool.py times out.
I have noticed a great deal of variation in how the boards act. All were bought at the same time and are presumably the same 'batch'. I have 25 of them, and about half of them have one form or another of this issue. Some of the boards are able to be reset by the USB serial line, others are not and must be put into programming mode manually. Others still work normally as one would expect.
I had them running on a benchtop power supply with an amperage reading, so I could tell something was up when they weren't pulling enough milliamps. When I press EN, the current consumption goes up to normal levels and the chips come alive and do their thing flawlessly. Also, rapidly power cycling them (and I mean very rapidly - less than 100 ms) will break them of their spell when in this low-power state and cause them to boot normally.
On the boards that will automatically load the program via the USB (that is to say, without having to manually put the boards in program mode) , this 'mode' almost appears to be programming mode, but on some of the other boards that require to be manually put into programming mode, I noticed that even when in this post-boot mode, they wouldn't accept a sketch unless put into programming mode manually again.
So I'm stumped. I technically have a workaround - to rapidly powercycle all boards, but that is a very last resort to have to tell the customer to do this.
I suspected the strapping pins were at play here, but I double and triple checked them and tied GPIO0 and GPIO2 to 3.3V and it has no effect whatsoever on this issue.
If anyone has any ideas, I would appreciate them as I'm kind of at my wits end.