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 :

  1. Manage floating point unit interrupts : Several APIs are available to manage the floating point unit interrupts

  2. Manage TIM break inputs : This feature is used to control the system break interconnect to TIM1 break inputs

  3. Control the compensation cell : The SBS can be configured to manage the compensation cell

  4. Manage the compensation code : Several APIs are available to manage the compensation code

  5. NMI double ECC error in FLASH Interface functions: Several APIs are available to control NMI double ECC error in FLASH Interface.

  6. HDP levels management functions : Several APIs are available to manage HDPL

    • Set the HDPL value :

    • Get the HDPL value :

    • 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.

  7. Lock functions : Several APIs are available to manage the lock mechanism

  8. 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 :

    • Clear the memories erase status pending flags :

  9. 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.

  10. 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.