RUI3 Watchog "LowPower" on RAK3172

Hi all,

In RUI3 on RAK3172-SIP the Watchdog allows max. 8 seconds timeout. However to serve it a timer-task is required, which has a power frame of 10 msec, or in other words: If a timer wakes all 5 seconds to serve the watchog, the average current is quite high (power profiler calculates 35uA), instead of the extreme low 3uA (without Watchog).

I see in the code (stm32wlxx_hal_iwdg.h), that the watchdog prescaler is 64, up to 256 is possible and a much larger reload period than 8 sec (uhal_wdt.c). According to the datasheet (Sect. 3.25.4 ) up to 32 sec are possible, hence this would reduce the average sleep current to 6 uA.

Are there plans to integrate it in RUI3? I think a watchdog is sometimes very useful…

Best regards, Jo

My project: A professional, but Open Source stand alone precise Soil moisture sensor, working at 40.68 MHz (worldwide available SRD-Band). The principle is based on scientific work and the sensor is highly insensitive to salinity. If using a 1.5 AA Battery and a stepper with the RAK3172-SIP-L, up to 10 years of hourly upload should be possible. Git: GitHub - joembedded/Gizmo-SoilMoisture-Monitor: A lowCost SoilMoisture Monitor ('Giess-Monitor')

Thank you for the suggestion, I will forward it to our R&D team.

PS: Just if anyone is interested:

Added: Sets WD Timeout to 32 sec and with Refresh (by timer) each 30 sec, average current drops down to 6.2uA:

#include "uhal_wdt.h"
#define IWDG_WINDOW   0xFFF
#define IWDG_RELOAD   0xFFF
static IWDG_HandleTypeDef hiwdg;
void jo_wdt_feed(void)
{
    HAL_IWDG_Refresh(&hiwdg);
}
int16_t jo_wdt_init(void)
{
    hiwdg.Instance = IWDG;
    hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
    hiwdg.Init.Window = IWDG_WINDOW;
    hiwdg.Init.Reload = IWDG_RELOAD;
    if (HAL_IWDG_Init(&hiwdg) != HAL_OK) return -1000;
	return 0;
}