Peripheral Control functions

Cortex control functions. More...

Functions

void hal_mpu_config_region (mpu_region_init_t *p_mpu_init)
 Initialize and configures the Region and the memory to be protected. More...
 
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_mpu_config_region()

void hal_mpu_config_region ( mpu_region_init_t p_mpu_init)

Initialize and configures the Region and the memory to be protected.

Parameters
[in]p_mpu_initPointer to a mpu_region_init_t structure that contains the initialization and configuration information.

◆ hal_nvic_clear_pending_irq()

void hal_nvic_clear_pending_irq ( IRQn_Type  IRQn)

Clear the pending bit of an external interrupt.

Parameters
[in]IRQnExternal 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]IRQnExternal 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]IRQnExternal 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]IRQnExternal 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_groupThe priority grouping bits length. This parameter can be one of the following values:
[in]p_preempt_priorityPointer on the Preemptive priority value (starting from 0).
[in]p_sub_priorityPointer 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]IRQnExternal 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_sourcespecifies the SysTick clock source. This parameter can be one of the following values: