Getting Fatal exception 0(IllegalInstructionCause)

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
pushkarp
Posts: 3
Joined: Mon Apr 23, 2018 7:38 pm

Getting Fatal exception 0(IllegalInstructionCause)

Post by pushkarp » Thu Aug 02, 2018 5:38 am

0
down vote
favorite
My ESP device (Schematic: https://i.stack.imgur.com/nlYb8.jpg) is programmed to operate in two modes:
1. Configuration mode, in which it behaves as an AP, and starts a web server listening for connections. This is used to configure HomeWifi SSID/pwd into ESP.
2. Once configuration is done, the ESP reboots and starts behaving as a STA and connects to Home WiFi

Each time I want to re-configure the device, there is a reset button connected to GPIO 13. It brings the device back into configuration mode.

My ESP device with micropython code flashed is going into the following exception after several "Reset/Reconfiguration" operations. A reset/reconfiguration operation is when the reset button on GPIO 13 is pushed. First 8-10 reset/reconfiguration happen fine, the web server works well and configuration of Home WiFi happens fine, but after that, I start to get these once device goes into configuration mode (happens 50-60% of the times):

Fatal exception 0(IllegalInstructionCause): �pc1=0x40209f68, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000 ets Jan 8 2013,rst cause:2, boot mode:(3,7)

The exceptions start to manifest more prominently once I connect mobile device to the ESP AP. If I reflash the binary and start from scratch, the problem does not happen in initial 8-10 re-configuration cycles. However, it then starts to appear.

This makes me feel this seems to be a code level issue. I'm using all the capacitors to ensure there is no spike/ripple. If it was an issue, then things should not have worked fine for first 8-10 re-configuration cycles. Correct if I may be wrong.

Is there a way to find out what that address in pc corresponds to? Or is there something else I should look at?

Post Reply