Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.
More...
Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.
- Note
- Peripheral clock gating in SLEEP mode can be used to further reduce power consumption.
-
After wake-up from SLEEP mode, the peripheral clock is enabled again.
-
By default, all peripheral clocks are enabled during SLEEP mode.
◆ __HAL_RCC_TIM5_CLK_SLEEP_ENABLE
#define __HAL_RCC_TIM5_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_TIM5LPEN)) |
◆ __HAL_RCC_WWDG_CLK_SLEEP_ENABLE
#define __HAL_RCC_WWDG_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_WWDGLPEN)) |
◆ __HAL_RCC_SPI2_CLK_SLEEP_ENABLE
#define __HAL_RCC_SPI2_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_SPI2LPEN)) |
◆ __HAL_RCC_USART2_CLK_SLEEP_ENABLE
#define __HAL_RCC_USART2_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_USART2LPEN)) |
◆ __HAL_RCC_I2C1_CLK_SLEEP_ENABLE
#define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_I2C1LPEN)) |
◆ __HAL_RCC_I2C2_CLK_SLEEP_ENABLE
#define __HAL_RCC_I2C2_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_I2C2LPEN)) |
◆ __HAL_RCC_PWR_CLK_SLEEP_ENABLE
#define __HAL_RCC_PWR_CLK_SLEEP_ENABLE |
( |
| ) |
(RCC->APB1LPENR |= (RCC_APB1LPENR_PWRLPEN)) |
◆ __HAL_RCC_TIM5_CLK_SLEEP_DISABLE
#define __HAL_RCC_TIM5_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM5LPEN)) |
◆ __HAL_RCC_WWDG_CLK_SLEEP_DISABLE
#define __HAL_RCC_WWDG_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_WWDGLPEN)) |
◆ __HAL_RCC_SPI2_CLK_SLEEP_DISABLE
#define __HAL_RCC_SPI2_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI2LPEN)) |
◆ __HAL_RCC_USART2_CLK_SLEEP_DISABLE
#define __HAL_RCC_USART2_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART2LPEN)) |
◆ __HAL_RCC_I2C1_CLK_SLEEP_DISABLE
#define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C1LPEN)) |
◆ __HAL_RCC_I2C2_CLK_SLEEP_DISABLE
#define __HAL_RCC_I2C2_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C2LPEN)) |
◆ __HAL_RCC_PWR_CLK_SLEEP_DISABLE
#define __HAL_RCC_PWR_CLK_SLEEP_DISABLE |
( |
| ) |
(RCC->APB1LPENR &= ~(RCC_APB1LPENR_PWRLPEN)) |