[riot-notifications] [RIOT-OS/RIOT] cpu/stm32_common: add watchdog for stm32 (#11252)

Francisco notifications at github.com
Fri May 17 16:55:23 CEST 2019


fjmolinas commented on this pull request.



> +                              ((uint32_t)(LSI_CLOCK_US * 4 * (1 << pre))));
+
+    DEBUG("[wdg]: reload value %d\n", rel);
+    return rel;
+}
+
+void wdg_start(void)
+{
+    IWDG->KR = IWDG_KR_KEY_ENABLE;
+}
+
+void wdg_stop(void)
+{
+#ifdef CPU_FAM_STM32L4
+    DEBUG("[Warning]: wdg will freeze in STOP and STANDBY mode");
+    FLASH->OPTR |= ~(FLASH_OPTR_IWDG_STOP || FLASH_OPTR_IWDG_STDBY);

Note to self: this should be configured with a configurable define.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11252#pullrequestreview-238972549
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190517/b45ff649/attachment.html>


More information about the notifications mailing list