HAL SYSCFG configuration functions.
More...
HAL SYSCFG configuration functions.
===============================================================================
##### HAL SYSCFG configuration functions #####
===============================================================================
[..] This section provides functions allowing to:
(+) Start a hardware SRAM2 erase operation
(+) Enable/Disable the Internal FLASH Bank Swapping
(+) Configure the Voltage reference buffer
(+) Enable/Disable the Voltage reference buffer
(+) Enable/Disable the I/O analog switch voltage booster
◆ HAL_SYSCFG_DisableIOAnalogSwitchBooster()
| void HAL_SYSCFG_DisableIOAnalogSwitchBooster |
( |
void |
| ) |
|
Disable the I/O analog switch voltage booster.
- Return values
-
Definition at line 736 of file stm32l4xx_hal.c.
738 CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN);
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
◆ HAL_SYSCFG_DisableMemorySwappingBank()
| void HAL_SYSCFG_DisableMemorySwappingBank |
( |
void |
| ) |
|
Disable the Internal FLASH Bank Swapping.
- Note
- This function can be used only for STM32L4xx devices.
-
The default state : Flash Bank1 mapped at 0x08000000 (and aliased @0x0000 0000) and Flash Bank2 mapped at 0x08100000 (and aliased at 0x00100000)
- Return values
-
Definition at line 632 of file stm32l4xx_hal.c.
635 *(__IO uint32_t *)FB_MODE_BB = 0x00000000UL;
◆ HAL_SYSCFG_DisableVREFBUF()
| void HAL_SYSCFG_DisableVREFBUF |
( |
void |
| ) |
|
Disable the Internal Voltage Reference buffer (VREFBUF).
- Return values
-
Definition at line 715 of file stm32l4xx_hal.c.
717 CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
◆ HAL_SYSCFG_EnableIOAnalogSwitchBooster()
| void HAL_SYSCFG_EnableIOAnalogSwitchBooster |
( |
void |
| ) |
|
Enable the I/O analog switch voltage booster.
- Return values
-
Definition at line 726 of file stm32l4xx_hal.c.
728 SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN);
◆ HAL_SYSCFG_EnableMemorySwappingBank()
| void HAL_SYSCFG_EnableMemorySwappingBank |
( |
void |
| ) |
|
Enable the Internal FLASH Bank Swapping.
- Note
- This function can be used only for STM32L4xx devices.
-
Flash Bank2 mapped at 0x08000000 (and aliased @0x00000000) and Flash Bank1 mapped at 0x08100000 (and aliased at 0x00100000)
- Return values
-
Definition at line 617 of file stm32l4xx_hal.c.
619 *(__IO uint32_t *)FB_MODE_BB = 0x00000001UL;
◆ HAL_SYSCFG_EnableVREFBUF()
| HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF |
( |
void |
| ) |
|
Enable the Internal Voltage Reference buffer (VREFBUF).
- Return values
-
Definition at line 689 of file stm32l4xx_hal.c.
693 SET_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR);
699 while(READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRR) == 0U)
701 if((
HAL_GetTick() - tickstart) > VREFBUF_TIMEOUT_VALUE)
uint32_t HAL_GetTick(void)
Provide a tick value in millisecond.
◆ HAL_SYSCFG_SRAM2Erase()
| void HAL_SYSCFG_SRAM2Erase |
( |
void |
| ) |
|
Start a hardware SRAM2 erase operation.
- Note
- As long as SRAM2 is not erased the SRAM2ER bit will be set. This bit is automatically reset at the end of the SRAM2 erase operation.
- Return values
-
Definition at line 598 of file stm32l4xx_hal.c.
604 *(__IO uint32_t *) SCSR_SRAM2ER_BB = 0x00000001UL;
◆ HAL_SYSCFG_VREFBUF_HighImpedanceConfig()
| void HAL_SYSCFG_VREFBUF_HighImpedanceConfig |
( |
uint32_t |
Mode | ) |
|
Configure the internal voltage reference buffer high impedance mode.
- Parameters
-
| Mode | specifies the high impedance mode This parameter can be one of the following values:
- SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE: VREF+ pin is internally connect to VREFINT output.
- SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE: VREF+ pin is high impedance.
|
- Return values
-
Definition at line 665 of file stm32l4xx_hal.c.
670 MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_HIZ, Mode);
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_SYSCFG_VREFBUF_TrimmingConfig()
| void HAL_SYSCFG_VREFBUF_TrimmingConfig |
( |
uint32_t |
TrimmingValue | ) |
|
Tune the Internal Voltage Reference buffer (VREFBUF).
- Return values
-
Definition at line 677 of file stm32l4xx_hal.c.
680 assert_param(IS_SYSCFG_VREFBUF_TRIMMING(TrimmingValue));
682 MODIFY_REG(VREFBUF->CCR, VREFBUF_CCR_TRIM, TrimmingValue);
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
◆ HAL_SYSCFG_VREFBUF_VoltageScalingConfig()
| void HAL_SYSCFG_VREFBUF_VoltageScalingConfig |
( |
uint32_t |
VoltageScaling | ) |
|
Configure the internal voltage reference buffer voltage scale.
- Parameters
-
| VoltageScaling | specifies the output voltage to achieve This parameter can be one of the following values:
- SYSCFG_VREFBUF_VOLTAGE_SCALE0: VREF_OUT1 around 2.048 V. This requires VDDA equal to or higher than 2.4 V.
- SYSCFG_VREFBUF_VOLTAGE_SCALE1: VREF_OUT2 around 2.5 V. This requires VDDA equal to or higher than 2.8 V.
|
- Return values
-
Definition at line 649 of file stm32l4xx_hal.c.
652 assert_param(IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(VoltageScaling));
654 MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_VRS, VoltageScaling);
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))