-->
Page 1 of 2

WDT Reset for OTA with interrupts

PostPosted: Tue Jan 17, 2017 4:45 pm
by Matys
Hello There,
Im trying to get OTA working while there are interrupts implemented but im always getting WTD reset due to HW_timer

Here is my code:
https://github.com/v1ckdesigns/ESP_Dimm ... rature.ino

NoInterrupts(); and detachInterrupt() and hw_timer_set_func(0); does not seems to make any difference inside ArduinoOTA.onStart()

everything works fine if interrupts are commented out..

Regards
Matys

Re: WDT Reset for OTA with interrupts

PostPosted: Wed Jan 18, 2017 11:37 am
by Daemach
As odd as it sounds, after doing a serial upload make sure you reboot the board before attempting an OTA update. If the board is not physically rebooted, it will crash when OTA attempts to run.

Re: WDT Reset for OTA with interrupts

PostPosted: Wed Jan 18, 2017 12:09 pm
by Daemach
Following up, you actually need to remove power from the device. A standard reset won't solve the problem.

Re: WDT Reset for OTA with interrupts

PostPosted: Wed Jan 18, 2017 3:00 pm
by Matys
Yeah, im aware of that, im always doing power cycle after serial flash.
I found a workaround by adding a statement to turn off interrupts while both lights are off and handle OTA then, but still it makes me wonder why it does not work inside Arduino.onStart().