HAL SYSCFG How to Use ¶
- group SYSCFG_How_To_Use
-
SYSCFG peripheral overview ¶
The System Configuration Controller peripheral (SYSCFG) allows configuring and managing various system parameters.
This file provides firmware functions to manage the following functionalities :
-
Enabling/disabling the FMP high-drive mode of some I/Os and voltage booster for I/Os analog switches.
-
Adjust the HSPI supply capacitance.
-
Enabling/disabling the internal SRAMs cacheability by DCACHE2.
-
Configuring FPU interrupts.
-
Managing the I/O compensation cell.
-
Configuring the USB HS PHY.
-
Managing robustness feature.
How to use the SYSCFG HAL module driver ¶
The SYSCFG HAL driver can be used as follows: ¶
After startup, SYSCFG peripheral is not active by default. Use HAL_RCC_SYSCFG_EnableClock() function to enable SYSCFG APB3 clock.
This module provides 7 different sets of APIs that allows to :
-
General management : This section provides global functions that can be used for various purposes
-
Configure the I/O analog switches supply:
-
This functionality is ensured by HAL_SYSCFG_SetAnalogIOSwitchSupply() function.
-
-
Get the I/O analog switches supply configuration:
-
This functionality is ensured by HAL_SYSCFG_GetAnalogIOSwitchSupply() function.
-
-
Enable and disable the fast mode plus capability:
-
These functionalities are ensured respectively by HAL_SYSCFG_EnableFastModePlus() and HAL_SYSCFG_DisableFastModePlus() .
-
-
Get the fast mode plus capability state:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledFastModePlus() function.
-
-
Configure the decoupling capacitance on HSPI supply:
-
This functionality is ensured by HAL_SYSCFG_SetHSPISupplyDecouplingCapacitance() function.
-
-
Get the decoupling capacitance on HSPI supply configuration:
-
This functionality is ensured by HAL_SYSCFG_GetHSPISupplyDecouplingCapacitance() function.
-
-
Enable and disable the cacheability of internal SRAMx by DCACHE2:
-
These functionalities are ensured respectively by HAL_SYSCFG_EnableDCACHE2SRAMCacheability() and HAL_SYSCFG_DisableDCACHE2SRAMCacheability() .
-
-
Get the cacheability of internal SRAMx by DCACHE2 state:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledDCACHE2SRAMCachability() function.
-
-
-
Manage floating point unit interrupts : Several APIs are available to manage the floating point unit interrupts
-
Enable and disable the floating point unit interrupts:
-
These functionalities are ensured respectively by HAL_SYSCFG_EnableFPUIT() and HAL_SYSCFG_DisableFPUIT() .
-
-
Get the floating point unit interrupts state:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledFPUIT() function.
-
-
-
Manage TIM break inputs : This feature is used to control the system break interconnect to TIM1/8/15/16/17 break inputs
-
Enable the TIM break inputs:
-
This functionality is ensured by HAL_SYSCFG_EnableTIMBreakInputs() function.
-
-
Check the TIM break inputs activation:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledTIMBreakInputs() function.
-
-
Note: The TIM break inputs deactivation can only be done by a hardware reset.
-
-
Control the compensation cell : The SYSCFG can be configured to manage the compensation cell
-
Configure the compensation cell code selection :
-
This functionality is ensured by HAL_SYSCFG_SetConfigCompensationCellCode() function.
-
-
Get the compensation cell code configuration :
-
This functionality is ensured by HAL_SYSCFG_GetConfigCompensationCellCode() function.
-
-
Enable and disable the compensation cell activation :
-
These functionalities are ensured respectively by HAL_SYSCFG_EnableCompensationCell() and HAL_SYSCFG_DisableCompensationCell() .
-
-
Get the compensation cell state:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledCompensationCell() function.
-
-
-
Manage the compensation code : Several APIs are available to mange the compensation code
-
Get the compensation value of PMOS transistor :
-
This functionality is ensured by HAL_SYSCFG_GetPMOSCompensationCellValue() function.
-
-
Get the compensation value of NMOS transistor :
-
This functionality is ensured by HAL_SYSCFG_GetNMOSCompensationCellValue() function.
-
-
Configure the compensation code:
-
This functionality is ensured by HAL_SYSCFG_SetxMOSCompensationCellCode() function.
-
-
Get the compensation code configuration :
-
This functionality is ensured by HAL_SYSCFG_GetxMOSCompensationCellCode() function.
-
-
-
USB HS PHY configuration: Several APIs are available to control the USB HS PHY
-
Enable and disable the USB HS PHY feature :
-
These functionalities are ensured respectively by HAL_SYSCFG_EnableUSBHSPHY() and HAL_SYSCFG_DisableUSBHSPHY() .
-
-
Get the USB HS PHY state:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledUSBHSPHY() function.
-
-
Enable and disable the USB HS PHY power down:
-
These functionalities are ensured respectively by HAL_SYSCFG_EnableUSBHSPHYPowerDown() and HAL_SYSCFG_DisableUSBHSPHYPowerDown() .
-
-
Get the USB HS PHY power down state:
-
This functionality is ensured by HAL_SYSCFG_IsEnabledUSBHSPHYPowerDown() function.
-
-
Configure the USB HS PHY reference clock frequency selection:
-
This functionality is ensured by HAL_SYSCFG_SetUSBHSPHYReferenceClockFrequency() function.
-
-
Get the USB HS PHY reference clock frequency configuration :
-
This functionality is ensured by HAL_SYSCFG_GetUSBHSPHYReferenceClockFrequency() function.
-
-
-
Control USB HS PHY tune: Several APIs are available to control the USB HS PHY
-
Configure all USB HS PHY tune simultaneously:
-
This functionality is ensured by HAL_SYSCFG_SetConfigUSBHSPHY() function.
-
-
Get all USB HS PHY tune simultaneously:
-
This functionality is ensured by HAL_SYSCFG_GetConfigUSBHSPHY() function.
-
-
Configure the USB HS PHY disconnect threshold adjustment:
-
This functionality is ensured by HAL_SYSCFG_SetUSBHSPHYDisconnectThresholdAdjustment() function.
-
-
Get the USB HS PHY disconnect threshold adjustment configuration :
-
This functionality is ensured by HAL_SYSCFG_GetUSBHSPHYDisconnectThresholdAdjustment() function.
-
-
Configure the USB HS PHY squelch threshold adjustment:
-
This functionality is ensured by HAL_SYSCFG_SetUSBHSPHYSquelchThresholdAdjustment() function.
-
-
Get the USB HS PHY squelch threshold adjustment configuration :
-
This functionality is ensured by HAL_SYSCFG_GetUSBHSPHYSquelchThresholdAdjustment() function.
-
-
Configure the USB HS PHY transmitter preemphasis current :
-
This functionality is ensured by HAL_SYSCFG_SetUSBHSPHYTransmitterPreemphasisCurrent() function.
-
-
Get the USB HS PHY transmitter preemphasis current configuration :
-
This functionality is ensured by HAL_SYSCFG_GetUSBHSPHYTransmitterPreemphasisCurrent() function.
-
-
-