ESP12. Need help translating error codes

I need help with error codes. I’ve got two identical PCBs and the ESPs are acting up. Sometimes they work sometimes not, I don’t fully understand why but here’s the serial information which may help:

EmonESP 53486
Firmware: BUILD_TAG

Exception (3):
epc1=0x40100221 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40013430 depc=0x00000000

ctx: cont 
sp: 3fff27a0 end: 3fff2b00 offset: 01a0

3fff2940:  3fff19ec 00000219 00000219 4010020c  
3fff2950:  00000484 4024feb0 000003fd 4010068c  
3fff2960:  4010589e 3fff407c 000003fd 40106e04  
3fff2970:  4022ebfe 000003fd 4024feb0 4022ec1b  
3fff2980:  3fff4504 4022ec81 3fff407c 000003ff  
3fff2990:  000003fd 3fff2a40 3fff407c 000003fd  
3fff29a0:  ffffff00 55aa55aa 0000000f 0000001c  
3fff29b0:  0000001c 000000a2 000000a2 000003ff  
3fff29c0:  4022f070 3fff407c 3fff407c 000000ff  
3fff29d0:  00000001 3fff2a60 4022f1f7 00000008  
3fff29e0:  3fff407c 000000ff 3fff2a40 00000000  
3fff29f0:  3fff413c 3fff2aa1 00000001 4022f284  
3fff2a00:  3fff2a40 3fff407c 3fffdad0 3fff1ad0  
3fff2a10:  3fff2a60 3fffa3b4 3fff407c 3fffdad0  
3fff2a20:  4022f2c0 3fff1a14 00000000 4021472c  
3fff2a30:  4020d290 00000001 3fff0cc8 4021477b  
3fff2a40:  00000000 00000145 3fff0cc8 40214a91  
3fff2a50:  00000014 00000a00 00000140 000000fd  
3fff2a60:  3fff0c00 00000000 0000001f 40214b14  
3fff2a70:  00000033 400042db 3fff2ad0 3fff1ad0  
3fff2a80:  40004b31 3fff3e3c 00000200 40206d12  
3fff2a90:  00000010 00000140 00000140 402151d0  
3fff2aa0:  402106d1 3fff1848 00000200 3fff1ad0  
3fff2ab0:  3fffdad0 3fff17f0 3fff1a14 4020a23e  
3fff2ac0:  3fffdad0 00000000 3fff1a14 40207c2e  
3fff2ad0:  00000000 00000000 00000000 feefeffe  
3fff2ae0:  feefeffe feefeffe 3fff1ac9 402153cc  
3fff2af0:  feefeffe feefeffe 3fff1ae0 40100718  

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

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

I think the indication of what’s wrong is the “ets Jan 8 2013,rst cause:2, boot mode:(3,7)”

Any thoughts?

More info…
I have previously uploaded using incorrect flash size settings, now corrected but still not working.
I uploaded using Arduino IDE 1.6.12
When I first uploaded it worked, then it didn’t, then it did again, then never again, with the error code above changing from … boot mode:(3,0)" to boot mode:(3,6)" to boot mode:(3,7)" then back to boot mode:(3,6)"

Have a look at GitHub - me-no-dev/EspExceptionDecoder: Exception Stack Trace Decoder for ESP8266 and ESP32. Unfortunately it only works in Arduino IDE but will give you the stack trace.

I met with @danbates earlier. The issue was solved by using esptool to fully wipe the chip before uploading flash and spiffs:

$ erase_flash

So I guess some old data in the ‘EEPROM’? Maybe we should add a checksum to verify the ‘EEPROM’?

I’m wondering if the first few flashes I did with an incorrect flash size setting could’ve been the cause… I had a default 512k setting but as you’ve said Jeremy it’s meant to be 4M (3M SPIFFS).

The errors continued despite the flash size settings change… yet running erase_flash and reflashing firmware and SPIFFS helped for a bit… errors would return after a couple of power cycles… however it seems that what’s resolved this has been updating ArduinoIDE to 1.8.1 (I was on 1.6.12) and reinstalling the FTDI drivers.

When power-cycling to upload SPIFFS, it was to necessary to unplug the USB to power cycle the FTDI adaptor as well as the ESP chip.

Sorted! Both prototype boards working :slight_smile: