/** ****************************************************************************** * @file stm32f4xx_hal_cortex.h * @author MCD Application Team * @brief Header file of CORTEX HAL module. ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file in * the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. ****************************************************************************** *//* ... *//* Define to prevent recursive inclusion -------------------------------------*/#ifndef__STM32F4xx_HAL_CORTEX_H#define__STM32F4xx_HAL_CORTEX_H#ifdef__cplusplusextern"C"{#endif/* Includes ------------------------------------------------------------------*/#include"stm32f4xx_hal_def.h"/** @addtogroup STM32F4xx_HAL_Driver * @{ *//* ... *//** @addtogroup CORTEX * @{ *//* ... */Includes/* Exported types ------------------------------------------------------------*//** @defgroup CORTEX_Exported_Types Cortex Exported Types * @{ *//* ... */#if(__MPU_PRESENT==1U)/** @defgroup CORTEX_MPU_Region_Initialization_Structure_definition MPU Region Initialization Structure Definition * @brief MPU Region initialization structure * @{ *//* ... */typedefstruct{uint8_tEnable;/*!< Specifies the status of the region. This parameter can be a value of @ref CORTEX_MPU_Region_Enable *//* ... */uint8_tNumber;/*!< Specifies the number of the region to protect. This parameter can be a value of @ref CORTEX_MPU_Region_Number *//* ... */uint32_tBaseAddress;/*!< Specifies the base address of the region to protect. */uint8_tSize;/*!< Specifies the size of the region to protect. This parameter can be a value of @ref CORTEX_MPU_Region_Size *//* ... */uint8_tSubRegionDisable;/*!< Specifies the number of the subregion protection to disable. This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF *//* ... */uint8_tTypeExtField;/*!< Specifies the TEX field level. This parameter can be a value of @ref CORTEX_MPU_TEX_Levels *//* ... */uint8_tAccessPermission;/*!< Specifies the region access permission type. This parameter can be a value of @ref CORTEX_MPU_Region_Permission_Attributes *//* ... */uint8_tDisableExec;/*!< Specifies the instruction access status. This parameter can be a value of @ref CORTEX_MPU_Instruction_Access *//* ... */uint8_tIsShareable;/*!< Specifies the shareability status of the protected region. This parameter can be a value of @ref CORTEX_MPU_Access_Shareable *//* ... */uint8_tIsCacheable;/*!< Specifies the cacheable status of the region protected. This parameter can be a value of @ref CORTEX_MPU_Access_Cacheable *//* ... */uint8_tIsBufferable;/*!< Specifies the bufferable status of the protected region. This parameter can be a value of @ref CORTEX_MPU_Access_Bufferable *//* ... */...}MPU_Region_InitTypeDef;/** * @} *//* ... *//* ... */#endif/* __MPU_PRESENT *//** * @} *//* ... */Exported types/* Exported constants --------------------------------------------------------*//** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants * @{ *//* ... *//** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group * @{ *//* ... */#defineNVIC_PRIORITYGROUP_00x00000007U/*!< 0 bits for pre-emption priority 4 bits for subpriority *//* ... */#defineNVIC_PRIORITYGROUP_10x00000006U/*!< 1 bits for pre-emption priority 3 bits for subpriority *//* ... */#defineNVIC_PRIORITYGROUP_20x00000005U/*!< 2 bits for pre-emption priority 2 bits for subpriority *//* ... */#defineNVIC_PRIORITYGROUP_30x00000004U/*!< 3 bits for pre-emption priority 1 bits for subpriority *//* ... */#defineNVIC_PRIORITYGROUP_40x00000003U/*!< 4 bits for pre-emption priority 0 bits for subpriority *//* ... *//** * @} *//* ... *//** @defgroup CORTEX_SysTick_clock_source CORTEX _SysTick clock source * @{ *//* ... */#defineSYSTICK_CLKSOURCE_HCLK_DIV80x00000000U#defineSYSTICK_CLKSOURCE_HCLK0x00000004U7 defines/** * @} *//* ... */#if(__MPU_PRESENT==1)/** @defgroup CORTEX_MPU_HFNMI_PRIVDEF_Control MPU HFNMI and PRIVILEGED Access control * @{ *//* ... */#defineMPU_HFNMI_PRIVDEF_NONE0x00000000U#defineMPU_HARDFAULT_NMIMPU_CTRL_HFNMIENA_Msk#defineMPU_PRIVILEGED_DEFAULTMPU_CTRL_PRIVDEFENA_Msk#defineMPU_HFNMI_PRIVDEF(MPU_CTRL_HFNMIENA_Msk|MPU_CTRL_PRIVDEFENA_Msk)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Region_Enable CORTEX MPU Region Enable * @{ *//* ... */#defineMPU_REGION_ENABLE((uint8_t)0x01)#defineMPU_REGION_DISABLE((uint8_t)0x00)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Instruction_Access CORTEX MPU Instruction Access * @{ *//* ... */#defineMPU_INSTRUCTION_ACCESS_ENABLE((uint8_t)0x00)#defineMPU_INSTRUCTION_ACCESS_DISABLE((uint8_t)0x01)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Access_Shareable CORTEX MPU Instruction Access Shareable * @{ *//* ... */#defineMPU_ACCESS_SHAREABLE((uint8_t)0x01)#defineMPU_ACCESS_NOT_SHAREABLE((uint8_t)0x00)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Access_Cacheable CORTEX MPU Instruction Access Cacheable * @{ *//* ... */#defineMPU_ACCESS_CACHEABLE((uint8_t)0x01)#defineMPU_ACCESS_NOT_CACHEABLE((uint8_t)0x00)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Access_Bufferable CORTEX MPU Instruction Access Bufferable * @{ *//* ... */#defineMPU_ACCESS_BUFFERABLE((uint8_t)0x01)#defineMPU_ACCESS_NOT_BUFFERABLE((uint8_t)0x00)/** * @} *//* ... *//** @defgroup CORTEX_MPU_TEX_Levels MPU TEX Levels * @{ *//* ... */#defineMPU_TEX_LEVEL0((uint8_t)0x00)#defineMPU_TEX_LEVEL1((uint8_t)0x01)#defineMPU_TEX_LEVEL2((uint8_t)0x02)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Region_Size CORTEX MPU Region Size * @{ *//* ... */#defineMPU_REGION_SIZE_32B((uint8_t)0x04)#defineMPU_REGION_SIZE_64B((uint8_t)0x05)#defineMPU_REGION_SIZE_128B((uint8_t)0x06)#defineMPU_REGION_SIZE_256B((uint8_t)0x07)#defineMPU_REGION_SIZE_512B((uint8_t)0x08)#defineMPU_REGION_SIZE_1KB((uint8_t)0x09)#defineMPU_REGION_SIZE_2KB((uint8_t)0x0A)#defineMPU_REGION_SIZE_4KB((uint8_t)0x0B)#defineMPU_REGION_SIZE_8KB((uint8_t)0x0C)#defineMPU_REGION_SIZE_16KB((uint8_t)0x0D)#defineMPU_REGION_SIZE_32KB((uint8_t)0x0E)#defineMPU_REGION_SIZE_64KB((uint8_t)0x0F)#defineMPU_REGION_SIZE_128KB((uint8_t)0x10)#defineMPU_REGION_SIZE_256KB((uint8_t)0x11)#defineMPU_REGION_SIZE_512KB((uint8_t)0x12)#defineMPU_REGION_SIZE_1MB((uint8_t)0x13)#defineMPU_REGION_SIZE_2MB((uint8_t)0x14)#defineMPU_REGION_SIZE_4MB((uint8_t)0x15)#defineMPU_REGION_SIZE_8MB((uint8_t)0x16)#defineMPU_REGION_SIZE_16MB((uint8_t)0x17)#defineMPU_REGION_SIZE_32MB((uint8_t)0x18)#defineMPU_REGION_SIZE_64MB((uint8_t)0x19)#defineMPU_REGION_SIZE_128MB((uint8_t)0x1A)#defineMPU_REGION_SIZE_256MB((uint8_t)0x1B)#defineMPU_REGION_SIZE_512MB((uint8_t)0x1C)#defineMPU_REGION_SIZE_1GB((uint8_t)0x1D)#defineMPU_REGION_SIZE_2GB((uint8_t)0x1E)#defineMPU_REGION_SIZE_4GB((uint8_t)0x1F)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Region_Permission_Attributes CORTEX MPU Region Permission Attributes * @{ *//* ... */#defineMPU_REGION_NO_ACCESS((uint8_t)0x00)#defineMPU_REGION_PRIV_RW((uint8_t)0x01)#defineMPU_REGION_PRIV_RW_URO((uint8_t)0x02)#defineMPU_REGION_FULL_ACCESS((uint8_t)0x03)#defineMPU_REGION_PRIV_RO((uint8_t)0x05)#defineMPU_REGION_PRIV_RO_URO((uint8_t)0x06)/** * @} *//* ... *//** @defgroup CORTEX_MPU_Region_Number CORTEX MPU Region Number * @{ *//* ... */#defineMPU_REGION_NUMBER0((uint8_t)0x00)#defineMPU_REGION_NUMBER1((uint8_t)0x01)#defineMPU_REGION_NUMBER2((uint8_t)0x02)#defineMPU_REGION_NUMBER3((uint8_t)0x03)#defineMPU_REGION_NUMBER4((uint8_t)0x04)#defineMPU_REGION_NUMBER5((uint8_t)0x05)#defineMPU_REGION_NUMBER6((uint8_t)0x06)#defineMPU_REGION_NUMBER7((uint8_t)0x07)59 defines/** * @} *//* ... *//* ... */#endif/* __MPU_PRESENT *//** * @} *//* ... */Exported constants/* Exported Macros -----------------------------------------------------------*//* Exported functions --------------------------------------------------------*//** @addtogroup CORTEX_Exported_Functions * @{ *//* ... *//** @addtogroup CORTEX_Exported_Functions_Group1 * @{ *//* ... *//* Initialization and de-initialization functions *****************************/voidHAL_NVIC_SetPriorityGrouping(uint32_tPriorityGroup);voidHAL_NVIC_SetPriority(IRQn_TypeIRQn,uint32_tPreemptPriority,uint32_tSubPriority);voidHAL_NVIC_EnableIRQ(IRQn_TypeIRQn);voidHAL_NVIC_DisableIRQ(IRQn_TypeIRQn);voidHAL_NVIC_SystemReset(void);uint32_tHAL_SYSTICK_Config(uint32_tTicksNumb);/** * @} *//* ... *//** @addtogroup CORTEX_Exported_Functions_Group2 * @{ *//* ... *//* Peripheral Control functions ***********************************************/uint32_tHAL_NVIC_GetPriorityGrouping(void);voidHAL_NVIC_GetPriority(IRQn_TypeIRQn,uint32_tPriorityGroup,uint32_t*pPreemptPriority,uint32_t*pSubPriority);uint32_tHAL_NVIC_GetPendingIRQ(IRQn_TypeIRQn);voidHAL_NVIC_SetPendingIRQ(IRQn_TypeIRQn);voidHAL_NVIC_ClearPendingIRQ(IRQn_TypeIRQn);uint32_tHAL_NVIC_GetActive(IRQn_TypeIRQn);voidHAL_SYSTICK_CLKSourceConfig(uint32_tCLKSource);voidHAL_SYSTICK_IRQHandler(void);voidHAL_SYSTICK_Callback(void);#if(__MPU_PRESENT==1U)voidHAL_MPU_Enable(uint32_tMPU_Control);voidHAL_MPU_Disable(void);voidHAL_MPU_ConfigRegion(MPU_Region_InitTypeDef*MPU_Init);/* ... */#endif/* __MPU_PRESENT */voidHAL_CORTEX_ClearEvent(void);/** * @} *//* ... *//** * @} *//* ... */Exported functions/* Private types -------------------------------------------------------------*//* Private variables ---------------------------------------------------------*//* Private constants ---------------------------------------------------------*//* Private macros ------------------------------------------------------------*//** @defgroup CORTEX_Private_Macros CORTEX Private Macros * @{ *//* ... */#defineIS_NVIC_PRIORITY_GROUP(GROUP)(((GROUP)==NVIC_PRIORITYGROUP_0)||\((GROUP)==NVIC_PRIORITYGROUP_1)||\((GROUP)==NVIC_PRIORITYGROUP_2)||\((GROUP)==NVIC_PRIORITYGROUP_3)||\((GROUP)==NVIC_PRIORITYGROUP_4))...#defineIS_NVIC_PREEMPTION_PRIORITY(PRIORITY)((PRIORITY)<0x10U)#defineIS_NVIC_SUB_PRIORITY(PRIORITY)((PRIORITY)<0x10U)#defineIS_NVIC_DEVICE_IRQ(IRQ)((IRQ)>=(IRQn_Type)0x00U)#defineIS_SYSTICK_CLK_SOURCE(SOURCE)(((SOURCE)==SYSTICK_CLKSOURCE_HCLK)||\((SOURCE)==SYSTICK_CLKSOURCE_HCLK_DIV8))...5 defines#if(__MPU_PRESENT==1U)#defineIS_MPU_REGION_ENABLE(STATE)(((STATE)==MPU_REGION_ENABLE)||\((STATE)==MPU_REGION_DISABLE))...#defineIS_MPU_INSTRUCTION_ACCESS(STATE)(((STATE)==MPU_INSTRUCTION_ACCESS_ENABLE)||\((STATE)==MPU_INSTRUCTION_ACCESS_DISABLE))...#defineIS_MPU_ACCESS_SHAREABLE(STATE)(((STATE)==MPU_ACCESS_SHAREABLE)||\((STATE)==MPU_ACCESS_NOT_SHAREABLE))...#defineIS_MPU_ACCESS_CACHEABLE(STATE)(((STATE)==MPU_ACCESS_CACHEABLE)||\((STATE)==MPU_ACCESS_NOT_CACHEABLE))...#defineIS_MPU_ACCESS_BUFFERABLE(STATE)(((STATE)==MPU_ACCESS_BUFFERABLE)||\((STATE)==MPU_ACCESS_NOT_BUFFERABLE))...#defineIS_MPU_TEX_LEVEL(TYPE)(((TYPE)==MPU_TEX_LEVEL0)||\((TYPE)==MPU_TEX_LEVEL1)||\((TYPE)==MPU_TEX_LEVEL2))...#defineIS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE)(((TYPE)==MPU_REGION_NO_ACCESS)||\((TYPE)==MPU_REGION_PRIV_RW)||\((TYPE)==MPU_REGION_PRIV_RW_URO)||\((TYPE)==MPU_REGION_FULL_ACCESS)||\((TYPE)==MPU_REGION_PRIV_RO)||\((TYPE)==MPU_REGION_PRIV_RO_URO))...#defineIS_MPU_REGION_NUMBER(NUMBER)(((NUMBER)==MPU_REGION_NUMBER0)||\((NUMBER)==MPU_REGION_NUMBER1)||\((NUMBER)==MPU_REGION_NUMBER2)||\((NUMBER)==MPU_REGION_NUMBER3)||\((NUMBER)==MPU_REGION_NUMBER4)||\((NUMBER)==MPU_REGION_NUMBER5)||\((NUMBER)==MPU_REGION_NUMBER6)||\((NUMBER)==MPU_REGION_NUMBER7))...#defineIS_MPU_REGION_SIZE(SIZE)(((SIZE)==MPU_REGION_SIZE_32B)||\((SIZE)==MPU_REGION_SIZE_64B)||\((SIZE)==MPU_REGION_SIZE_128B)||\((SIZE)==MPU_REGION_SIZE_256B)||\((SIZE)==MPU_REGION_SIZE_512B)||\((SIZE)==MPU_REGION_SIZE_1KB)||\((SIZE)==MPU_REGION_SIZE_2KB)||\((SIZE)==MPU_REGION_SIZE_4KB)||\((SIZE)==MPU_REGION_SIZE_8KB)||\((SIZE)==MPU_REGION_SIZE_16KB)||\((SIZE)==MPU_REGION_SIZE_32KB)||\((SIZE)==MPU_REGION_SIZE_64KB)||\((SIZE)==MPU_REGION_SIZE_128KB)||\((SIZE)==MPU_REGION_SIZE_256KB)||\((SIZE)==MPU_REGION_SIZE_512KB)||\((SIZE)==MPU_REGION_SIZE_1MB)||\((SIZE)==MPU_REGION_SIZE_2MB)||\((SIZE)==MPU_REGION_SIZE_4MB)||\((SIZE)==MPU_REGION_SIZE_8MB)||\((SIZE)==MPU_REGION_SIZE_16MB)||\((SIZE)==MPU_REGION_SIZE_32MB)||\((SIZE)==MPU_REGION_SIZE_64MB)||\((SIZE)==MPU_REGION_SIZE_128MB)||\((SIZE)==MPU_REGION_SIZE_256MB)||\((SIZE)==MPU_REGION_SIZE_512MB)||\((SIZE)==MPU_REGION_SIZE_1GB)||\((SIZE)==MPU_REGION_SIZE_2GB)||\((SIZE)==MPU_REGION_SIZE_4GB))...#defineIS_MPU_SUB_REGION_DISABLE(SUBREGION)((SUBREGION)<(uint16_t)0x00FF)/* ... */#endif/* __MPU_PRESENT *//** * @} *//* ... */Private macros/* Private functions ---------------------------------------------------------*//** * @} *//* ... *//** * @} *//* ... */#ifdef__cplusplus}extern "C" { ... }#endif/* ... */#endif/* __STM32F4xx_HAL_CORTEX_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.