I am trying to create a Network of environment controllers that consists of 1 PC based Client and 5 – 8 Server devices. The Server devices are currently Raspberry Pi PicoW devices programmed in MicroPython, using both cores, and I am trying to migrate to Banana Pi PicoW S3 devices for some performance reasons.
Having modified the source Code to handle the slight hardware differences between the Raspberry and Banana devices, I am now left with the issue of the WDT, which I had hoped would give me a longer timeout that 8.4 seconds. The Banana devices has 3 watchdog timers but I can find no documentation on handling them.
Can anyone help, or point me in the direction of the relevant documentation?
Create a WDT object and start it. The timeout must be given in milliseconds. Once it is running the timeout cannot be changed and the WDT cannot be stopped either.
Notes: On the esp8266 a timeout cannot be specified, it is determined by the underlying system. On rp2040 devices, the maximum timeout is 8388 ms.
The BPI PicoW S3 is built with an ESP32 device, so does the 8388 ms limit still apply, given that it has 3 watchdog timers?
After close examination of the BPI PicoW S3 documentation and that of the ESP32, I concluded that the circa 8.4 second WDT limit for the RPI PicoW does not apply. The main reason for the 8.4 second limit being the RPI uses a 24 bit counter for the WDT.
The BPI PicoW S3 appears to use 32 bit counters (not so clear in the docs) so WDT times of much longer durations are possible. My project now has a 60 second WDT and it works fine. Code example below:
def comms_monitor():
while True:
mainLock.acquire()
print(" CommsMonitor running ")
if flag.test_run_core_1():
wdt = WDT(timeout=60000) # Enable Watchdog with a timeout of 60s
wdt.feed() # Kick the Watchdog
print("\nComms Monitor active and kicked!\n")
flag.clear_run_core_1() # Watchdog kicked so exit loop
time.sleep(0.5)
mainLock.release()