92#ifdef HAL_CORTEX_MODULE_ENABLED
147 NVIC_SetPriorityGrouping(PriorityGroup);
165 uint32_t prioritygroup = 0x00U;
171 prioritygroup = NVIC_GetPriorityGrouping();
173 NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
191 NVIC_EnableIRQ(IRQn);
207 NVIC_DisableIRQ(IRQn);
229 return SysTick_Config(TicksNumb);
251#if (__MPU_PRESENT == 1U)
256void HAL_MPU_Disable(
void)
262 SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
279void HAL_MPU_Enable(uint32_t MPU_Control)
282 MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
285 SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
296void HAL_MPU_EnableRegion(uint32_t RegionNumber)
302 MPU->RNR = RegionNumber;
305 SET_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk);
312void HAL_MPU_DisableRegion(uint32_t RegionNumber)
318 MPU->RNR = RegionNumber;
321 CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk);
330void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init)
335 assert_param(IS_MPU_INSTRUCTION_ACCESS(MPU_Init->DisableExec));
336 assert_param(IS_MPU_REGION_PERMISSION_ATTRIBUTE(MPU_Init->AccessPermission));
338 assert_param(IS_MPU_ACCESS_SHAREABLE(MPU_Init->IsShareable));
339 assert_param(IS_MPU_ACCESS_CACHEABLE(MPU_Init->IsCacheable));
340 assert_param(IS_MPU_ACCESS_BUFFERABLE(MPU_Init->IsBufferable));
341 assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable));
345 MPU->RNR = MPU_Init->Number;
348 CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk);
351 MPU->RBAR = MPU_Init->BaseAddress;
352 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
353 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
354 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) |
355 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) |
356 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) |
357 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) |
358 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) |
359 ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
360 ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos);
381 return NVIC_GetPriorityGrouping();
405void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority)
410 NVIC_DecodePriority(NVIC_GetPriority(IRQn), PriorityGroup, pPreemptPriority, pSubPriority);
426 NVIC_SetPendingIRQ(IRQn);
444 return NVIC_GetPendingIRQ(IRQn);
460 NVIC_ClearPendingIRQ(IRQn);
477 return NVIC_GetActive(IRQn);
498 SysTick->CTRL &= ~SYSTICK_CLKSOURCE_HCLK;
void HAL_NVIC_DisableIRQ(IRQn_Type IRQn)
Disables a device specific interrupt in the NVIC interrupt controller.
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.
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 ...
void HAL_NVIC_SystemReset(void)
Initiates a system reset request to reset the MCU.
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
Sets the priority grouping field (preemption priority and subpriority) using the required unlock sequ...
void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn)
Clears the pending bit of an external interrupt.
void HAL_CORTEX_ClearEvent(void)
Clear pending events.
void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource)
Configures the SysTick clock source.
uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn)
Gets Pending Interrupt (reads the pending register in the NVIC and returns the pending bit for the sp...
void HAL_SYSTICK_IRQHandler(void)
This function handles SYSTICK interrupt request.
void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority)
Gets the priority of an interrupt.
uint32_t HAL_NVIC_GetPriorityGrouping(void)
Gets the priority grouping field from the NVIC Interrupt Controller.
void HAL_SYSTICK_Callback(void)
SYSTICK callback.
uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn)
Gets active interrupt ( reads the active register in NVIC and returns the active bit).
void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn)
Sets Pending bit of an external interrupt.
#define IS_NVIC_SUB_PRIORITY(PRIORITY)
#define IS_SYSTICK_CLK_SOURCE(SOURCE)
#define IS_NVIC_PRIORITY_GROUP(GROUP)
#define IS_NVIC_DEVICE_IRQ(IRQ)
#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY)
#define SYSTICK_CLKSOURCE_HCLK
#define assert_param(expr)
This file contains all the functions prototypes for the HAL module driver.