STM32F4xx HAL Driver
master
STM32CubeF4 HAL / LL Drivers API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
stm32f4xx_hal_flash_ramfunc.c
Go to the documentation of this file.
1
45
46
/* Includes ------------------------------------------------------------------*/
47
#include "
stm32f4xx_hal.h
"
48
52
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 --------------------------------------------------------*/
70
86
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
158
162
163
#endif
/* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
164
#endif
/* HAL_FLASH_MODULE_ENABLED */
168
172
__HAL_RCC_PWR_CLK_ENABLE
#define __HAL_RCC_PWR_CLK_ENABLE()
Definition
stm32f4xx_hal_rcc.h:510
stm32f4xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition.
Definition
stm32f4xx_hal_def.h:39
HAL_OK
@ HAL_OK
Definition
stm32f4xx_hal_def.h:40
hal-driver
Src
stm32f4xx_hal_flash_ramfunc.c
Generated by
1.17.0