Left here for archival purposes.

User avatar
By Hans174
#12675 I flashed the latest integer version of the LUA nodeMCU firmware (nodemcu_integer_0.9.5_20150318).

The LUA program that runs on the chip measures every 15 minutes some things over the I2C bus and writes the results (18 Bytes) in a file. After about 40 cycles (10 hours) the system crashed if a dofile command is issued. The chip then draws a steady current of ca. 30 mA. There is no access over the serial interface possible. Only a power down/up brings the chip back to life.

I am clueless what to do. Any tips or hints?
User avatar
By cal
#13216 Moin,

are you able to speedup the crash by using e.g. a shorter timer period without changing too much in the code?
If possible create an example without using i2c then?
A reproducable example as small as possible would be helpful.
Have a console open on crash. Maybe you get a "wdt reset" (don't ask me what this means ;-)
If I get those only a reset does help.

Carsten


Hans174 wrote:I flashed the latest integer version of the LUA nodeMCU firmware (nodemcu_integer_0.9.5_20150318).

The LUA program that runs on the chip measures every 15 minutes some things over the I2C bus and writes the results (18 Bytes) in a file. After about 40 cycles (10 hours) the system crashed if a dofile command is issued. The chip then draws a steady current of ca. 30 mA. There is no access over the serial interface possible. Only a power down/up brings the chip back to life.

I am clueless what to do. Any tips or hints?
User avatar
By jankop
#13405 Here is short program init.lua for testing wake up from deep sleep. I am testing it with NodeMCU 0.9.5 build 20150318. It crashed about 1,5 hours after run.
Code: Select alltimup=tmr.now()

--define sleep
function sleep()
    tmr.stop(1)
   print("Wake up run "..string.format("%.2f",(tmr.now()-timup)/1000000 ).." s")
   node.dsleep(60*1000000)
end

tmr.alarm(1,500, 1,
function()
   print("Uaaaaah.... I'm ready!!!")
   tmr.stop(1)
end)

tmr.alarm(2,5000, 1,
function()
   sleep()
end)