|
STM32G474xx HAL User Manual
|
HAL初始化和反初始化函数。 更多...
函数 | |
| HAL_StatusTypeDef | HAL_Init (void) |
| 此函数用于配置Flash预取、指令和数据缓存、时基源、NVIC以及任何所需的全局底层硬件,通过调用HAL_MspInit()回调函数,该函数可选择在用户文件stm32g4xx_hal_msp.c中定义。 | |
| HAL_StatusTypeDef | HAL_DeInit (void) |
| 此函数反初始化HAL的公共部分并停止时基源。 | |
| __weak void | HAL_MspInit (void) |
| 初始化MSP。 | |
| __weak void | HAL_MspDeInit (void) |
| 反初始化MSP。 | |
| __weak HAL_StatusTypeDef | HAL_InitTick (uint32_t TickPriority) |
| 此函数配置时基源:配置时基源以提供1ms的时间基准,并具有专用的Tick中断优先级。 | |
HAL初始化和反初始化函数。
===============================================================================
##### Initialization and Configuration functions #####
===============================================================================
[..] This section provide functions allowing to:
(+) Initialize the Flash interface the NVIC allocation and initial time base
clock configuration.
(+) De-Initialize common part of the HAL.
(+) Configure the time base source to have 1ms time base with a dedicated
Tick interrupt priority.
(++) SysTick timer is used by default as source of time base, but user
can eventually implement his proper time base source (a general purpose
timer for example or other time source), keeping in mind that Time base
duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
handled in milliseconds basis.
(++) Time base configuration function (HAL_InitTick ()) is called automatically
at the beginning of the program after reset by HAL_Init() or at any time
when clock is configured, by HAL_RCC_ClockConfig().
(++) Source of time base is configured to generate interrupts at regular
time intervals. Care must be taken if HAL_Delay() is called from a
peripheral ISR process, the Tick interrupt line must have higher priority
(numerically lower) than the peripheral interrupt. Otherwise the caller
ISR process will be blocked.
(++) functions affecting time base configurations are declared as __weak
to make override possible in case of other implementations in user file.
| HAL_StatusTypeDef HAL_DeInit | ( | void | ) |
此函数反初始化HAL的公共部分并停止时基源。
| HAL | 状态 |
定义于文件stm32g4xx_hal.c的第192行。
参考文献 __HAL_RCC_AHB1_FORCE_RESET, __HAL_RCC_AHB1_RELEASE_RESET, __HAL_RCC_AHB2_FORCE_RESET, __HAL_RCC_AHB2_RELEASE_RESET, __HAL_RCC_AHB3_FORCE_RESET, __HAL_RCC_AHB3_RELEASE_RESET, __HAL_RCC_APB1_FORCE_RESET, __HAL_RCC_APB1_RELEASE_RESET, __HAL_RCC_APB2_FORCE_RESET, __HAL_RCC_APB2_RELEASE_RESET, 和 HAL_MspDeInit().
| HAL_StatusTypeDef HAL_Init | ( | void | ) |
此函数用于配置Flash预取、指令和数据缓存、时基源、NVIC以及任何所需的全局底层硬件,通过调用HAL_MspInit()回调函数,该函数可选择在用户文件stm32g4xx_hal_msp.c中定义。
| HAL | 状态 |
定义于文件stm32g4xx_hal.c的第148行。
参考文献 __HAL_FLASH_DATA_CACHE_DISABLE, __HAL_FLASH_INSTRUCTION_CACHE_DISABLE, __HAL_FLASH_PREFETCH_BUFFER_ENABLE, HAL_InitTick(), HAL_MspInit(), HAL_NVIC_SetPriorityGrouping(), NVIC_PRIORITYGROUP_4, 和 TICK_INT_PRIORITY.
| HAL_StatusTypeDef HAL_InitTick | ( | uint32_t | TickPriority | ) |
此函数配置时基源:配置时基源以提供1ms的时间基准,并具有专用的Tick中断优先级。
| TickPriority,: | Tick中断优先级。 |
| HAL | 状态 |
定义于文件stm32g4xx_hal.c的第255行。
参考文献 HAL_NVIC_SetPriority(), HAL_SYSTICK_Config(), uwTickFreq, 和 uwTickPrio.
被以下函数引用:HAL_Init(), HAL_RCC_ClockConfig(), HAL_RCC_DeInit(), HAL_RCC_OscConfig(), 和 HAL_SetTickFreq().
| void HAL_MspDeInit | ( | void | ) |
| void HAL_MspInit | ( | void | ) |
1.7.6.1