Functions
Initialization and de-initialization functions
Peripheral Driver » HAL Driver » CORTEX » Functions

Initialization and Configuration functions. More...

## Functions
void | hal_nvic_set_priority_grouping (uint32_t priority_group)
| Set the priority grouping field (pre-emption priority and subpriority) using the required unlock sequence. More...
void | hal_nvic_set_priority (IRQn_Type IRQn, uint32_t preempt_priority, uint32_t sub_priority)
| Set the priority of an interrupt. More...
void | hal_nvic_enable_irq (IRQn_Type IRQn)
| Enable a device specific interrupt in the NVIC interrupt controller. More...
void | hal_nvic_disable_irq (IRQn_Type IRQn)
| Disable a device specific interrupt in the NVIC interrupt controller. More...
void | hal_nvic_system_reset (void)
| Initiate a system reset request to reset the MCU. More...
uint32_t | hal_systick_config (uint32_t ticks_number)
| Initialize the System Timer and its interrupt, and start the System Tick Timer. Counter is in free running mode to generate periodic interrupts. More...

## 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_disable_irq()

void hal_nvic_disable_irq | ( | IRQn_Type | IRQn | ) |

Disable a device specific interrupt in the NVIC interrupt controller.

Parameters

  [in] | IRQn | External interrupt number. This parameter can be an enumerator of IRQn_Type enumeration (For the complete GR533x Devices IRQ Channels list, please refer to the appropriate CMSIS device file (gr533xxx.h))

## ◆ hal_nvic_enable_irq()

void hal_nvic_enable_irq | ( | IRQn_Type | IRQn | ) |

Enable a device specific interrupt in the NVIC interrupt controller.

Note
  To configure interrupts priority correctly, the NVIC_PriorityGroupConfig() function should be called before.

Parameters

  [in] | IRQn | External interrupt number. This parameter can be an enumerator of IRQn_Type enumeration (For the complete GR533x Devices IRQ Channels list, please refer to the appropriate CMSIS device file (gr533xxx.h))

## ◆ hal_nvic_set_priority()

void hal_nvic_set_priority | ( | IRQn_Type | IRQn,
|  | uint32_t | preempt_priority,
|  | uint32_t | sub_priority
| ) |  |

Set the priority of an interrupt.

Parameters

  [in] | IRQn | External interrupt number. This parameter can be an enumerator of IRQn_Type enumeration (For the complete GR533x Devices IRQ Channels list, please refer to the appropriate CMSIS device file (gr533xxx.h))
  [in] | preempt_priority | The pre-emption priority for the IRQn channel. This parameter can be a value between 0 and 127 as described in the table CORTEX_NVIC_Priority_Table. A lower priority value indicates a higher priority
  [in] | sub_priority | The subpriority level for the IRQ channel. This parameter can be a value between 0 and 255 as described in the table CORTEX_NVIC_Priority_Table. A lower priority value indicates a higher priority.

## ◆ hal_nvic_set_priority_grouping()

void hal_nvic_set_priority_grouping | ( | uint32_t | priority_group | ) |

Set the priority grouping field (pre-emption priority and subpriority) using the required unlock sequence.

Note
  When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible. The pending IRQ priority will be managed only by the subpriority.

Parameters

  [in] | priority_group | The priority grouping bits length. This parameter can be one of the following values: NVIC_PRIORITYGROUP_0 0 bit for pre-emption priority, 8 bits for subpriority NVIC_PRIORITYGROUP_1 1 bit for pre-emption priority, 7 bits for subpriority NVIC_PRIORITYGROUP_2 2 bits for pre-emption priority, 6 bits for subpriority NVIC_PRIORITYGROUP_3 3 bits for pre-emption priority, 5 bits for subpriority NVIC_PRIORITYGROUP_4 4 bits for pre-emption priority, 4 bits for subpriority NVIC_PRIORITYGROUP_5 5 bits for pre-emption priority, 3 bits for subpriority NVIC_PRIORITYGROUP_6 6 bits for pre-emption priority, 2 bits for subpriority NVIC_PRIORITYGROUP_7 7 bits for pre-emption priority, 1 bit for subpriority

## ◆ hal_nvic_system_reset()

void hal_nvic_system_reset | ( | void |  | ) |

Initiate a system reset request to reset the MCU.

## ◆ hal_systick_config()

uint32_t hal_systick_config | ( | uint32_t | ticks_number | ) |

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

Parameters

  [in] | ticks_number | Specifies the number of ticks between two interrupts.

Return values

  status | 0 Function succeeded. 1 Function failed.