esp8266-20191220-v1.12.bin issues
-
- Posts: 13
- Joined: Thu Nov 03, 2016 10:12 pm
esp8266-20191220-v1.12.bin issues
I am trying to move some simple projects to ESP8266 NodeMcu boards instead of ESP32 boards.
I flashed the boards with the latest stable release.
Two issues so far:
1) the watchdog does not take the documented parameters, so I can't set a longer watchdog timeout
Suggestion: The watchdog should be disabled when in REPL
The reason I need to increase the timeout is to have more time after I reset the board to upload newer code.
Current workaround is to not start the WDT after reset if I pull a spare (for now) I/O low.
2) the RTC is extremely inaccurate, on the order of being off roughly one minute per hour of run time.
For now, I am setting the time from ntp every hour.
I flashed the boards with the latest stable release.
Two issues so far:
1) the watchdog does not take the documented parameters, so I can't set a longer watchdog timeout
Suggestion: The watchdog should be disabled when in REPL
The reason I need to increase the timeout is to have more time after I reset the board to upload newer code.
Current workaround is to not start the WDT after reset if I pull a spare (for now) I/O low.
2) the RTC is extremely inaccurate, on the order of being off roughly one minute per hour of run time.
For now, I am setting the time from ntp every hour.
Re: esp8266-20191220-v1.12.bin issues
Think this is a hardware issues, isn't it?mikronauts wrote: ↑Sun Dec 29, 2019 2:36 pm2) the RTC is extremely inaccurate, on the order of being off roughly one minute per hour of run time.
-
- Posts: 13
- Joined: Thu Nov 03, 2016 10:12 pm
Re: esp8266-20191220-v1.12.bin issues
Agreed, however it is dissapointing. Not blaming uPyghon.
Hmm.. it should be possible to compensate for it by having a 'tuning' variable say in boot.py
Hmm.. it should be possible to compensate for it by having a 'tuning' variable say in boot.py
jedie wrote: ↑Sun Dec 29, 2019 4:59 pmThink this is a hardware issues, isn't it?mikronauts wrote: ↑Sun Dec 29, 2019 2:36 pm2) the RTC is extremely inaccurate, on the order of being off roughly one minute per hour of run time.
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: esp8266-20191220-v1.12.bin issues
The esp8266 RTC is indeed very inaccurate, I sync it every few hours.
The esp8266 does not have a WDT, you'll have to use a software WDT if that is of any use to you.
The esp8266 does not have a WDT, you'll have to use a software WDT if that is of any use to you.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
-
- Posts: 13
- Joined: Thu Nov 03, 2016 10:12 pm
Re: esp8266-20191220-v1.12.bin issues
me too
jedie wrote: ↑Sun Dec 29, 2019 6:08 pmI also sync via NTP every hour
About auto adjustment, see: viewtopic.php?f=18&t=7403
-
- Posts: 13
- Joined: Thu Nov 03, 2016 10:12 pm
Re: esp8266-20191220-v1.12.bin issues
I will try a timer interrupt, hopefully the micropython timer handler will still fire if the main python code crashes.
I added a few try/excepts, hopefully they will catch what crashed the board last night.
I may look into the possibility of a C task for the RTOS to implement a watchdog.
I added a few try/excepts, hopefully they will catch what crashed the board last night.
I may look into the possibility of a C task for the RTOS to implement a watchdog.
kevinkk525 wrote: ↑Sun Dec 29, 2019 7:12 pmThe esp8266 RTC is indeed very inaccurate, I sync it every few hours.
The esp8266 does not have a WDT, you'll have to use a software WDT if that is of any use to you.
- MostlyHarmless
- Posts: 166
- Joined: Thu Nov 21, 2019 6:25 pm
- Location: Pennsylvania, USA
Re: esp8266-20191220-v1.12.bin issues
I am making progress with the ntpclient for ESP32 and have not forgotten about the ESP8266 either.
In the meantime as for polling NTP every (couple) hour(s), don't be too conservative on that. The CentOS 7 default configuration for ntpd is to start by polling several servers every 64 seconds, then gradually (as stability increases) get to a polling interval of 1024 seconds (a bit over 17 minutes).
So if you execute an ntptime sync every 15-20 minutes, that's probably still OK.
The algorithm I started with however used 5-packet bursts, and doing that once a minute is not acceptable (which is why I am not using pool.ntp.org for my testing but resources in my local environment). I abandoned that algorithm already, but don't have something really good yet to show for a replacement.
Regards, Jan
In the meantime as for polling NTP every (couple) hour(s), don't be too conservative on that. The CentOS 7 default configuration for ntpd is to start by polling several servers every 64 seconds, then gradually (as stability increases) get to a polling interval of 1024 seconds (a bit over 17 minutes).
So if you execute an ntptime sync every 15-20 minutes, that's probably still OK.
The algorithm I started with however used 5-packet bursts, and doing that once a minute is not acceptable (which is why I am not using pool.ntp.org for my testing but resources in my local environment). I abandoned that algorithm already, but don't have something really good yet to show for a replacement.
Regards, Jan
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: esp8266-20191220-v1.12.bin issues
I use a software watchdog with timers in my project: https://github.com/kevinkk525/pysmartno ... atchdog.pymikronauts wrote: ↑Mon Dec 30, 2019 12:49 amI will try a timer interrupt, hopefully the micropython timer handler will still fire if the main python code crashes.
I added a few try/excepts, hopefully they will catch what crashed the board last night.
I may look into the possibility of a C task for the RTOS to implement a watchdog.
kevinkk525 wrote: ↑Sun Dec 29, 2019 7:12 pmThe esp8266 RTC is indeed very inaccurate, I sync it every few hours.
The esp8266 does not have a WDT, you'll have to use a software WDT if that is of any use to you.
It works reliable and there should be no need to implement a RTOS watchdog since both are still software watchdogs. The micropython VM on the esp8266 seems to have its own watchdog, so implementing a RTOS watchdog might do the same thing?
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: esp8266-20191220-v1.12.bin issues
Hi,
I'm using doit esp-12n development board i'm facing an issue of me not able to connect to the board I,have flashed the latest bin over and over did try other bin files (1.8.7 and 1.9.x) but still i'm facing the same issue i'm able to reach to the point where it says terminal is ready but i dint get (>>>)this so im unable to code or do anything on the board i'm new to microcontroller and im trying to do this for my collage project please guide me upon fixing this issue i'm facing
I'm using doit esp-12n development board i'm facing an issue of me not able to connect to the board I,have flashed the latest bin over and over did try other bin files (1.8.7 and 1.9.x) but still i'm facing the same issue i'm able to reach to the point where it says terminal is ready but i dint get (>>>)this so im unable to code or do anything on the board i'm new to microcontroller and im trying to do this for my collage project please guide me upon fixing this issue i'm facing