diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/STM32/STM32F4xx/stm32_rcc.h | 20 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F4xx/stm32_registry.h | 1 |
2 files changed, 17 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h b/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h index 431b9ce24..1543481f7 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h @@ -1388,13 +1388,17 @@ * @{
*/
/**
- * @brief Enables the FSMS peripheral clock.
+ * @brief Enables the FSMC peripheral clock.
*
* @param[in] lp low power enable flag
*
* @api
*/
-#define rccEnableFSMC(lp) rccEnableAHB3(RCC_AHB3ENR_FSMCEN, lp)
+#if defined(STM32_FSMC_IS_FMC)
+ #define rccEnableFSMC(lp) rccEnableAHB3(RCC_AHB3ENR_FMCEN, lp)
+#else
+ #define rccEnableFSMC(lp) rccEnableAHB3(RCC_AHB3ENR_FSMCEN, lp)
+#endif
/**
* @brief Disables the FSMC peripheral clock.
@@ -1403,14 +1407,22 @@ *
* @api
*/
-#define rccDisableFSMC(lp) rccDisableAHB3(RCC_AHB3ENR_FSMCEN, lp)
+#if defined(STM32_FSMC_IS_FMC)
+ #define rccDisableFSMC(lp) rccDisableAHB3(RCC_AHB3ENR_FMCEN, lp)
+#else
+ #define rccDisableFSMC(lp) rccDisableAHB3(RCC_AHB3ENR_FSMCEN, lp)
+#endif
/**
* @brief Resets the FSMC peripheral.
*
* @api
*/
-#define rccResetFSMC() rccResetAHB3(RCC_AHB3RSTR_FSMCRST)
+#if defined(STM32_FSMC_IS_FMC)
+ #define rccResetFSMC() rccResetAHB3(RCC_AHB3RSTR_FMCRST)
+#else
+ #define rccResetFSMC() rccResetAHB3(RCC_AHB3RSTR_FSMCRST)
+#endif
/** @} */
/*===========================================================================*/
diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h index 2cb3de250..ab05889ae 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h @@ -322,6 +322,7 @@ /* FSMC attributes.*/
#define STM32_HAS_FSMC TRUE
+#define STM32_FSMC_IS_FMC TRUE
#define STM32_FSMC_DMA_MSK (STM32_DMA_STREAM_ID_MSK(2, 0) |\
STM32_DMA_STREAM_ID_MSK(2, 1) |\
STM32_DMA_STREAM_ID_MSK(2, 2) |\
|