aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h')
-rw-r--r--os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h b/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h
index ba8accfe5..f4055b24d 100644
--- a/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h
+++ b/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h
@@ -84,6 +84,10 @@
/* Derived constants and error checks. */
/*===========================================================================*/
+#if STM32_WDG_USE_IWDG && !STM32_HAS_IWDG
+#error "IWDG not present in the selected device"
+#endif
+
#if !STM32_WDG_USE_IWDG
#error "WDG driver activated but no xWDG peripheral assigned"
#endif
@@ -92,7 +96,7 @@
#error "STM32_LSI_ENABLED not defined"
#endif
-#if STM32_LSI_ENABLED == FALSE
+#if (STM32_WDG_USE_IWDG == TRUE) && (STM32_LSI_ENABLED == FALSE)
#error "IWDG requires LSI clock"
#endif