Timers cause exceptions
Posted: Tue Aug 04, 2015 5:09 am
Hello,
I'm having trouble using any of the timers available to the ESP. I have tried the software timer described in the SDK documentation and the Ticker lib available for the Arduino IDE (which I assume uses the same functions) - both throw:
I have also tried multiple examples and short commands like prints to serial work fine, however functions that take longer to execute seem to trigger the hardware watchdog (is that what exception code 9 stands for?). What seems strange to me is that I have executed the exact same function in the main loop without any resets, so it seems logical to me that if it worked in main loop it should work in timed interrupts.
So I guess my question is if I am supposed to turn off the hardware wdt (is it even possible?) when executing the callback function, or is there something else I should be doing to run anything that takes more than 3ms to execute?
PS any information about the wdt would be appreciated
I'm having trouble using any of the timers available to the ESP. I have tried the software timer described in the SDK documentation and the Ticker lib available for the Arduino IDE (which I assume uses the same functions) - both throw:
Code: Select all
Exception (9):
epc1=0x401014ea epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000003 depc=0x00000000
ctx: sys
sp: 3ffffd90 end: 3fffffb0 offset: 01a0
>>>stack>>>
3fffff30: 00000001 00000000 402014c0 000000c8
3fffff40: 3ffea080 40204718 3ffeb1b0 000135ec
3fffff50: 3ffe864c 3ffe9e7c 3ffeb1b0 4020233d
3fffff60: 3fff5148 00000000 00000000 3fff1c60
3fffff70: 00000000 40211c3b 3ffec09c 3ffebd10
3fffff80: 3fffdcb0 00000000 3fff4e78 40211c3b
3fffff90: 40211c8e 3fffdab0 00000004 40201bad
3fffffa0: 40000f49 40000f49 3fffdab0 40000f49
<<<stack<<<
ets Jan 8 2013,rst cause:4, boot mode:(1,2)
wdt reset
I have also tried multiple examples and short commands like prints to serial work fine, however functions that take longer to execute seem to trigger the hardware watchdog (is that what exception code 9 stands for?). What seems strange to me is that I have executed the exact same function in the main loop without any resets, so it seems logical to me that if it worked in main loop it should work in timed interrupts.
So I guess my question is if I am supposed to turn off the hardware wdt (is it even possible?) when executing the callback function, or is there something else I should be doing to run anything that takes more than 3ms to execute?
PS any information about the wdt would be appreciated