esp8266-20191220-v1.12.bin issues

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
mikronauts
Posts: 13
Joined: Thu Nov 03, 2016 10:12 pm

esp8266-20191220-v1.12.bin issues

Post by mikronauts » Sun Dec 29, 2019 2:36 pm

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.

jedie
Posts: 252
Joined: Fri Jan 29, 2016 12:32 pm
Contact:

Re: esp8266-20191220-v1.12.bin issues

Post by jedie » Sun Dec 29, 2019 4:59 pm

mikronauts wrote:
Sun Dec 29, 2019 2:36 pm
2) the RTC is extremely inaccurate, on the order of being off roughly one minute per hour of run time.
Think this is a hardware issues, isn't it?

mikronauts
Posts: 13
Joined: Thu Nov 03, 2016 10:12 pm

Re: esp8266-20191220-v1.12.bin issues

Post by mikronauts » Sun Dec 29, 2019 6:00 pm

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
jedie wrote:
Sun Dec 29, 2019 4:59 pm
mikronauts wrote:
Sun Dec 29, 2019 2:36 pm
2) the RTC is extremely inaccurate, on the order of being off roughly one minute per hour of run time.
Think this is a hardware issues, isn't it?


kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: esp8266-20191220-v1.12.bin issues

Post by kevinkk525 » Sun Dec 29, 2019 7:12 pm

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.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

mikronauts
Posts: 13
Joined: Thu Nov 03, 2016 10:12 pm

Re: esp8266-20191220-v1.12.bin issues

Post by mikronauts » Mon Dec 30, 2019 12:45 am

me too :)
jedie wrote:
Sun Dec 29, 2019 6:08 pm
I also sync via NTP every hour ;)

About auto adjustment, see: viewtopic.php?f=18&t=7403

mikronauts
Posts: 13
Joined: Thu Nov 03, 2016 10:12 pm

Re: esp8266-20191220-v1.12.bin issues

Post by mikronauts » Mon Dec 30, 2019 12:49 am

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.
kevinkk525 wrote:
Sun Dec 29, 2019 7:12 pm
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.

User avatar
MostlyHarmless
Posts: 166
Joined: Thu Nov 21, 2019 6:25 pm
Location: Pennsylvania, USA

Re: esp8266-20191220-v1.12.bin issues

Post by MostlyHarmless » Mon Dec 30, 2019 6:18 am

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

kevinkk525
Posts: 969
Joined: Sat Feb 03, 2018 7:02 pm

Re: esp8266-20191220-v1.12.bin issues

Post by kevinkk525 » Mon Dec 30, 2019 7:01 am

mikronauts wrote:
Mon Dec 30, 2019 12:49 am
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.
kevinkk525 wrote:
Sun Dec 29, 2019 7:12 pm
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.
I use a software watchdog with timers in my project: https://github.com/kevinkk525/pysmartno ... atchdog.py
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

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: esp8266-20191220-v1.12.bin issues

Post by jay2026 » Sat Feb 15, 2020 6:25 pm

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

Post Reply