思澈科技软件开发工具包  2.20

Functions

HAL_StatusTypeDef HAL_Init (void)
 Configure the Flash prefetch, the Instruction and Data caches, the time base source, NVIC and any required global low level hardware by calling the HAL_MspInit() callback function to be optionally defined in user file bf0_hal_msp.c. More...
 
void HAL_PreInit (void)
 Before HAL_Init is called, board specific initialization. More...
 
void HAL_PostMspInit (void)
 It's called after HAL_PreInit in HAL_Init. More...
 
HAL_StatusTypeDef HAL_DeInit (void)
 De-initialize common part of the HAL and stop the source of time base. More...
 
void HAL_MspInit (void)
 Initialize the MSP. More...
 
void HAL_MspDeInit (void)
 DeInitialize the MSP. More...
 
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
 This function configures the source of the time base: The time source is configured to have 1ms time base with a dedicated Tick interrupt priority. More...
 

Detailed Description

Function Documentation

◆ HAL_DeInit()

HAL_StatusTypeDef HAL_DeInit ( void  )

De-initialize common part of the HAL and stop the source of time base.

Note
This function is optional.
Return values
HALstatus

◆ HAL_Init()

HAL_StatusTypeDef HAL_Init ( void  )

Configure the Flash prefetch, the Instruction and Data caches, the time base source, NVIC and any required global low level hardware by calling the HAL_MspInit() callback function to be optionally defined in user file bf0_hal_msp.c.

Note
HAL_Init() function is called at the beginning of program after reset and before the clock configuration.
In the default implementation the System Timer (Systick) is used as source of time base. The Systick configuration is based on MSI clock, as MSI is the clock used after a system Reset and the NVIC configuration is set to Priority group 4. Once done, time base tick starts incrementing: the tick variable counter is incremented each 1ms in the SysTick_Handler() interrupt handler.
Return values
HALstatus

◆ HAL_InitTick()

HAL_StatusTypeDef HAL_InitTick ( uint32_t  TickPriority)

This function configures the source of the time base: The time source is configured to have 1ms time base with a dedicated Tick interrupt priority.

Note
This function is called automatically at the beginning of program after reset by HAL_Init() or at any time when clock is reconfigured by HAL_RCC_ClockConfig().
In the default implementation, SysTick timer is the source of time base. It is used to generate interrupts at regular time intervals. Care must be taken if HAL_Delay() is called from a peripheral ISR process, The SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. The function is declared as __weak to be overwritten in case of other implementation in user file.
Parameters
TickPriorityTick interrupt priority.
Return values
HALstatus

◆ HAL_MspDeInit()

void HAL_MspDeInit ( void  )

DeInitialize the MSP.

Return values
None

◆ HAL_MspInit()

void HAL_MspInit ( void  )

Initialize the MSP.

Return values
None

◆ HAL_PostMspInit()

void HAL_PostMspInit ( void  )

It's called after HAL_PreInit in HAL_Init.

Return values
None

◆ HAL_PreInit()

void HAL_PreInit ( void  )

Before HAL_Init is called, board specific initialization.

Return values
None