Page 1 of 1
What is wrong?
Posted:
Thu Jun 25, 2015 4:49 am
by zsocy
Hi,
A write short code:
a=1; while 1 do a = a + 1 ; tmr.delay(100000) end
Run about 4-5 sec, and after occure reset.
Why?
Re: What is wrong?
Posted:
Thu Jun 25, 2015 6:02 am
by tytower
I suspect the watchdog timer is cutting in . Perhaps try some Serial.println's to get a serial window . If its wdt thenit will be obvious from the terminal output
Re: What is wrong?
Posted:
Thu Jun 25, 2015 7:31 am
by zsocy
Hi tytower,
You are right! Thanks. The watchdog timeout occured.
I wrote 2 test:
while 1 do print('a') end -- test 1 - RESTART about 3-4 sec
while 1 do print('a') ; tmr.wdclr() end -- test 2 - NO RESTART
I do not understand yet. So far, there was no such error.
Re: What is wrong?
Posted:
Sat Jul 04, 2015 12:26 pm
by kolban
I notice that in 1.2.x there are a couple of new functions called:
Code: Select allsystem_soft_wdt_stop()
system_soft_wdt_restart()
These may be able to suspend and resume the timers.