Functions
Peripheral Control functions
Peripheral Driver » HAL Driver » CORTEX » Functions

Cortex control functions. More...

Collaboration diagram for Peripheral Control functions:

## Functions
uint32_t | hal_nvic_get_priority_grouping (void)
| Get the priority grouping field from the NVIC Interrupt Controller. More...
void | hal_nvic_get_priority (IRQn_Type IRQn, uint32_t priority_group, uint32_t *p_preempt_priority, uint32_t *p_sub_priority)
| Get the priority of an interrupt. More...
void | hal_nvic_set_pending_irq (IRQn_Type IRQn)
| Set Pending bit of an external interrupt. More...
uint32_t | hal_nvic_get_pending_irq (IRQn_Type IRQn)
| Get Pending Interrupt (reads the pending register in the NVIC and returns the pending bit for the specified interrupt). More...
void | hal_nvic_clear_pending_irq (IRQn_Type IRQn)
| Clear the pending bit of an external interrupt. More...
uint32_t | hal_nvic_get_active (IRQn_Type IRQn)
| Get active interrupt (reads the active register in NVIC and returns the active bit). More...
void | hal_systick_clk_source_config (uint32_t clk_source)
| Configure the SysTick clock source. More...

## Detailed Description

Cortex control functions.

      ==============================================================================
                          ##### Peripheral Control functions #####
      ==============================================================================
        [..]
          This subsection provides a set of functions allowing to control the CORTEX
          (NVIC, SYSTICK, MPU) functionalities.

## Function Documentation

## ◆ hal_nvic_clear_pending_irq()

void hal_nvic_clear_pending_irq | ( | IRQn_Type | IRQn | ) |

Clear the pending bit of an external interrupt.

Parameters

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

## ◆ hal_nvic_get_active()

uint32_t hal_nvic_get_active | ( | IRQn_Type | IRQn | ) |

Get active interrupt (reads the active register in NVIC and returns the active bit).

Parameters

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

Returns
  status
  - 0 Interrupt status is not pending.
  - 1 Interrupt status is pending.

## ◆ hal_nvic_get_pending_irq()

uint32_t hal_nvic_get_pending_irq | ( | IRQn_Type | IRQn | ) |

Get Pending Interrupt (reads the pending register in the NVIC and returns the pending bit for the specified interrupt).

Parameters

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

Returns
  status
  - 0 Interrupt status is not pending.
  - 1 Interrupt status is pending.

## ◆ hal_nvic_get_priority()

void hal_nvic_get_priority | ( | IRQn_Type | IRQn,
|  | uint32_t | priority_group,
|  | uint32_t * | p_preempt_priority,
|  | uint32_t * | p_sub_priority
| ) |  |

Get the priority of an interrupt.

Parameters

  [in] | IRQn | External interrupt number. This parameter can be an enumerator of IRQn_Type enumeration. (For the complete GR55xx Devices IRQ Channels list, please refer to the appropriate CMSIS device file (gr55xxxx.h))
  [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
  [in] | p_preempt_priority | Pointer on the Preemptive priority value (starting from 0).
  [in] | p_sub_priority | Pointer on the Subpriority value (starting from 0).

## ◆ hal_nvic_get_priority_grouping()

uint32_t hal_nvic_get_priority_grouping | ( | void |  | ) |

Get the priority grouping field from the NVIC Interrupt Controller.

Returns
  Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field)

## ◆ hal_nvic_set_pending_irq()

void hal_nvic_set_pending_irq | ( | IRQn_Type | IRQn | ) |

Set Pending bit of an external interrupt.

Parameters

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

## ◆ hal_systick_clk_source_config()

void hal_systick_clk_source_config | ( | uint32_t | clk_source | ) |

Configure the SysTick clock source.

Parameters

  [in] | clk_source | specifies the SysTick clock source. This parameter can be one of the following values: SYSTICK_CLKSOURCE_REFCLK External Reference Clock as SysTick clock source. SYSTICK_CLKSOURCE_HCLK AHB clock selected as SysTick clock source.