RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Functions

HAL Control functions. More...

Functions

__weak void HAL_IncTick (void)
 This function is called to increment a global variable "uwTick" used as application time base.
 
__weak uint32_t HAL_GetTick (void)
 Provides a tick value in millisecond.
 
uint32_t HAL_GetTickPrio (void)
 This function returns a tick priority.
 
HAL_StatusTypeDef HAL_SetTickFreq (HAL_TickFreqTypeDef Freq)
 Set new tick Freq.
 
HAL_TickFreqTypeDef HAL_GetTickFreq (void)
 Return tick frequency.
 
__weak void HAL_Delay (uint32_t Delay)
 This function provides minimum delay (in milliseconds) based on variable incremented.
 
__weak void HAL_SuspendTick (void)
 Suspend Tick increment.
 
__weak void HAL_ResumeTick (void)
 Resume Tick increment.
 
uint32_t HAL_GetHalVersion (void)
 Returns the HAL revision.
 
uint32_t HAL_GetREVID (void)
 Returns the device revision identifier.
 
uint32_t HAL_GetDEVID (void)
 Returns the device identifier.
 
uint32_t HAL_GetUIDw0 (void)
 Return the first word of the unique device identifier (UID based on 96 bits)
 
uint32_t HAL_GetUIDw1 (void)
 Return the second word of the unique device identifier (UID based on 96 bits)
 
uint32_t HAL_GetUIDw2 (void)
 Return the third word of the unique device identifier (UID based on 96 bits)
 
void HAL_SYSCFG_VREFBUF_VoltageScalingConfig (uint32_t VoltageScaling)
 Configure the internal voltage reference buffer voltage scale.
 
void HAL_SYSCFG_VREFBUF_HighImpedanceConfig (uint32_t Mode)
 Configure the internal voltage reference buffer high impedance mode.
 
void HAL_SYSCFG_VREFBUF_TrimmingConfig (uint32_t TrimmingValue)
 Tune the Internal Voltage Reference buffer (VREFBUF).
 
HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF (void)
 Enable the Internal Voltage Reference buffer (VREFBUF).
 
void HAL_SYSCFG_DisableVREFBUF (void)
 Disable the Internal Voltage Reference buffer (VREFBUF).
 
void HAL_SYSCFG_AnalogSwitchConfig (uint32_t SYSCFG_AnalogSwitch, uint32_t SYSCFG_SwitchState)
 Analog Switch control for dual analog pads.
 
void HAL_EnableCompensationCell (void)
 Enables the I/O Compensation Cell.
 
void HAL_DisableCompensationCell (void)
 Power-down the I/O Compensation Cell.
 
void HAL_SYSCFG_EnableIOSpeedOptimize (void)
 To Enable optimize the I/O speed when the product voltage is low.
 
void HAL_SYSCFG_DisableIOSpeedOptimize (void)
 To Disable optimize the I/O speed when the product voltage is low.
 
void HAL_SYSCFG_CompensationCodeSelect (uint32_t SYSCFG_CompCode)
 Code selection for the I/O Compensation cell.
 
void HAL_SYSCFG_CompensationCodeConfig (uint32_t SYSCFG_PMOSCode, uint32_t SYSCFG_NMOSCode)
 Code selection for the I/O Compensation cell.
 
void HAL_DBGMCU_EnableDBGSleepMode (void)
 Enable the Debug Module during Domain1/CDomain SLEEP mode.
 
void HAL_DBGMCU_DisableDBGSleepMode (void)
 Disable the Debug Module during Domain1/CDomain SLEEP mode.
 
void HAL_DBGMCU_EnableDBGStopMode (void)
 Enable the Debug Module during Domain1/CDomain STOP mode.
 
void HAL_DBGMCU_DisableDBGStopMode (void)
 Disable the Debug Module during Domain1/CDomain STOP mode.
 
void HAL_DBGMCU_EnableDBGStandbyMode (void)
 Enable the Debug Module during Domain1/CDomain STANDBY mode.
 
void HAL_DBGMCU_DisableDBGStandbyMode (void)
 Disable the Debug Module during Domain1/CDomain STANDBY mode.
 
void HAL_SetFMCMemorySwappingConfig (uint32_t BankMapConfig)
 Set the FMC Memory Mapping Swapping config.
 
uint32_t HAL_GetFMCMemorySwappingConfig (void)
 Get FMC Bank mapping mode.
 
void HAL_EXTI_EdgeConfig (uint32_t EXTI_Line, uint32_t EXTI_Edge)
 Configure the EXTI input event line edge.
 
void HAL_EXTI_GenerateSWInterrupt (uint32_t EXTI_Line)
 Generates a Software interrupt on selected EXTI line.
 
void HAL_EXTI_D1_ClearFlag (uint32_t EXTI_Line)
 Clears the EXTI's line pending flags for Domain D1.
 
void HAL_EXTI_D1_EventInputConfig (uint32_t EXTI_Line, uint32_t EXTI_Mode, uint32_t EXTI_LineCmd)
 Configure the EXTI input event line for Domain D1.
 
void HAL_EXTI_D3_EventInputConfig (uint32_t EXTI_Line, uint32_t EXTI_LineCmd, uint32_t EXTI_ClearSrc)
 Configure the EXTI input event line for Domain D3.
 

Detailed Description

HAL Control functions.

 ===============================================================================
                      ##### HAL Control functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Provide a tick value in millisecond
      (+) Provide a blocking delay in millisecond
      (+) Suspend the time base source interrupt
      (+) Resume the time base source interrupt
      (+) Get the HAL API driver version
      (+) Get the device identifier
      (+) Get the device revision identifier
      (+) Enable/Disable Debug module during SLEEP mode
      (+) Enable/Disable Debug module during STOP mode
      (+) Enable/Disable Debug module during STANDBY mode

Function Documentation

◆ HAL_DBGMCU_DisableDBGSleepMode()

void HAL_DBGMCU_DisableDBGSleepMode ( void  )

Disable the Debug Module during Domain1/CDomain SLEEP mode.

Return values
None

◆ HAL_DBGMCU_DisableDBGStandbyMode()

void HAL_DBGMCU_DisableDBGStandbyMode ( void  )

Disable the Debug Module during Domain1/CDomain STANDBY mode.

Return values
None

◆ HAL_DBGMCU_DisableDBGStopMode()

void HAL_DBGMCU_DisableDBGStopMode ( void  )

Disable the Debug Module during Domain1/CDomain STOP mode.

Return values
None

◆ HAL_DBGMCU_EnableDBGSleepMode()

void HAL_DBGMCU_EnableDBGSleepMode ( void  )

Enable the Debug Module during Domain1/CDomain SLEEP mode.

Return values
None

◆ HAL_DBGMCU_EnableDBGStandbyMode()

void HAL_DBGMCU_EnableDBGStandbyMode ( void  )

Enable the Debug Module during Domain1/CDomain STANDBY mode.

Return values
None

◆ HAL_DBGMCU_EnableDBGStopMode()

void HAL_DBGMCU_EnableDBGStopMode ( void  )

Enable the Debug Module during Domain1/CDomain STOP mode.

Return values
None

◆ HAL_Delay()

__weak void HAL_Delay ( uint32_t  Delay)

This function provides minimum delay (in milliseconds) based on variable incremented.

Note
In the default implementation , SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals where uwTick is incremented.
This function is declared as __weak to be overwritten in case of other implementations in user file.
Parameters
Delayspecifies the delay time length, in milliseconds.
Return values
None

◆ HAL_DisableCompensationCell()

void HAL_DisableCompensationCell ( void  )

Power-down the I/O Compensation Cell.

Note
The I/O compensation cell can be used only when the device supply voltage ranges from 1.62 to 2.0 V and from 2.7 to 3.6 V.
Return values
None

◆ HAL_EnableCompensationCell()

void HAL_EnableCompensationCell ( void  )

Enables the I/O Compensation Cell.

Note
The I/O compensation cell can be used only when the device supply voltage ranges from 1.62 to 2.0 V and from 2.7 to 3.6 V.
Return values
None

◆ HAL_EXTI_D1_ClearFlag()

void HAL_EXTI_D1_ClearFlag ( uint32_t  EXTI_Line)

Clears the EXTI's line pending flags for Domain D1.

Parameters
EXTI_LineSpecifies the EXTI LINE, it can be one of the following values, (EXTI_LINE0....EXTI_LINE87)excluding :line45, line81,line83 which are reserved
Return values
None

