1

I have a sketch running on a number of ESP12F modules (AiThinker). They can work for months on end, can be power cycled, can be moved around, etc. It is a complex sketch with multiple parts and is still using the 2.4.2 core.

What I've seen happen on an increasing number of these is that the modules can get stuck in some kind of boot loop, that I am suspecting is the hardware watchdog kicking in.

On resetting a faulty device the following is printed to the debug port at 74880:

ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld

I think this equates to:

  • External pin reset or wake up from deep sleep
  • Booting from flash
  • SDIO High Speed V2 IO / UART1 (I have no been able to find any explaination to what this actually means, and many posts reccomend essentially ignoring!)

About 1.5 seconds later, the following is printed at 74880:

ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld

The only difference here I think is that (3, 7) has changed to (3,6) which equatest to:

  • SDIO Low Speed V1 IO / UART1 (again, no idea what this means)

After this, every 5.5 seconds (roughly) the following is printed, this time at 115200:

ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld

This is the same ouput as before, just output at a different baud rate.

This boot loop will continue indefinitely (I left one in this state for days to see if anything happened). Power cycling it just takes it back to the first debug messages, then just sits back in the boot loop.

No serial output from my actual sketch is ever seen. This, along with the 5.5ish second loop leads me to think that the hardware watchdog is triggering and not even allowing my sketch to run. Does that sound right?

This currently seems to be affecting around 5 out of 50 devices. Most are happily running along without a care. The affected devices can be reflashed, seemingly successfully, and will run as they should, but after about 5-10 power cycles they fall back into this loop. It's like the hardware has been permanently damaged and can never be relied on again!

Has anyone seen this behaviour before? What are people's opinions on what might have caused this? Can bad code permanently corrupt the hardware in the way I think I am seeing?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.