Should reset() disable E.enableWatchdog(timeout)

Posted on
  • Wondering how to disable E.enableWatchdog(timeout), because it kicks in during code uploading even if reset before upload is marked and E.enableWatchdog(2,false) is missing upload coding?

    // code you like to upload and save 
    E.enableWatchdog(2,false)
    
    /*
    code
    */
    
    function onInit()  {
          E.enableWatchdog(2)
    /*
    code
    */
    }
    
  • Just a normal E.enableWatchdog(2) should be ok I think? That turns on 'auto' mode so Espruino will keep kicking it automatically.

    You can't turn the watchdog off once it's been turned on - it's a hardware safety thing. To stop it you need to fully reboot the device and then not run E.enableWatchdog

  • Well, that explains all the reboot during failed uploads. Better delete ".varimg" which contains an E.enableWatchdog and do E.reboot(). Thanks.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Should reset() disable E.enableWatchdog(timeout)

Posted by Avatar for MaBe @MaBe

Actions