You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I tested the watchdog on the RT1060-EVKB with a timeout of 1000ms and enabled both flags: WDT_OPT_PAUSE_HALTED_BY_DBG and WDT_OPT_PAUSE_IN_SLEEP.
As shown in the code, immediately after calling wdt_setup, the CPU enters sleep mode for 2000ms. However, I noticed that the SoC unexpectedly resets, even though it shouldn't.
code snippet:
void main(void) {
int err;
int wdt_channel_id;
const struct device *const wdt = DEVICE_DT_GET(DT_ALIAS(watchdog0));
printk("Watchdog sample application\n");
if (!device_is_ready(wdt)) {
printk("%s: device not ready.\n", wdt->name);
return;
}
struct wdt_timeout_cfg wdt_config = {
/* Reset SoC when watchdog timer expires. */
.flags = WDT_FLAG_RESET_SOC,
/* Expire watchdog after max window */
.window.min = 0U,
.window.max = 1000U,
};
wdt_channel_id = wdt_install_timeout(wdt, &wdt_config);
if (wdt_channel_id < 0) {
printk("Watchdog install error\n");
return;
}
err = wdt_setup(wdt, (WDT_OPT_PAUSE_HALTED_BY_DBG | WDT_OPT_PAUSE_IN_SLEEP));
if (err < 0) {
printk("Watchdog setup error\n");
return;
}
for (int i = 0; i < 100; ++i) {
printk("Feeding watchdog... %d \n", i);
wdt_feed(wdt, 0);
k_sleep(K_MSEC(2000));
}
return 0;
}
To Reproduce
Simply build and run the code for mimxrt1060_evkb.
Expected behavior
SoC shouldn't reset.
Environment (please complete the following information):
ofirshe
changed the title
Unexpected Watchdog Reset on RT1060-EVKB with Sleep Mode Enabled
Unexpected Watchdog Reset on NXP RT1060-EVKB with Sleep Mode Enabled
Feb 28, 2025
Describe the bug
Hey, I tested the watchdog on the RT1060-EVKB with a timeout of 1000ms and enabled both flags:
WDT_OPT_PAUSE_HALTED_BY_DBG
andWDT_OPT_PAUSE_IN_SLEEP
.As shown in the code, immediately after calling
wdt_setup
, the CPU enters sleep mode for 2000ms. However, I noticed that the SoC unexpectedly resets, even though it shouldn't.code snippet:
To Reproduce
Simply build and run the code for
mimxrt1060_evkb
.Expected behavior
SoC shouldn't reset.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: