STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Initialization and de-initialization functions

Initialization and Configuration functions. More...

Collaboration diagram for Initialization and de-initialization functions:

Functions

void HAL_NVIC_SetPriorityGrouping (uint32_t PriorityGroup)
 Sets the priority grouping field (preemption priority and subpriority) using the required unlock sequence.
 
void HAL_NVIC_SetPriority (IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
 Sets the priority of an interrupt.
 
void HAL_NVIC_EnableIRQ (IRQn_Type IRQn)
 Enables a device specific interrupt in the NVIC interrupt controller.
 
void HAL_NVIC_DisableIRQ (IRQn_Type IRQn)
 Disables a device specific interrupt in the NVIC interrupt controller.
 
void HAL_NVIC_SystemReset (void)
 Initiates a system reset request to reset the MCU.
 
uint32_t HAL_SYSTICK_Config (uint32_t TicksNumb)
 Initializes the System Timer and its interrupt, and starts the System Tick Timer. Counter is in free running mode to generate periodic interrupts.
 

Detailed Description

Initialization and Configuration functions.

  ==============================================================================
              ##### Initialization and de-initialization functions #####
  ==============================================================================
    [..]
      This section provides the CORTEX HAL driver functions allowing to configure Interrupts
      Systick functionalities 

Function Documentation

◆ HAL_NVIC_SetPriorityGrouping()

void HAL_NVIC_SetPriorityGrouping ( uint32_t PriorityGroup)

#include <stm32f4xx_hal_cortex.h>

Sets the priority grouping field (preemption priority and subpriority) using the required unlock sequence.

Parameters
PriorityGroupThe priority grouping bits length. This parameter can be one of the following values:
  • NVIC_PRIORITYGROUP_0: 0 bits for preemption priority 4 bits for subpriority
  • NVIC_PRIORITYGROUP_1: 1 bits for preemption priority 3 bits for subpriority
  • NVIC_PRIORITYGROUP_2: 2 bits for preemption priority 2 bits for subpriority
  • NVIC_PRIORITYGROUP_3: 3 bits for preemption priority 1 bits for subpriority
  • NVIC_PRIORITYGROUP_4: 4 bits for preemption priority 0 bits for subpriority
Note
When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible. The pending IRQ priority will be managed only by the subpriority.
Return values
None

Definition at line 141 of file stm32f4xx_hal_cortex.c.

References assert_param, and IS_NVIC_PRIORITY_GROUP.

Referenced by HAL_Init().

◆ HAL_NVIC_SetPriority()

void HAL_NVIC_SetPriority ( IRQn_Type IRQn,
uint32_t PreemptPriority,
uint32_t SubPriority )

#include <stm32f4xx_hal_cortex.h>

Sets the priority of an interrupt.

Parameters
IRQnExternal interrupt number. This parameter can be an enumerator of IRQn_Type enumeration (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f4xxxx.h))
PreemptPriorityThe preemption priority for the IRQn channel. This parameter can be a value between 0 and 15 A lower priority value indicates a higher priority
SubPrioritythe subpriority level for the IRQ channel. This parameter can be a value between 0 and 15 A lower priority value indicates a higher priority.
Return values
None

Definition at line 163 of file stm32f4xx_hal_cortex.c.

References assert_param, IS_NVIC_PREEMPTION_PRIORITY, and IS_NVIC_SUB_PRIORITY.

Referenced by HAL_InitTick().

◆ HAL_NVIC_EnableIRQ()

void HAL_NVIC_EnableIRQ ( IRQn_Type IRQn)

#include <stm32f4xx_hal_cortex.h>

Enables a device specific interrupt in the NVIC interrupt controller.

Note
To configure interrupts priority correctly, the NVIC_PriorityGroupConfig() function should be called before.
Parameters
IRQnExternal interrupt number. This parameter can be an enumerator of IRQn_Type enumeration (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f4xxxx.h))
Return values
None

Definition at line 185 of file stm32f4xx_hal_cortex.c.

References assert_param, and IS_NVIC_DEVICE_IRQ.

Referenced by HAL_InitTick().

◆ HAL_NVIC_DisableIRQ()

void HAL_NVIC_DisableIRQ ( IRQn_Type IRQn)

#include <stm32f4xx_hal_cortex.h>

Disables a device specific interrupt in the NVIC interrupt controller.

Parameters
IRQnExternal interrupt number. This parameter can be an enumerator of IRQn_Type enumeration (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f4xxxx.h))
Return values
None

Definition at line 201 of file stm32f4xx_hal_cortex.c.

References assert_param, and IS_NVIC_DEVICE_IRQ.

◆ HAL_NVIC_SystemReset()

void HAL_NVIC_SystemReset ( void )

#include <stm32f4xx_hal_cortex.h>

Initiates a system reset request to reset the MCU.

Return values
None

Definition at line 214 of file stm32f4xx_hal_cortex.c.

◆ HAL_SYSTICK_Config()

uint32_t HAL_SYSTICK_Config ( uint32_t TicksNumb)

#include <stm32f4xx_hal_cortex.h>

Initializes the System Timer and its interrupt, and starts the System Tick Timer. Counter is in free running mode to generate periodic interrupts.

Parameters
TicksNumbSpecifies the ticks Number of ticks between two interrupts.
Return values
status- 0 Function succeeded.
  • 1 Function failed.

Definition at line 227 of file stm32f4xx_hal_cortex.c.

Referenced by HAL_InitTick().