SPKT

Dependencies:   F746_GUI SD_PlayerSkeleton F746_SAI_IO

Committer:
phungductung
Date:
Tue Jun 04 21:37:21 2019 +0000
Revision:
0:8ede47d38d10
SPKT

Who changed what in which revision?

UserRevisionLine numberNew contents of line
phungductung 0:8ede47d38d10 1 /**
phungductung 0:8ede47d38d10 2 ******************************************************************************
phungductung 0:8ede47d38d10 3 * @file stm32f7xx_hal_cortex.h
phungductung 0:8ede47d38d10 4 * @author MCD Application Team
phungductung 0:8ede47d38d10 5 * @version V1.0.4
phungductung 0:8ede47d38d10 6 * @date 09-December-2015
phungductung 0:8ede47d38d10 7 * @brief Header file of CORTEX HAL module.
phungductung 0:8ede47d38d10 8 ******************************************************************************
phungductung 0:8ede47d38d10 9 * @attention
phungductung 0:8ede47d38d10 10 *
phungductung 0:8ede47d38d10 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
phungductung 0:8ede47d38d10 12 *
phungductung 0:8ede47d38d10 13 * Redistribution and use in source and binary forms, with or without modification,
phungductung 0:8ede47d38d10 14 * are permitted provided that the following conditions are met:
phungductung 0:8ede47d38d10 15 * 1. Redistributions of source code must retain the above copyright notice,
phungductung 0:8ede47d38d10 16 * this list of conditions and the following disclaimer.
phungductung 0:8ede47d38d10 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
phungductung 0:8ede47d38d10 18 * this list of conditions and the following disclaimer in the documentation
phungductung 0:8ede47d38d10 19 * and/or other materials provided with the distribution.
phungductung 0:8ede47d38d10 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
phungductung 0:8ede47d38d10 21 * may be used to endorse or promote products derived from this software
phungductung 0:8ede47d38d10 22 * without specific prior written permission.
phungductung 0:8ede47d38d10 23 *
phungductung 0:8ede47d38d10 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
phungductung 0:8ede47d38d10 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
phungductung 0:8ede47d38d10 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
phungductung 0:8ede47d38d10 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
phungductung 0:8ede47d38d10 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
phungductung 0:8ede47d38d10 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
phungductung 0:8ede47d38d10 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
phungductung 0:8ede47d38d10 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
phungductung 0:8ede47d38d10 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
phungductung 0:8ede47d38d10 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
phungductung 0:8ede47d38d10 34 *
phungductung 0:8ede47d38d10 35 ******************************************************************************
phungductung 0:8ede47d38d10 36 */
phungductung 0:8ede47d38d10 37
phungductung 0:8ede47d38d10 38 /* Define to prevent recursive inclusion -------------------------------------*/
phungductung 0:8ede47d38d10 39 #ifndef __STM32F7xx_HAL_CORTEX_H
phungductung 0:8ede47d38d10 40 #define __STM32F7xx_HAL_CORTEX_H
phungductung 0:8ede47d38d10 41
phungductung 0:8ede47d38d10 42 #ifdef __cplusplus
phungductung 0:8ede47d38d10 43 extern "C" {
phungductung 0:8ede47d38d10 44 #endif
phungductung 0:8ede47d38d10 45
phungductung 0:8ede47d38d10 46 /* Includes ------------------------------------------------------------------*/
phungductung 0:8ede47d38d10 47 #include "stm32f7xx_hal_def.h"
phungductung 0:8ede47d38d10 48
phungductung 0:8ede47d38d10 49 /** @addtogroup STM32F7xx_HAL_Driver
phungductung 0:8ede47d38d10 50 * @{
phungductung 0:8ede47d38d10 51 */
phungductung 0:8ede47d38d10 52
phungductung 0:8ede47d38d10 53 /** @addtogroup CORTEX
phungductung 0:8ede47d38d10 54 * @{
phungductung 0:8ede47d38d10 55 */
phungductung 0:8ede47d38d10 56 /* Exported types ------------------------------------------------------------*/
phungductung 0:8ede47d38d10 57 /** @defgroup CORTEX_Exported_Types Cortex Exported Types
phungductung 0:8ede47d38d10 58 * @{
phungductung 0:8ede47d38d10 59 */
phungductung 0:8ede47d38d10 60
phungductung 0:8ede47d38d10 61 #if (__MPU_PRESENT == 1)
phungductung 0:8ede47d38d10 62 /** @defgroup CORTEX_MPU_Region_Initialization_Structure_definition MPU Region Initialization Structure Definition
phungductung 0:8ede47d38d10 63 * @brief MPU Region initialization structure
phungductung 0:8ede47d38d10 64 * @{
phungductung 0:8ede47d38d10 65 */
phungductung 0:8ede47d38d10 66 typedef struct
phungductung 0:8ede47d38d10 67 {
phungductung 0:8ede47d38d10 68 uint8_t Enable; /*!< Specifies the status of the region.
phungductung 0:8ede47d38d10 69 This parameter can be a value of @ref CORTEX_MPU_Region_Enable */
phungductung 0:8ede47d38d10 70 uint8_t Number; /*!< Specifies the number of the region to protect.
phungductung 0:8ede47d38d10 71 This parameter can be a value of @ref CORTEX_MPU_Region_Number */
phungductung 0:8ede47d38d10 72 uint32_t BaseAddress; /*!< Specifies the base address of the region to protect. */
phungductung 0:8ede47d38d10 73 uint8_t Size; /*!< Specifies the size of the region to protect.
phungductung 0:8ede47d38d10 74 This parameter can be a value of @ref CORTEX_MPU_Region_Size */
phungductung 0:8ede47d38d10 75 uint8_t SubRegionDisable; /*!< Specifies the number of the subregion protection to disable.
phungductung 0:8ede47d38d10 76 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF */
phungductung 0:8ede47d38d10 77 uint8_t TypeExtField; /*!< Specifies the TEX field level.
phungductung 0:8ede47d38d10 78 This parameter can be a value of @ref CORTEX_MPU_TEX_Levels */
phungductung 0:8ede47d38d10 79 uint8_t AccessPermission; /*!< Specifies the region access permission type.
phungductung 0:8ede47d38d10 80 This parameter can be a value of @ref CORTEX_MPU_Region_Permission_Attributes */
phungductung 0:8ede47d38d10 81 uint8_t DisableExec; /*!< Specifies the instruction access status.
phungductung 0:8ede47d38d10 82 This parameter can be a value of @ref CORTEX_MPU_Instruction_Access */
phungductung 0:8ede47d38d10 83 uint8_t IsShareable; /*!< Specifies the shareability status of the protected region.
phungductung 0:8ede47d38d10 84 This parameter can be a value of @ref CORTEX_MPU_Access_Shareable */
phungductung 0:8ede47d38d10 85 uint8_t IsCacheable; /*!< Specifies the cacheable status of the region protected.
phungductung 0:8ede47d38d10 86 This parameter can be a value of @ref CORTEX_MPU_Access_Cacheable */
phungductung 0:8ede47d38d10 87 uint8_t IsBufferable; /*!< Specifies the bufferable status of the protected region.
phungductung 0:8ede47d38d10 88 This parameter can be a value of @ref CORTEX_MPU_Access_Bufferable */
phungductung 0:8ede47d38d10 89 }MPU_Region_InitTypeDef;
phungductung 0:8ede47d38d10 90 /**
phungductung 0:8ede47d38d10 91 * @}
phungductung 0:8ede47d38d10 92 */
phungductung 0:8ede47d38d10 93 #endif /* __MPU_PRESENT */
phungductung 0:8ede47d38d10 94
phungductung 0:8ede47d38d10 95 /**
phungductung 0:8ede47d38d10 96 * @}
phungductung 0:8ede47d38d10 97 */
phungductung 0:8ede47d38d10 98
phungductung 0:8ede47d38d10 99 /* Exported constants --------------------------------------------------------*/
phungductung 0:8ede47d38d10 100
phungductung 0:8ede47d38d10 101 /** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants
phungductung 0:8ede47d38d10 102 * @{
phungductung 0:8ede47d38d10 103 */
phungductung 0:8ede47d38d10 104
phungductung 0:8ede47d38d10 105 /** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group
phungductung 0:8ede47d38d10 106 * @{
phungductung 0:8ede47d38d10 107 */
phungductung 0:8ede47d38d10 108 #define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bits for pre-emption priority
phungductung 0:8ede47d38d10 109 4 bits for subpriority */
phungductung 0:8ede47d38d10 110 #define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bits for pre-emption priority
phungductung 0:8ede47d38d10 111 3 bits for subpriority */
phungductung 0:8ede47d38d10 112 #define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority
phungductung 0:8ede47d38d10 113 2 bits for subpriority */
phungductung 0:8ede47d38d10 114 #define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority
phungductung 0:8ede47d38d10 115 1 bits for subpriority */
phungductung 0:8ede47d38d10 116 #define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority
phungductung 0:8ede47d38d10 117 0 bits for subpriority */
phungductung 0:8ede47d38d10 118 /**
phungductung 0:8ede47d38d10 119 * @}
phungductung 0:8ede47d38d10 120 */
phungductung 0:8ede47d38d10 121
phungductung 0:8ede47d38d10 122 /** @defgroup CORTEX_SysTick_clock_source CORTEX _SysTick clock source
phungductung 0:8ede47d38d10 123 * @{
phungductung 0:8ede47d38d10 124 */
phungductung 0:8ede47d38d10 125 #define SYSTICK_CLKSOURCE_HCLK_DIV8 ((uint32_t)0x00000000)
phungductung 0:8ede47d38d10 126 #define SYSTICK_CLKSOURCE_HCLK ((uint32_t)0x00000004)
phungductung 0:8ede47d38d10 127
phungductung 0:8ede47d38d10 128 /**
phungductung 0:8ede47d38d10 129 * @}
phungductung 0:8ede47d38d10 130 */
phungductung 0:8ede47d38d10 131
phungductung 0:8ede47d38d10 132 #if (__MPU_PRESENT == 1)
phungductung 0:8ede47d38d10 133 /** @defgroup CORTEX_MPU_HFNMI_PRIVDEF_Control MPU HFNMI and PRIVILEGED Access control
phungductung 0:8ede47d38d10 134 * @{
phungductung 0:8ede47d38d10 135 */
phungductung 0:8ede47d38d10 136 #define MPU_HFNMI_PRIVDEF_NONE ((uint32_t)0x00000000)
phungductung 0:8ede47d38d10 137 #define MPU_HARDFAULT_NMI ((uint32_t)0x00000002)
phungductung 0:8ede47d38d10 138 #define MPU_PRIVILEGED_DEFAULT ((uint32_t)0x00000004)
phungductung 0:8ede47d38d10 139 #define MPU_HFNMI_PRIVDEF ((uint32_t)0x00000006)
phungductung 0:8ede47d38d10 140 /**
phungductung 0:8ede47d38d10 141 * @}
phungductung 0:8ede47d38d10 142 */
phungductung 0:8ede47d38d10 143
phungductung 0:8ede47d38d10 144 /** @defgroup CORTEX_MPU_Region_Enable CORTEX MPU Region Enable
phungductung 0:8ede47d38d10 145 * @{
phungductung 0:8ede47d38d10 146 */
phungductung 0:8ede47d38d10 147 #define MPU_REGION_ENABLE ((uint8_t)0x01)
phungductung 0:8ede47d38d10 148 #define MPU_REGION_DISABLE ((uint8_t)0x00)
phungductung 0:8ede47d38d10 149 /**
phungductung 0:8ede47d38d10 150 * @}
phungductung 0:8ede47d38d10 151 */
phungductung 0:8ede47d38d10 152
phungductung 0:8ede47d38d10 153 /** @defgroup CORTEX_MPU_Instruction_Access CORTEX MPU Instruction Access
phungductung 0:8ede47d38d10 154 * @{
phungductung 0:8ede47d38d10 155 */
phungductung 0:8ede47d38d10 156 #define MPU_INSTRUCTION_ACCESS_ENABLE ((uint8_t)0x00)
phungductung 0:8ede47d38d10 157 #define MPU_INSTRUCTION_ACCESS_DISABLE ((uint8_t)0x01)
phungductung 0:8ede47d38d10 158 /**
phungductung 0:8ede47d38d10 159 * @}
phungductung 0:8ede47d38d10 160 */
phungductung 0:8ede47d38d10 161
phungductung 0:8ede47d38d10 162 /** @defgroup CORTEX_MPU_Access_Shareable CORTEX MPU Instruction Access Shareable
phungductung 0:8ede47d38d10 163 * @{
phungductung 0:8ede47d38d10 164 */
phungductung 0:8ede47d38d10 165 #define MPU_ACCESS_SHAREABLE ((uint8_t)0x01)
phungductung 0:8ede47d38d10 166 #define MPU_ACCESS_NOT_SHAREABLE ((uint8_t)0x00)
phungductung 0:8ede47d38d10 167 /**
phungductung 0:8ede47d38d10 168 * @}
phungductung 0:8ede47d38d10 169 */
phungductung 0:8ede47d38d10 170
phungductung 0:8ede47d38d10 171 /** @defgroup CORTEX_MPU_Access_Cacheable CORTEX MPU Instruction Access Cacheable
phungductung 0:8ede47d38d10 172 * @{
phungductung 0:8ede47d38d10 173 */
phungductung 0:8ede47d38d10 174 #define MPU_ACCESS_CACHEABLE ((uint8_t)0x01)
phungductung 0:8ede47d38d10 175 #define MPU_ACCESS_NOT_CACHEABLE ((uint8_t)0x00)
phungductung 0:8ede47d38d10 176 /**
phungductung 0:8ede47d38d10 177 * @}
phungductung 0:8ede47d38d10 178 */
phungductung 0:8ede47d38d10 179
phungductung 0:8ede47d38d10 180 /** @defgroup CORTEX_MPU_Access_Bufferable CORTEX MPU Instruction Access Bufferable
phungductung 0:8ede47d38d10 181 * @{
phungductung 0:8ede47d38d10 182 */
phungductung 0:8ede47d38d10 183 #define MPU_ACCESS_BUFFERABLE ((uint8_t)0x01)
phungductung 0:8ede47d38d10 184 #define MPU_ACCESS_NOT_BUFFERABLE ((uint8_t)0x00)
phungductung 0:8ede47d38d10 185 /**
phungductung 0:8ede47d38d10 186 * @}
phungductung 0:8ede47d38d10 187 */
phungductung 0:8ede47d38d10 188
phungductung 0:8ede47d38d10 189 /** @defgroup CORTEX_MPU_TEX_Levels MPU TEX Levels
phungductung 0:8ede47d38d10 190 * @{
phungductung 0:8ede47d38d10 191 */
phungductung 0:8ede47d38d10 192 #define MPU_TEX_LEVEL0 ((uint8_t)0x00)
phungductung 0:8ede47d38d10 193 #define MPU_TEX_LEVEL1 ((uint8_t)0x01)
phungductung 0:8ede47d38d10 194 #define MPU_TEX_LEVEL2 ((uint8_t)0x02)
phungductung 0:8ede47d38d10 195 /**
phungductung 0:8ede47d38d10 196 * @}
phungductung 0:8ede47d38d10 197 */
phungductung 0:8ede47d38d10 198
phungductung 0:8ede47d38d10 199 /** @defgroup CORTEX_MPU_Region_Size CORTEX MPU Region Size
phungductung 0:8ede47d38d10 200 * @{
phungductung 0:8ede47d38d10 201 */
phungductung 0:8ede47d38d10 202 #define MPU_REGION_SIZE_32B ((uint8_t)0x04)
phungductung 0:8ede47d38d10 203 #define MPU_REGION_SIZE_64B ((uint8_t)0x05)
phungductung 0:8ede47d38d10 204 #define MPU_REGION_SIZE_128B ((uint8_t)0x06)
phungductung 0:8ede47d38d10 205 #define MPU_REGION_SIZE_256B ((uint8_t)0x07)
phungductung 0:8ede47d38d10 206 #define MPU_REGION_SIZE_512B ((uint8_t)0x08)
phungductung 0:8ede47d38d10 207 #define MPU_REGION_SIZE_1KB ((uint8_t)0x09)
phungductung 0:8ede47d38d10 208 #define MPU_REGION_SIZE_2KB ((uint8_t)0x0A)
phungductung 0:8ede47d38d10 209 #define MPU_REGION_SIZE_4KB ((uint8_t)0x0B)
phungductung 0:8ede47d38d10 210 #define MPU_REGION_SIZE_8KB ((uint8_t)0x0C)
phungductung 0:8ede47d38d10 211 #define MPU_REGION_SIZE_16KB ((uint8_t)0x0D)
phungductung 0:8ede47d38d10 212 #define MPU_REGION_SIZE_32KB ((uint8_t)0x0E)
phungductung 0:8ede47d38d10 213 #define MPU_REGION_SIZE_64KB ((uint8_t)0x0F)
phungductung 0:8ede47d38d10 214 #define MPU_REGION_SIZE_128KB ((uint8_t)0x10)
phungductung 0:8ede47d38d10 215 #define MPU_REGION_SIZE_256KB ((uint8_t)0x11)
phungductung 0:8ede47d38d10 216 #define MPU_REGION_SIZE_512KB ((uint8_t)0x12)
phungductung 0:8ede47d38d10 217 #define MPU_REGION_SIZE_1MB ((uint8_t)0x13)
phungductung 0:8ede47d38d10 218 #define MPU_REGION_SIZE_2MB ((uint8_t)0x14)
phungductung 0:8ede47d38d10 219 #define MPU_REGION_SIZE_4MB ((uint8_t)0x15)
phungductung 0:8ede47d38d10 220 #define MPU_REGION_SIZE_8MB ((uint8_t)0x16)
phungductung 0:8ede47d38d10 221 #define MPU_REGION_SIZE_16MB ((uint8_t)0x17)
phungductung 0:8ede47d38d10 222 #define MPU_REGION_SIZE_32MB ((uint8_t)0x18)
phungductung 0:8ede47d38d10 223 #define MPU_REGION_SIZE_64MB ((uint8_t)0x19)
phungductung 0:8ede47d38d10 224 #define MPU_REGION_SIZE_128MB ((uint8_t)0x1A)
phungductung 0:8ede47d38d10 225 #define MPU_REGION_SIZE_256MB ((uint8_t)0x1B)
phungductung 0:8ede47d38d10 226 #define MPU_REGION_SIZE_512MB ((uint8_t)0x1C)
phungductung 0:8ede47d38d10 227 #define MPU_REGION_SIZE_1GB ((uint8_t)0x1D)
phungductung 0:8ede47d38d10 228 #define MPU_REGION_SIZE_2GB ((uint8_t)0x1E)
phungductung 0:8ede47d38d10 229 #define MPU_REGION_SIZE_4GB ((uint8_t)0x1F)
phungductung 0:8ede47d38d10 230 /**
phungductung 0:8ede47d38d10 231 * @}
phungductung 0:8ede47d38d10 232 */
phungductung 0:8ede47d38d10 233
phungductung 0:8ede47d38d10 234 /** @defgroup CORTEX_MPU_Region_Permission_Attributes CORTEX MPU Region Permission Attributes
phungductung 0:8ede47d38d10 235 * @{
phungductung 0:8ede47d38d10 236 */
phungductung 0:8ede47d38d10 237 #define MPU_REGION_NO_ACCESS ((uint8_t)0x00)
phungductung 0:8ede47d38d10 238 #define MPU_REGION_PRIV_RW ((uint8_t)0x01)
phungductung 0:8ede47d38d10 239 #define MPU_REGION_PRIV_RW_URO ((uint8_t)0x02)
phungductung 0:8ede47d38d10 240 #define MPU_REGION_FULL_ACCESS ((uint8_t)0x03)
phungductung 0:8ede47d38d10 241 #define MPU_REGION_PRIV_RO ((uint8_t)0x05)
phungductung 0:8ede47d38d10 242 #define MPU_REGION_PRIV_RO_URO ((uint8_t)0x06)
phungductung 0:8ede47d38d10 243 /**
phungductung 0:8ede47d38d10 244 * @}
phungductung 0:8ede47d38d10 245 */
phungductung 0:8ede47d38d10 246
phungductung 0:8ede47d38d10 247 /** @defgroup CORTEX_MPU_Region_Number CORTEX MPU Region Number
phungductung 0:8ede47d38d10 248 * @{
phungductung 0:8ede47d38d10 249 */
phungductung 0:8ede47d38d10 250 #define MPU_REGION_NUMBER0 ((uint8_t)0x00)
phungductung 0:8ede47d38d10 251 #define MPU_REGION_NUMBER1 ((uint8_t)0x01)
phungductung 0:8ede47d38d10 252 #define MPU_REGION_NUMBER2 ((uint8_t)0x02)
phungductung 0:8ede47d38d10 253 #define MPU_REGION_NUMBER3 ((uint8_t)0x03)
phungductung 0:8ede47d38d10 254 #define MPU_REGION_NUMBER4 ((uint8_t)0x04)
phungductung 0:8ede47d38d10 255 #define MPU_REGION_NUMBER5 ((uint8_t)0x05)
phungductung 0:8ede47d38d10 256 #define MPU_REGION_NUMBER6 ((uint8_t)0x06)
phungductung 0:8ede47d38d10 257 #define MPU_REGION_NUMBER7 ((uint8_t)0x07)
phungductung 0:8ede47d38d10 258 /**
phungductung 0:8ede47d38d10 259 * @}
phungductung 0:8ede47d38d10 260 */
phungductung 0:8ede47d38d10 261 #endif /* __MPU_PRESENT */
phungductung 0:8ede47d38d10 262
phungductung 0:8ede47d38d10 263 /**
phungductung 0:8ede47d38d10 264 * @}
phungductung 0:8ede47d38d10 265 */
phungductung 0:8ede47d38d10 266
phungductung 0:8ede47d38d10 267
phungductung 0:8ede47d38d10 268 /* Exported Macros -----------------------------------------------------------*/
phungductung 0:8ede47d38d10 269
phungductung 0:8ede47d38d10 270 /* Exported functions --------------------------------------------------------*/
phungductung 0:8ede47d38d10 271 /** @addtogroup CORTEX_Exported_Functions
phungductung 0:8ede47d38d10 272 * @{
phungductung 0:8ede47d38d10 273 */
phungductung 0:8ede47d38d10 274
phungductung 0:8ede47d38d10 275 /** @addtogroup CORTEX_Exported_Functions_Group1
phungductung 0:8ede47d38d10 276 * @{
phungductung 0:8ede47d38d10 277 */
phungductung 0:8ede47d38d10 278 /* Initialization and de-initialization functions *****************************/
phungductung 0:8ede47d38d10 279 void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
phungductung 0:8ede47d38d10 280 void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority);
phungductung 0:8ede47d38d10 281 void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);
phungductung 0:8ede47d38d10 282 void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);
phungductung 0:8ede47d38d10 283 void HAL_NVIC_SystemReset(void);
phungductung 0:8ede47d38d10 284 uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);
phungductung 0:8ede47d38d10 285 /**
phungductung 0:8ede47d38d10 286 * @}
phungductung 0:8ede47d38d10 287 */
phungductung 0:8ede47d38d10 288
phungductung 0:8ede47d38d10 289 /** @addtogroup CORTEX_Exported_Functions_Group2
phungductung 0:8ede47d38d10 290 * @{
phungductung 0:8ede47d38d10 291 */
phungductung 0:8ede47d38d10 292 /* Peripheral Control functions ***********************************************/
phungductung 0:8ede47d38d10 293 #if (__MPU_PRESENT == 1)
phungductung 0:8ede47d38d10 294 void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
phungductung 0:8ede47d38d10 295 #endif /* __MPU_PRESENT */
phungductung 0:8ede47d38d10 296 uint32_t HAL_NVIC_GetPriorityGrouping(void);
phungductung 0:8ede47d38d10 297 void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
phungductung 0:8ede47d38d10 298 uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);
phungductung 0:8ede47d38d10 299 void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);
phungductung 0:8ede47d38d10 300 void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
phungductung 0:8ede47d38d10 301 uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn);
phungductung 0:8ede47d38d10 302 void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);
phungductung 0:8ede47d38d10 303 void HAL_SYSTICK_IRQHandler(void);
phungductung 0:8ede47d38d10 304 void HAL_SYSTICK_Callback(void);
phungductung 0:8ede47d38d10 305 /**
phungductung 0:8ede47d38d10 306 * @}
phungductung 0:8ede47d38d10 307 */
phungductung 0:8ede47d38d10 308
phungductung 0:8ede47d38d10 309 /**
phungductung 0:8ede47d38d10 310 * @}
phungductung 0:8ede47d38d10 311 */
phungductung 0:8ede47d38d10 312
phungductung 0:8ede47d38d10 313 /* Private types -------------------------------------------------------------*/
phungductung 0:8ede47d38d10 314 /* Private variables ---------------------------------------------------------*/
phungductung 0:8ede47d38d10 315 /* Private constants ---------------------------------------------------------*/
phungductung 0:8ede47d38d10 316 /* Private macros ------------------------------------------------------------*/
phungductung 0:8ede47d38d10 317 /** @defgroup CORTEX_Private_Macros CORTEX Private Macros
phungductung 0:8ede47d38d10 318 * @{
phungductung 0:8ede47d38d10 319 */
phungductung 0:8ede47d38d10 320 #define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PRIORITYGROUP_0) || \
phungductung 0:8ede47d38d10 321 ((GROUP) == NVIC_PRIORITYGROUP_1) || \
phungductung 0:8ede47d38d10 322 ((GROUP) == NVIC_PRIORITYGROUP_2) || \
phungductung 0:8ede47d38d10 323 ((GROUP) == NVIC_PRIORITYGROUP_3) || \
phungductung 0:8ede47d38d10 324 ((GROUP) == NVIC_PRIORITYGROUP_4))
phungductung 0:8ede47d38d10 325
phungductung 0:8ede47d38d10 326 #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
phungductung 0:8ede47d38d10 327
phungductung 0:8ede47d38d10 328 #define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10)
phungductung 0:8ede47d38d10 329
phungductung 0:8ede47d38d10 330 #define IS_NVIC_DEVICE_IRQ(IRQ) ((IRQ) >= 0x00)
phungductung 0:8ede47d38d10 331
phungductung 0:8ede47d38d10 332 #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \
phungductung 0:8ede47d38d10 333 ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))
phungductung 0:8ede47d38d10 334
phungductung 0:8ede47d38d10 335 #if (__MPU_PRESENT == 1)
phungductung 0:8ede47d38d10 336 #define IS_MPU_REGION_ENABLE(STATE) (((STATE) == MPU_REGION_ENABLE) || \
phungductung 0:8ede47d38d10 337 ((STATE) == MPU_REGION_DISABLE))
phungductung 0:8ede47d38d10 338
phungductung 0:8ede47d38d10 339 #define IS_MPU_INSTRUCTION_ACCESS(STATE) (((STATE) == MPU_INSTRUCTION_ACCESS_ENABLE) || \
phungductung 0:8ede47d38d10 340 ((STATE) == MPU_INSTRUCTION_ACCESS_DISABLE))
phungductung 0:8ede47d38d10 341
phungductung 0:8ede47d38d10 342 #define IS_MPU_ACCESS_SHAREABLE(STATE) (((STATE) == MPU_ACCESS_SHAREABLE) || \
phungductung 0:8ede47d38d10 343 ((STATE) == MPU_ACCESS_NOT_SHAREABLE))
phungductung 0:8ede47d38d10 344
phungductung 0:8ede47d38d10 345 #define IS_MPU_ACCESS_CACHEABLE(STATE) (((STATE) == MPU_ACCESS_CACHEABLE) || \
phungductung 0:8ede47d38d10 346 ((STATE) == MPU_ACCESS_NOT_CACHEABLE))
phungductung 0:8ede47d38d10 347
phungductung 0:8ede47d38d10 348 #define IS_MPU_ACCESS_BUFFERABLE(STATE) (((STATE) == MPU_ACCESS_BUFFERABLE) || \
phungductung 0:8ede47d38d10 349 ((STATE) == MPU_ACCESS_NOT_BUFFERABLE))
phungductung 0:8ede47d38d10 350
phungductung 0:8ede47d38d10 351 #define IS_MPU_TEX_LEVEL(TYPE) (((TYPE) == MPU_TEX_LEVEL0) || \
phungductung 0:8ede47d38d10 352 ((TYPE) == MPU_TEX_LEVEL1) || \
phungductung 0:8ede47d38d10 353 ((TYPE) == MPU_TEX_LEVEL2))
phungductung 0:8ede47d38d10 354
phungductung 0:8ede47d38d10 355 #define IS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE) (((TYPE) == MPU_REGION_NO_ACCESS) || \
phungductung 0:8ede47d38d10 356 ((TYPE) == MPU_REGION_PRIV_RW) || \
phungductung 0:8ede47d38d10 357 ((TYPE) == MPU_REGION_PRIV_RW_URO) || \
phungductung 0:8ede47d38d10 358 ((TYPE) == MPU_REGION_FULL_ACCESS) || \
phungductung 0:8ede47d38d10 359 ((TYPE) == MPU_REGION_PRIV_RO) || \
phungductung 0:8ede47d38d10 360 ((TYPE) == MPU_REGION_PRIV_RO_URO))
phungductung 0:8ede47d38d10 361
phungductung 0:8ede47d38d10 362 #define IS_MPU_REGION_NUMBER(NUMBER) (((NUMBER) == MPU_REGION_NUMBER0) || \
phungductung 0:8ede47d38d10 363 ((NUMBER) == MPU_REGION_NUMBER1) || \
phungductung 0:8ede47d38d10 364 ((NUMBER) == MPU_REGION_NUMBER2) || \
phungductung 0:8ede47d38d10 365 ((NUMBER) == MPU_REGION_NUMBER3) || \
phungductung 0:8ede47d38d10 366 ((NUMBER) == MPU_REGION_NUMBER4) || \
phungductung 0:8ede47d38d10 367 ((NUMBER) == MPU_REGION_NUMBER5) || \
phungductung 0:8ede47d38d10 368 ((NUMBER) == MPU_REGION_NUMBER6) || \
phungductung 0:8ede47d38d10 369 ((NUMBER) == MPU_REGION_NUMBER7))
phungductung 0:8ede47d38d10 370
phungductung 0:8ede47d38d10 371 #define IS_MPU_REGION_SIZE(SIZE) (((SIZE) == MPU_REGION_SIZE_32B) || \
phungductung 0:8ede47d38d10 372 ((SIZE) == MPU_REGION_SIZE_64B) || \
phungductung 0:8ede47d38d10 373 ((SIZE) == MPU_REGION_SIZE_128B) || \
phungductung 0:8ede47d38d10 374 ((SIZE) == MPU_REGION_SIZE_256B) || \
phungductung 0:8ede47d38d10 375 ((SIZE) == MPU_REGION_SIZE_512B) || \
phungductung 0:8ede47d38d10 376 ((SIZE) == MPU_REGION_SIZE_1KB) || \
phungductung 0:8ede47d38d10 377 ((SIZE) == MPU_REGION_SIZE_2KB) || \
phungductung 0:8ede47d38d10 378 ((SIZE) == MPU_REGION_SIZE_4KB) || \
phungductung 0:8ede47d38d10 379 ((SIZE) == MPU_REGION_SIZE_8KB) || \
phungductung 0:8ede47d38d10 380 ((SIZE) == MPU_REGION_SIZE_16KB) || \
phungductung 0:8ede47d38d10 381 ((SIZE) == MPU_REGION_SIZE_32KB) || \
phungductung 0:8ede47d38d10 382 ((SIZE) == MPU_REGION_SIZE_64KB) || \
phungductung 0:8ede47d38d10 383 ((SIZE) == MPU_REGION_SIZE_128KB) || \
phungductung 0:8ede47d38d10 384 ((SIZE) == MPU_REGION_SIZE_256KB) || \
phungductung 0:8ede47d38d10 385 ((SIZE) == MPU_REGION_SIZE_512KB) || \
phungductung 0:8ede47d38d10 386 ((SIZE) == MPU_REGION_SIZE_1MB) || \
phungductung 0:8ede47d38d10 387 ((SIZE) == MPU_REGION_SIZE_2MB) || \
phungductung 0:8ede47d38d10 388 ((SIZE) == MPU_REGION_SIZE_4MB) || \
phungductung 0:8ede47d38d10 389 ((SIZE) == MPU_REGION_SIZE_8MB) || \
phungductung 0:8ede47d38d10 390 ((SIZE) == MPU_REGION_SIZE_16MB) || \
phungductung 0:8ede47d38d10 391 ((SIZE) == MPU_REGION_SIZE_32MB) || \
phungductung 0:8ede47d38d10 392 ((SIZE) == MPU_REGION_SIZE_64MB) || \
phungductung 0:8ede47d38d10 393 ((SIZE) == MPU_REGION_SIZE_128MB) || \
phungductung 0:8ede47d38d10 394 ((SIZE) == MPU_REGION_SIZE_256MB) || \
phungductung 0:8ede47d38d10 395 ((SIZE) == MPU_REGION_SIZE_512MB) || \
phungductung 0:8ede47d38d10 396 ((SIZE) == MPU_REGION_SIZE_1GB) || \
phungductung 0:8ede47d38d10 397 ((SIZE) == MPU_REGION_SIZE_2GB) || \
phungductung 0:8ede47d38d10 398 ((SIZE) == MPU_REGION_SIZE_4GB))
phungductung 0:8ede47d38d10 399
phungductung 0:8ede47d38d10 400 #define IS_MPU_SUB_REGION_DISABLE(SUBREGION) ((SUBREGION) < (uint16_t)0x00FF)
phungductung 0:8ede47d38d10 401 #endif /* __MPU_PRESENT */
phungductung 0:8ede47d38d10 402
phungductung 0:8ede47d38d10 403 /**
phungductung 0:8ede47d38d10 404 * @}
phungductung 0:8ede47d38d10 405 */
phungductung 0:8ede47d38d10 406
phungductung 0:8ede47d38d10 407 /* Private functions ---------------------------------------------------------*/
phungductung 0:8ede47d38d10 408 /** @defgroup CORTEX_Private_Functions CORTEX Private Functions
phungductung 0:8ede47d38d10 409 * @brief CORTEX private functions
phungductung 0:8ede47d38d10 410 * @{
phungductung 0:8ede47d38d10 411 */
phungductung 0:8ede47d38d10 412
phungductung 0:8ede47d38d10 413 #if (__MPU_PRESENT == 1)
phungductung 0:8ede47d38d10 414 /**
phungductung 0:8ede47d38d10 415 * @brief Disables the MPU
phungductung 0:8ede47d38d10 416 * @retval None
phungductung 0:8ede47d38d10 417 */
phungductung 0:8ede47d38d10 418 __STATIC_INLINE void HAL_MPU_Disable(void)
phungductung 0:8ede47d38d10 419 {
phungductung 0:8ede47d38d10 420 /* Disable fault exceptions */
phungductung 0:8ede47d38d10 421 SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
phungductung 0:8ede47d38d10 422
phungductung 0:8ede47d38d10 423 /* Disable the MPU */
phungductung 0:8ede47d38d10 424 MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk;
phungductung 0:8ede47d38d10 425 }
phungductung 0:8ede47d38d10 426
phungductung 0:8ede47d38d10 427 /**
phungductung 0:8ede47d38d10 428 * @brief Enables the MPU
phungductung 0:8ede47d38d10 429 * @param MPU_Control: Specifies the control mode of the MPU during hard fault,
phungductung 0:8ede47d38d10 430 * NMI, FAULTMASK and privileged access to the default memory
phungductung 0:8ede47d38d10 431 * This parameter can be one of the following values:
phungductung 0:8ede47d38d10 432 * @arg MPU_HFNMI_PRIVDEF_NONE
phungductung 0:8ede47d38d10 433 * @arg MPU_HARDFAULT_NMI
phungductung 0:8ede47d38d10 434 * @arg MPU_PRIVILEGED_DEFAULT
phungductung 0:8ede47d38d10 435 * @arg MPU_HFNMI_PRIVDEF
phungductung 0:8ede47d38d10 436 * @retval None
phungductung 0:8ede47d38d10 437 */
phungductung 0:8ede47d38d10 438 __STATIC_INLINE void HAL_MPU_Enable(uint32_t MPU_Control)
phungductung 0:8ede47d38d10 439 {
phungductung 0:8ede47d38d10 440 /* Enable the MPU */
phungductung 0:8ede47d38d10 441 MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
phungductung 0:8ede47d38d10 442
phungductung 0:8ede47d38d10 443 /* Enable fault exceptions */
phungductung 0:8ede47d38d10 444 SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
phungductung 0:8ede47d38d10 445 }
phungductung 0:8ede47d38d10 446 #endif /* __MPU_PRESENT */
phungductung 0:8ede47d38d10 447
phungductung 0:8ede47d38d10 448 /**
phungductung 0:8ede47d38d10 449 * @}
phungductung 0:8ede47d38d10 450 */
phungductung 0:8ede47d38d10 451
phungductung 0:8ede47d38d10 452 /**
phungductung 0:8ede47d38d10 453 * @}
phungductung 0:8ede47d38d10 454 */
phungductung 0:8ede47d38d10 455
phungductung 0:8ede47d38d10 456 /**
phungductung 0:8ede47d38d10 457 * @}
phungductung 0:8ede47d38d10 458 */
phungductung 0:8ede47d38d10 459
phungductung 0:8ede47d38d10 460 #ifdef __cplusplus
phungductung 0:8ede47d38d10 461 }
phungductung 0:8ede47d38d10 462 #endif
phungductung 0:8ede47d38d10 463
phungductung 0:8ede47d38d10 464 #endif /* __STM32F7xx_HAL_CORTEX_H */
phungductung 0:8ede47d38d10 465
phungductung 0:8ede47d38d10 466
phungductung 0:8ede47d38d10 467 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/