TOUT ADC value read causes WDT reboot
Posted: Thu Mar 24, 2016 3:00 am
I have ESP8266 Community version 2.1.0 installed on my Arduino IDE 1.6.7 under Windows 10.
As soon as I read adc value (not the internal VDD33 but the voltage [0-1V] on TOUT), the esp watchdog makes it rebooting.
Soft WDT reset
ctx: cont
sp: 3fff03f0 end: 3fff05d0 offset: 01b0
stack > > >
3fff05a0: 3fffdad0 00000000 3ffef4e0 4020243f
3fff05b0: feefeffe feefeffe 3ffef595 4020319c
3fff05c0: feefeffe feefeffe 3ffef5b0 40100958
< < < stack < < <
Note that doing a delay(0) just after the analogRead(A0) does not help
I read a lot of forum thread, on this github project, but also on esp8266.com, and apparently, all proposed solutions and workaround don't work in my case.
Something interresting: I flashed the latest nodemcu firmware, and doing print(adc.read(0)) give me the correct value without WDT crashing. I tried to use the same code as in file adc.c of nodemcu_firmware project, without success. There must be another problem elsewhere, and indeed, a difference between nodemcu firmware and the binary that I generate from Arduino IDE.
Could someone help me because I have no more idea.
As soon as I read adc value (not the internal VDD33 but the voltage [0-1V] on TOUT), the esp watchdog makes it rebooting.
Soft WDT reset
ctx: cont
sp: 3fff03f0 end: 3fff05d0 offset: 01b0
stack > > >
3fff05a0: 3fffdad0 00000000 3ffef4e0 4020243f
3fff05b0: feefeffe feefeffe 3ffef595 4020319c
3fff05c0: feefeffe feefeffe 3ffef5b0 40100958
< < < stack < < <
Note that doing a delay(0) just after the analogRead(A0) does not help
I read a lot of forum thread, on this github project, but also on esp8266.com, and apparently, all proposed solutions and workaround don't work in my case.
Something interresting: I flashed the latest nodemcu firmware, and doing print(adc.read(0)) give me the correct value without WDT crashing. I tried to use the same code as in file adc.c of nodemcu_firmware project, without success. There must be another problem elsewhere, and indeed, a difference between nodemcu firmware and the binary that I generate from Arduino IDE.
Could someone help me because I have no more idea.