◆ HAL_EXTI_D1_EventInputConfig()

void HAL_EXTI_D1_EventInputConfig ( uint32_t  EXTI_Line,
uint32_t  EXTI_Mode,
uint32_t  EXTI_LineCmd 
)

Configure the EXTI input event line for Domain D1.

Parameters
EXTI_LineSpecifies the EXTI LINE, it can be one of the following values, (EXTI_LINE0....EXTI_LINE87)excluding :line45, line81,line83 which are reserved
EXTI_ModeSpecifies which EXTI line is used as interrupt or an event. This parameter can be one or a combination of the following values :
  • EXTI_MODE_IT : Interrupt Mode selected
  • EXTI_MODE_EVT : Event Mode selected
EXTI_LineCmdcontrols (Enable/Disable) the EXTI line.
Return values
None

◆ HAL_EXTI_D3_EventInputConfig()

void HAL_EXTI_D3_EventInputConfig ( uint32_t  EXTI_Line,
uint32_t  EXTI_LineCmd,
uint32_t  EXTI_ClearSrc 
)

Configure the EXTI input event line for Domain D3.

Parameters
EXTI_LineSpecifies the EXTI LINE, it can be one of the following values, (EXTI_LINE0...EXTI_LINE15),(EXTI_LINE19...EXTI_LINE21),EXTI_LINE25, EXTI_LINE34, EXTI_LINE35,EXTI_LINE41,(EXTI_LINE48...EXTI_LINE53)
EXTI_LineCmdcontrols (Enable/Disable) the EXTI line.
EXTI_ClearSrcSpecifies the clear source of D3 pending event. This parameter can be one of the following values :
  • BDMA_CH6_CLEAR : BDMA ch6 event selected as D3 domain pendclear source
  • BDMA_CH7_CLEAR : BDMA ch7 event selected as D3 domain pendclear source
  • LPTIM4_OUT_CLEAR : LPTIM4 out selected as D3 domain pendclear source
  • LPTIM5_OUT_CLEAR : LPTIM5 out selected as D3 domain pendclear source
Return values
None

◆ HAL_EXTI_EdgeConfig()

void HAL_EXTI_EdgeConfig ( uint32_t  EXTI_Line,
uint32_t  EXTI_Edge 
)

Configure the EXTI input event line edge.

Note
No edge configuration for direct lines but for configurable lines:(EXTI_LINE0..EXTI_LINE21), EXTI_LINE49,EXTI_LINE51,EXTI_LINE82,EXTI_LINE84,EXTI_LINE85 and EXTI_LINE86.
Parameters
EXTI_LineSpecifies the EXTI LINE, it can be one of the following values, (EXTI_LINE0....EXTI_LINE87)excluding :line45, line81,line83 which are reserved
EXTI_EdgeSpecifies EXTI line Edge used. This parameter can be one of the following values :
  • EXTI_RISING_EDGE : Configurable line, with Rising edge trigger detection
  • EXTI_FALLING_EDGE: Configurable line, with Falling edge trigger detection
Return values
None

◆ HAL_EXTI_GenerateSWInterrupt()

void HAL_EXTI_GenerateSWInterrupt ( uint32_t  EXTI_Line)

Generates a Software interrupt on selected EXTI line.

Parameters
EXTI_LineSpecifies the EXTI LINE, it can be one of the following values, (EXTI_LINE0..EXTI_LINE21),EXTI_LINE49,EXTI_LINE51,EXTI_LINE82,EXTI_LINE84,EXTI_LINE85 and EXTI_LINE86.
Return values
None

◆ HAL_GetDEVID()

uint32_t HAL_GetDEVID ( void  )

Returns the device identifier.

Return values
Deviceidentifier

◆ HAL_GetFMCMemorySwappingConfig()

uint32_t HAL_GetFMCMemorySwappingConfig ( void  )

Get FMC Bank mapping mode.

Return values
TheFMC Bank mapping mode. This parameter can be FMC_SWAPBMAP_DISABLE, FMC_SWAPBMAP_SDRAM_SRAM, FMC_SWAPBMAP_SDRAMB2

◆ HAL_GetHalVersion()

uint32_t HAL_GetHalVersion ( void  )

