Banana Pi BPI PicoW S3 - Watchdog Timer control

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?

Many thanks in Advance.

I think you can look directly at the official documentation of micropython: Quick reference for the ESP32 — MicroPython latest documentation

The docs state:


class machine.WDT(id=0, timeout=5000 )

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?

In my searches for further information on the PicoW S3 WDT, I discovered this:


Task Watchdog timeout period (seconds)

Found in: Component config > ESP System Settings > CONFIG_ESP_TASK_WDT_EN > CONFIG_ESP_TASK_WDT_INIT

Timeout period configuration for the Task Watchdog Timer in seconds. This is also configurable at run time (see Task Watchdog Timer API Reference)

Range: * from 1 to 60 Default value: * 5

Can anyone shed some light on how to access this feature from MicroPython?

Hi all,

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:
    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  

I hope this helps someone.