Page 1 of 2

esp8266-20191220-v1.12.bin issues

Posted: Sun Dec 29, 2019 2:36 pm
by mikronauts
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.

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

Posted: Sun Dec 29, 2019 4:59 pm
by jedie
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?

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

Posted: Sun Dec 29, 2019 6:00 pm
by mikronauts
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?

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

Posted: Sun Dec 29, 2019 6:08 pm
by jedie
I also sync via NTP every hour ;)

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

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

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

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

Posted: Mon Dec 30, 2019 12:45 am
by mikronauts
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

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

Posted: Mon Dec 30, 2019 12:49 am
by mikronauts
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.

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

Posted: Mon Dec 30, 2019 6:18 am
by MostlyHarmless
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

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

Posted: Mon Dec 30, 2019 7:01 am
by kevinkk525
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?

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

Posted: Sat Feb 15, 2020 6:25 pm
by jay2026
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