Returns the HAL revision.

Return values
version: 0xXYZR (8bits for each decimal, R for RC)

◆ HAL_GetREVID()

uint32_t HAL_GetREVID ( void  )

Returns the device revision identifier.

Return values
Devicerevision identifier

◆ HAL_GetTick()

__weak uint32_t HAL_GetTick ( void  )

Provides a tick value in millisecond.

Note
This function is declared as __weak to be overwritten in case of other implementations in user file.
Return values
tickvalue

◆ HAL_GetTickFreq()

HAL_TickFreqTypeDef HAL_GetTickFreq ( void  )

Return tick frequency.

Return values
Tickfrequency. Value of HAL_TickFreqTypeDef.

◆ HAL_GetTickPrio()

uint32_t HAL_GetTickPrio ( void  )

This function returns a tick priority.

Return values
tickpriority

◆ HAL_GetUIDw0()

uint32_t HAL_GetUIDw0 ( void  )

Return the first word of the unique device identifier (UID based on 96 bits)

Return values
Deviceidentifier

◆ HAL_GetUIDw1()

uint32_t HAL_GetUIDw1 ( void  )

Return the second word of the unique device identifier (UID based on 96 bits)

Return values
Deviceidentifier

◆ HAL_GetUIDw2()

uint32_t HAL_GetUIDw2 ( void  )

Return the third word of the unique device identifier (UID based on 96 bits)

Return values
Deviceidentifier

◆ HAL_IncTick()

__weak void HAL_IncTick ( void  )

This function is called to increment a global variable "uwTick" used as application time base.

Note
In the default implementation, this variable is incremented each 1ms in Systick ISR.
This function is declared as __weak to be overwritten in case of other implementations in user file.
Return values
None

◆ HAL_ResumeTick()

__weak void HAL_ResumeTick ( void  )

Resume Tick increment.

Note
In the default implementation , SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals. Once HAL_ResumeTick() is called, the SysTick interrupt will be enabled and so Tick increment is resumed.
This function is declared as __weak to be overwritten in case of other implementations in user file.
Return values
None

◆ HAL_SetFMCMemorySwappingConfig()

void HAL_SetFMCMemorySwappingConfig ( uint32_t  BankMapConfig)

Set the FMC Memory Mapping Swapping config.

Parameters
BankMapConfigDefines the FMC Bank mapping configuration. This parameter can be FMC_SWAPBMAP_DISABLE, FMC_SWAPBMAP_SDRAM_SRAM, FMC_SWAPBMAP_SDRAMB2
Return values
HALstate

◆ HAL_SetTickFreq()

HAL_StatusTypeDef HAL_SetTickFreq ( HAL_TickFreqTypeDef  Freq)

Set new tick Freq.

Return values
Status

◆ HAL_SuspendTick()

__weak void HAL_SuspendTick ( void  )

Suspend Tick increment.

Note
In the default implementation , SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals. Once HAL_SuspendTick() is called, the SysTick interrupt will be disabled and so Tick increment is suspended.
This function is declared as __weak to be overwritten in case of other implementations in user file.
Return values
None

◆ HAL_SYSCFG_AnalogSwitchConfig()

void HAL_SYSCFG_AnalogSwitchConfig ( uint32_t  SYSCFG_AnalogSwitch,
uint32_t  SYSCFG_SwitchState 
)

Analog Switch control for dual analog pads.

Parameters
SYSCFG_AnalogSwitchSelects the analog pad This parameter can be one or a combination of the following values:
  • SYSCFG_SWITCH_PA0 : Select PA0 analog switch
  • SYSCFG_SWITCH_PA1: Select PA1 analog switch
  • SYSCFG_SWITCH_PC2 : Select PC2 analog switch
  • SYSCFG_SWITCH_PC3: Select PC3 analog switch
SYSCFG_SwitchStateOpen or Close the analog switch between dual pads (PXn and PXn_C) This parameter can be one or a combination of the following values:
  • SYSCFG_SWITCH_PA0_OPEN
  • SYSCFG_SWITCH_PA0_CLOSE
  • SYSCFG_SWITCH_PA1_OPEN
  • SYSCFG_SWITCH_PA1_CLOSE
  • SYSCFG_SWITCH_PC2_OPEN
  • SYSCFG_SWITCH_PC2_CLOSE
  • SYSCFG_SWITCH_PC3_OPEN
  • SYSCFG_SWITCH_PC3_CLOSE
