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

Hello Everyone,

i’m encountring a strange restarting loop with my NodeMCU.
the exact code used to work 2 days ago before updating PIO and espressif8266.

serial output(Keeps Looping same O/P):

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

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

Try to open PlatformIO IDE Terminal and run pio run -t erase. Flash board again and reconnect.

1 Like

Ivan, thanks for the fast reply
i’ve tried that now and the problem is still unsolved

Does every code you flash with that framework crash? Also simple ones?

1 Like

Most likely there has been a change in the the ESP8266 core or one of the libraries you are using that is causing excessive delays in the code, hence the resets. You might need to experiment with disabling bits of the code until you can work out what part is causing the holdup, or start littering your code with yield(); in order to let the ESP8266 do whatever housekeeping it needs to do and prevent lockups.

pfeerick, thanks for your reply, Unfortunately this didn’t work,

i’ve tried uploading my code using an older laptop that hasn’t yet updated PIO, and everything is working pretty good.
i just can’t figure out what the problem is…

Any Ideas?

One problem is I couldn’t spell yield() properly! :man_facepalming:

Well, going back to an older version of PIO (and hence the ESP8266 core) suggests it is a change in the core or a library.

Try one of the following versions of the esp8266 platform in your platformio.ini:
platform = espressif8266@2.1.1 #ESP8266 Core v2.5.1
platform = espressif8266@2.0.4 #ESP8266 Core v2.5.0
platform = espressif8266@1.8.0 #ESP8266 Core v2.4.2

If you get to 1.8.0 and it still isn’t working, unless you think you were running a really old version of the esp8266 core, it’s probably a library update.

1 Like

hahahahahahahaha :rofl::rofl: Nevermind who doesn’t misspell :man_facepalming:

I’ve been trying the library scenario since yesterday, the problem it’s a big project, commenting functions and figuring out which library has the issue.

thanks for that platform.ino trick, i didn’t know i can do this before :smiley:

1 Like

:laughing:

If you get to thinking it’s a library update, you can do the same thing for libraries… @version in the lib_deps reference for it… that’s the real beauty of platformio… you can lock in specific versions of platforms and libraries for you projects, or even have two different environments in the same project… the ‘stable’ version locked one, and the ‘bleeding edge latest and greatest’ … etc.

1 Like

i’ve figured out where the problem is :smiley:
it’s in the interrupt code section, but i’m pretty sure it has no problem :confused:
the whole exact code is working fine using the older laptop…

just commenting those lines solved the restarting issue…
but ruined all my code as it depends on interrupts

Snippet:
// attachInterrupt(digitalPinToInterrupt(D6), Motion_Interrupt_PIR1, CHANGE);
// attachInterrupt(digitalPinToInterrupt(D7), Motion_Interrupt_PIR2, CHANGE);

1 Like

are these functions marked with ICACHE_RAM_ATTR so that they are placed in IRAM?

1 Like

BIG Thanks, That Solved the problem :smiley:

1 Like