STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_hal_flash_ramfunc.c
Go to the documentation of this file.
1 
46 /* Includes ------------------------------------------------------------------*/
47 #include "stm32f4xx_hal.h"
48 
57 #ifdef HAL_FLASH_MODULE_ENABLED
58 #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
59  defined(STM32F412Rx) || defined(STM32F412Cx)
60 
61 /* Private typedef -----------------------------------------------------------*/
62 /* Private define ------------------------------------------------------------*/
63 /* Private macro -------------------------------------------------------------*/
64 /* Private variables ---------------------------------------------------------*/
65 /* Private function prototypes -----------------------------------------------*/
66 /* Exported functions --------------------------------------------------------*/
94 __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void)
95 {
96  /* Enable Power ctrl clock */
97  __HAL_RCC_PWR_CLK_ENABLE();
98  /* Stop the flash interface while System Run */
99  SET_BIT(PWR->CR, PWR_CR_FISSR);
100 
101  return HAL_OK;
102 }
103 
111 __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void)
112 {
113  /* Enable Power ctrl clock */
114  __HAL_RCC_PWR_CLK_ENABLE();
115  /* Start the flash interface while System Run */
116  CLEAR_BIT(PWR->CR, PWR_CR_FISSR);
117 
118  return HAL_OK;
119 }
120 
128 __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void)
129 {
130  /* Enable Power ctrl clock */
131  __HAL_RCC_PWR_CLK_ENABLE();
132  /* Enable the flash sleep while System Run */
133  SET_BIT(PWR->CR, PWR_CR_FMSSR);
134 
135  return HAL_OK;
136 }
137 
145 __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)
146 {
147  /* Enable Power ctrl clock */
148  __HAL_RCC_PWR_CLK_ENABLE();
149  /* Disable the flash sleep while System Run */
150  CLEAR_BIT(PWR->CR, PWR_CR_FMSSR);
151 
152  return HAL_OK;
153 }
154 
163 #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
164 #endif /* HAL_FLASH_MODULE_ENABLED */
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)
Disable the flash sleep while System Run.
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void)
Start the flash interface while System Run.
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void)
Enable the flash sleep while System Run.
__RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void)
Stop the flash interface while System Run.
This file contains all the functions prototypes for the HAL module driver.