Return values
None

◆ HAL_SYSCFG_CompensationCodeConfig()

void HAL_SYSCFG_CompensationCodeConfig ( uint32_t  SYSCFG_PMOSCode,
uint32_t  SYSCFG_NMOSCode 
)

Code selection for the I/O Compensation cell.

Parameters
SYSCFG_PMOSCodePMOS compensation code This code is applied to the I/O compensation cell when the CS bit of the SYSCFG_CMPCR is set
SYSCFG_NMOSCodeNMOS compensation code This code is applied to the I/O compensation cell when the CS bit of the SYSCFG_CMPCR is set
Return values
None

◆ HAL_SYSCFG_CompensationCodeSelect()

void HAL_SYSCFG_CompensationCodeSelect ( uint32_t  SYSCFG_CompCode)

Code selection for the I/O Compensation cell.

Parameters
SYSCFG_CompCodeSelects the code to be applied for the I/O compensation cell This parameter can be one of the following values:
  • SYSCFG_CELL_CODE : Select Code from the cell (available in the SYSCFG_CCVR)
  • SYSCFG_REGISTER_CODE: Select Code from the SYSCFG compensation cell code register (SYSCFG_CCCR)
Return values
None

◆ HAL_SYSCFG_DisableIOSpeedOptimize()

void HAL_SYSCFG_DisableIOSpeedOptimize ( void  )

To Disable optimize the I/O speed when the product voltage is low.

Note
This bit is active only if PRODUCT_BELOW_25V user option bit is set. It must be used only if the product supply voltage is below 2.5 V. Setting this bit when VDD is higher than 2.5 V might be destructive.
Return values
None

◆ HAL_SYSCFG_DisableVREFBUF()

void HAL_SYSCFG_DisableVREFBUF ( void  )

Disable the Internal Voltage Reference buffer (VREFBUF).

Return values
None

◆ HAL_SYSCFG_EnableIOSpeedOptimize()

void HAL_SYSCFG_EnableIOSpeedOptimize ( void  )

To Enable optimize the I/O speed when the product voltage is low.

Note
This bit is active only if PRODUCT_BELOW_25V user option bit is set. It must be used only if the product supply voltage is below 2.5 V. Setting this bit when VDD is higher than 2.5 V might be destructive.
Return values
None

◆ HAL_SYSCFG_EnableVREFBUF()

HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF ( void  )

Enable the Internal Voltage Reference buffer (VREFBUF).

Return values
HAL_OK/HAL_TIMEOUT

◆ HAL_SYSCFG_VREFBUF_HighImpedanceConfig()

void HAL_SYSCFG_VREFBUF_HighImpedanceConfig ( uint32_t  Mode)

Configure the internal voltage reference buffer high impedance mode.

Parameters
Modespecifies 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
None

◆ HAL_SYSCFG_VREFBUF_TrimmingConfig()

void HAL_SYSCFG_VREFBUF_TrimmingConfig ( uint32_t  TrimmingValue)

Tune the Internal Voltage Reference buffer (VREFBUF).

Return values
None

◆ HAL_SYSCFG_VREFBUF_VoltageScalingConfig()

void HAL_SYSCFG_VREFBUF_VoltageScalingConfig ( uint32_t  VoltageScaling)

Configure the internal voltage reference buffer voltage scale.

Parameters
VoltageScalingspecifies the output voltage to achieve This parameter can be one of the following values:
  • SYSCFG_VREFBUF_VOLTAGE_SCALE0: VREF_OUT1 around 2.5 V. This requires VDDA equal to or higher than 2.8 V.
  • SYSCFG_VREFBUF_VOLTAGE_SCALE1: VREF_OUT2 around 2.048 V. This requires VDDA equal to or higher than 2.4 V.
  • SYSCFG_VREFBUF_VOLTAGE_SCALE2: VREF_OUT3 around 1.8 V. This requires VDDA equal to or higher than 2.1 V.
  • SYSCFG_VREFBUF_VOLTAGE_SCALE3: VREF_OUT4 around 1.5 V. This requires VDDA equal to or higher than 1.8 V.
Return values
None