HAL SBS How to Use ¶
- group SBS_How_To_Use
-
How to use the SBS HAL module driver ¶
The SBS HAL driver can be used as follows: ¶
After startup, SBS peripheral is not active by default. Use HAL_RCC_SBS_EnableClock() function to enable SBS APB3 clock.
This module provides different sets of APIs that allow to :
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_SBS_EnableFPUIT() and HAL_SBS_DisableFPUIT().
Get the floating point unit interrupts state:
This functionality is ensured by HAL_SBS_IsEnabledFPUIT() function.
Manage TIM break inputs : This feature is used to control the system break interconnect to TIM1 break inputs
Enable and disable the TIM break inputs:
This functionality is ensured respectively by HAL_SBS_EnableTIMBreakInputs() function and HAL_SBS_DisableTIMBreakInputs() function.
Check the TIM break inputs activation:
This functionality is ensured by HAL_SBS_IsEnabledTIMBreakInputs() function.
Note: Some TIM break inputs disabling can only be done by a hardware reset.
Control the compensation cell : The SBS can be configured to manage the compensation cell
Set the compensation cell code source :
This functionality is ensured by HAL_SBS_SetCompensationCellCodeSrc() function.
Get the compensation cell code source :
This functionality is ensured by HAL_SBS_GetCompensationCellCodeSrc() function.
Enable and disable the compensation cell activation :
These functionalities are ensured respectively by HAL_SBS_EnableCompensationCell() and HAL_SBS_DisableCompensationCell().
Get the compensation cell state:
This functionality is ensured by HAL_SBS_IsEnabledCompensationCell() function.
Manage the compensation code : Several APIs are available to manage the compensation code
Get the compensation value of PMOS transistor :
This functionality is ensured by HAL_SBS_GetPMOSCompensationCellValue() function.
Get the compensation value of NMOS transistor :
This functionality is ensured by HAL_SBS_GetNMOSCompensationCellValue() function.
Set the compensation cell code:
This functionality is ensured by HAL_SBS_SetConfigxMOSCompensationCellCode() function.
Get the compensation cell code :
This functionality is ensured by HAL_SBS_GetConfigxMOSCompensationCellCode() function.
NMI double ECC error in FLASH Interface functions: Several APIs are available to control NMI double ECC error in FLASH Interface.
Enable and disable the NMI in case of double ECC error in FLASH Interface:
These functionalities are ensured respectively by HAL_SBS_FLASH_EnableECCNMI() and HAL_SBS_FLASH_DisableECCNMI() function.
Get if the NMI is Enabled in case of double ECC error in FLASH Interface:
This functionality is ensured by HAL_SBS_FLASH_IsEnabledECCNMI() function.
HDP levels management functions : Several APIs are available to manage HDPL
Set the HDPL value :
This functionality is ensured by HAL_SBS_SetHDPLevelValue() function.
Get the HDPL value :
This functionality is ensured by HAL_SBS_GetHDPLevelValue() function.
Set OBK HDPL value :
This functionality is ensured by HAL_SBS_SetHDPOBKLevelValue() function.
Get OBK HDPL value :
This functionality is ensured by HAL_SBS_GetHDPOBKLevelValue() function.
Lock functions : Several APIs are available to manage the lock mechanism
Lock the configuration of the Core registers :
This functionality is ensured by HAL_SBS_LockCoreRegisters() function.
Check the Core registers lock status :
This functionality is ensured by HAL_SBS_IsLockedCoreRegisters() function.
Flag management functions : Several APIs are available on the header file as “static_inline” functions to manage the memories erase status
Check if the memories erase status flags is active or not :
This functionality is ensured by HAL_SBS_IsActiveFlag() function.
Clear the memories erase status pending flags :
This functionality is ensured by HAL_SBS_ClearFlag() function.
Ethernet functions : Several APIs are available to manage the Ethernet features
Set the Ethernet external PHY interrupt polarity :
This functionality is ensured by HAL_SBS_SetETHExternalPHYInterruptPolarity() function.
Get the Ethernet external PHY interrupt polarity :
This functionality is ensured by HAL_SBS_GetETHExternalPHYInterruptPolarity() function.
Set the Ethernet PHY interface :
This functionality is ensured by HAL_SBS_SetETHPHYInterface() function.
Get the Ethernet PHY interface :
This functionality is ensured by HAL_SBS_GetETHPHYInterface() function.
Get the Ethernet TXLPI mode status :
This functionality is ensured by HAL_SBS_GetETHMACTXLPIStatus()function.
Get the Ethernet power-down acknowledge :
This functionality is ensured by HAL_SBS_GetETHPowerDownAck()function.
Pin Remap functions : Several APIs are available to manage the ADC channel pin remapping features
Enable and disable the ADC channel pin remap:
This functionality is ensured respectively by HAL_SBS_EnableADCChannelPinRemap() function and HAL_SBS_DisableADCChannelPinRemap() function.
Check the ADC channel pin remapping status:
This functionality is ensured by HAL_SBS_IsEnabledADCChannelPinRemap() function.