diff options
Diffstat (limited to 'os/hal')
| -rw-r--r-- | os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.c | 2 | ||||
| -rw-r--r-- | os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.h | 6 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32F0xx/stm32_registry.h | 32 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32F1xx/stm32_registry.h | 24 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32F37x/stm32_registry.h | 8 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32F3xx/stm32_registry.h | 36 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32F4xx/stm32_registry.h | 16 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32F7xx/stm32_registry.h | 4 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32L0xx/stm32_registry.h | 12 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32L1xx/stm32_registry.h | 4 | ||||
| -rw-r--r-- | os/hal/ports/STM32/STM32L4xx/stm32_registry.h | 4 | 
11 files changed, 146 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.c b/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.c index 8ea82a958..9f02347ba 100644 --- a/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.c +++ b/os/hal/ports/STM32/LLD/xWDGv1/wdg_lld.c @@ -81,7 +81,7 @@ void wdg_lld_init(void) {   */
  void wdg_lld_start(WDGDriver *wdgp) {
 -#if 1
 +#if STM32_IWDG_IS_WINDOWED
    /* Enable IWDG and unlock for write.*/
    wdgp->wdg->KR   = KR_KEY_ENABLE;
    wdgp->wdg->KR   = KR_KEY_WRITE;
 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
 diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h index c8baca553..3965fd8ac 100644 --- a/os/hal/ports/STM32/STM32F0xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F0xx/stm32_registry.h @@ -248,6 +248,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -505,6 +509,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -715,6 +723,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -911,6 +923,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1117,6 +1133,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1396,6 +1416,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1637,6 +1661,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1998,6 +2026,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32F1xx/stm32_registry.h b/os/hal/ports/STM32/STM32F1xx/stm32_registry.h index 779757d20..cc52dc7e0 100644 --- a/os/hal/ports/STM32/STM32F1xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F1xx/stm32_registry.h @@ -240,6 +240,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -409,6 +413,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -594,6 +602,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -835,6 +847,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1073,6 +1089,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1290,6 +1310,10 @@  #define STM32_HAS_OTG1                      TRUE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32F37x/stm32_registry.h b/os/hal/ports/STM32/STM32F37x/stm32_registry.h index 733c50852..ef08cfa28 100644 --- a/os/hal/ports/STM32/STM32F37x/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F37x/stm32_registry.h @@ -263,6 +263,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -506,6 +510,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32F3xx/stm32_registry.h b/os/hal/ports/STM32/STM32F3xx/stm32_registry.h index 9a6e2985c..36ceae28e 100644 --- a/os/hal/ports/STM32/STM32F3xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F3xx/stm32_registry.h @@ -259,6 +259,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -461,6 +465,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -662,6 +670,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -866,6 +878,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1092,6 +1108,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1292,6 +1312,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1491,6 +1515,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1719,6 +1747,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1918,6 +1950,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h index 146f26e4f..2afd17b9a 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h @@ -393,6 +393,10 @@  #define STM32_HAS_OTG1                      TRUE
  #define STM32_HAS_OTG2                      TRUE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      TRUE
 @@ -730,6 +734,10 @@  #define STM32_HAS_OTG1                      TRUE
  #define STM32_HAS_OTG2                      TRUE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1021,6 +1029,10 @@  #define STM32_HAS_OTG1                      TRUE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -1303,6 +1315,10 @@  #define STM32_HAS_OTG1                      TRUE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32F7xx/stm32_registry.h b/os/hal/ports/STM32/STM32F7xx/stm32_registry.h index 5f6c02e6a..380362075 100644 --- a/os/hal/ports/STM32/STM32F7xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F7xx/stm32_registry.h @@ -467,6 +467,10 @@  #define STM32_OTG2_EP1OUT_NUMBER            74
  #define STM32_OTG2_EP1IN_NUMBER             75
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      TRUE
 diff --git a/os/hal/ports/STM32/STM32L0xx/stm32_registry.h b/os/hal/ports/STM32/STM32L0xx/stm32_registry.h index a92a5ffa4..2a5b3eeb8 100644 --- a/os/hal/ports/STM32/STM32L0xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32L0xx/stm32_registry.h @@ -265,6 +265,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -519,6 +523,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 @@ -773,6 +781,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32L1xx/stm32_registry.h b/os/hal/ports/STM32/STM32L1xx/stm32_registry.h index 654dfa78a..eec243a32 100644 --- a/os/hal/ports/STM32/STM32L1xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32L1xx/stm32_registry.h @@ -323,6 +323,10 @@  #define STM32_HAS_OTG1                      FALSE
  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              FALSE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
 diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h index dea76f8e2..eebf9a285 100644 --- a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h @@ -386,6 +386,10 @@  #define STM32_HAS_OTG2                      FALSE
 +/* IWDG attributes.*/
 +#define STM32_HAS_IWDG                      TRUE
 +#define STM32_IWDG_IS_WINDOWED              TRUE
 +
  /* LTDC attributes.*/
  #define STM32_HAS_LTDC                      FALSE
  | 
