Dear Gordon I've done some tests with the new watchdog function. My testcode is the following (right side):
doreset=false; setInterval(function() { if(doreset===false) { console.log('kick'); E.kickWatchdog(); } },20000); E.enableWatchdog(25,false); save();
You will see in the console every 20 seconds 'kick'. E.kickWatchdog is called. Then please set the var doreset to true:
doreset=true;
After a few seconds the pico will reset. Then please reconnect to the console. You will see the output of 'kick' again.
Please give the variable doreset again the value of true.
On the console 'kick' messages are gone. E.kickWatchdog is not called anymore.
But the pico does not reset after more that 25 seconds. Please see the attached screenshot.
Do I understand something wrong ? It only resets once ?
Thanks
Sacha
1 Attachment
@Sacha started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Dear Gordon
I've done some tests with the new watchdog function. My testcode is the following (right side):
doreset=false;
setInterval(function() { if(doreset===false) { console.log('kick'); E.kickWatchdog(); } },20000);
E.enableWatchdog(25,false);
save();
You will see in the console every 20 seconds 'kick'. E.kickWatchdog is called.
Then please set the var doreset to true:
After a few seconds the pico will reset. Then please reconnect to the console.
You will see the output of 'kick' again.
Please give the variable doreset again the value of true.
On the console 'kick' messages are gone. E.kickWatchdog is not called anymore.
But the pico does not reset after more that 25 seconds. Please see the attached screenshot.
Do I understand something wrong ? It only resets once ?
Thanks
Sacha
1 Attachment