Prusa MINI Firmware overview
|
Go to the documentation of this file.
37 #ifndef __STM32F4xx_HAL_CORTEX_H
38 #define __STM32F4xx_HAL_CORTEX_H
59 #if (__MPU_PRESENT == 1U)
87 }MPU_Region_InitTypeDef;
106 #define NVIC_PRIORITYGROUP_0 0x00000007U
108 #define NVIC_PRIORITYGROUP_1 0x00000006U
110 #define NVIC_PRIORITYGROUP_2 0x00000005U
112 #define NVIC_PRIORITYGROUP_3 0x00000004U
114 #define NVIC_PRIORITYGROUP_4 0x00000003U
123 #define SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U
124 #define SYSTICK_CLKSOURCE_HCLK 0x00000004U
130 #if (__MPU_PRESENT == 1)
134 #define MPU_HFNMI_PRIVDEF_NONE 0x00000000U
135 #define MPU_HARDFAULT_NMI MPU_CTRL_HFNMIENA_Msk
136 #define MPU_PRIVILEGED_DEFAULT MPU_CTRL_PRIVDEFENA_Msk
137 #define MPU_HFNMI_PRIVDEF (MPU_CTRL_HFNMIENA_Msk | MPU_CTRL_PRIVDEFENA_Msk)
146 #define MPU_REGION_ENABLE ((uint8_t)0x01)
147 #define MPU_REGION_DISABLE ((uint8_t)0x00)
155 #define MPU_INSTRUCTION_ACCESS_ENABLE ((uint8_t)0x00)
156 #define MPU_INSTRUCTION_ACCESS_DISABLE ((uint8_t)0x01)
164 #define MPU_ACCESS_SHAREABLE ((uint8_t)0x01)
165 #define MPU_ACCESS_NOT_SHAREABLE ((uint8_t)0x00)
173 #define MPU_ACCESS_CACHEABLE ((uint8_t)0x01)
174 #define MPU_ACCESS_NOT_CACHEABLE ((uint8_t)0x00)
182 #define MPU_ACCESS_BUFFERABLE ((uint8_t)0x01)
183 #define MPU_ACCESS_NOT_BUFFERABLE ((uint8_t)0x00)
191 #define MPU_TEX_LEVEL0 ((uint8_t)0x00)
192 #define MPU_TEX_LEVEL1 ((uint8_t)0x01)
193 #define MPU_TEX_LEVEL2 ((uint8_t)0x02)
201 #define MPU_REGION_SIZE_32B ((uint8_t)0x04)
202 #define MPU_REGION_SIZE_64B ((uint8_t)0x05)
203 #define MPU_REGION_SIZE_128B ((uint8_t)0x06)
204 #define MPU_REGION_SIZE_256B ((uint8_t)0x07)
205 #define MPU_REGION_SIZE_512B ((uint8_t)0x08)
206 #define MPU_REGION_SIZE_1KB ((uint8_t)0x09)
207 #define MPU_REGION_SIZE_2KB ((uint8_t)0x0A)
208 #define MPU_REGION_SIZE_4KB ((uint8_t)0x0B)
209 #define MPU_REGION_SIZE_8KB ((uint8_t)0x0C)
210 #define MPU_REGION_SIZE_16KB ((uint8_t)0x0D)
211 #define MPU_REGION_SIZE_32KB ((uint8_t)0x0E)
212 #define MPU_REGION_SIZE_64KB ((uint8_t)0x0F)
213 #define MPU_REGION_SIZE_128KB ((uint8_t)0x10)
214 #define MPU_REGION_SIZE_256KB ((uint8_t)0x11)
215 #define MPU_REGION_SIZE_512KB ((uint8_t)0x12)
216 #define MPU_REGION_SIZE_1MB ((uint8_t)0x13)
217 #define MPU_REGION_SIZE_2MB ((uint8_t)0x14)
218 #define MPU_REGION_SIZE_4MB ((uint8_t)0x15)
219 #define MPU_REGION_SIZE_8MB ((uint8_t)0x16)
220 #define MPU_REGION_SIZE_16MB ((uint8_t)0x17)
221 #define MPU_REGION_SIZE_32MB ((uint8_t)0x18)
222 #define MPU_REGION_SIZE_64MB ((uint8_t)0x19)
223 #define MPU_REGION_SIZE_128MB ((uint8_t)0x1A)
224 #define MPU_REGION_SIZE_256MB ((uint8_t)0x1B)
225 #define MPU_REGION_SIZE_512MB ((uint8_t)0x1C)
226 #define MPU_REGION_SIZE_1GB ((uint8_t)0x1D)
227 #define MPU_REGION_SIZE_2GB ((uint8_t)0x1E)
228 #define MPU_REGION_SIZE_4GB ((uint8_t)0x1F)
236 #define MPU_REGION_NO_ACCESS ((uint8_t)0x00)
237 #define MPU_REGION_PRIV_RW ((uint8_t)0x01)
238 #define MPU_REGION_PRIV_RW_URO ((uint8_t)0x02)
239 #define MPU_REGION_FULL_ACCESS ((uint8_t)0x03)
240 #define MPU_REGION_PRIV_RO ((uint8_t)0x05)
241 #define MPU_REGION_PRIV_RO_URO ((uint8_t)0x06)
249 #define MPU_REGION_NUMBER0 ((uint8_t)0x00)
250 #define MPU_REGION_NUMBER1 ((uint8_t)0x01)
251 #define MPU_REGION_NUMBER2 ((uint8_t)0x02)
252 #define MPU_REGION_NUMBER3 ((uint8_t)0x03)
253 #define MPU_REGION_NUMBER4 ((uint8_t)0x04)
254 #define MPU_REGION_NUMBER5 ((uint8_t)0x05)
255 #define MPU_REGION_NUMBER6 ((uint8_t)0x06)
256 #define MPU_REGION_NUMBER7 ((uint8_t)0x07)
293 void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
302 #if (__MPU_PRESENT == 1U)
303 void HAL_MPU_Enable(uint32_t MPU_Control);
304 void HAL_MPU_Disable(
void);
305 void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
322 #define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PRIORITYGROUP_0) || \
323 ((GROUP) == NVIC_PRIORITYGROUP_1) || \
324 ((GROUP) == NVIC_PRIORITYGROUP_2) || \
325 ((GROUP) == NVIC_PRIORITYGROUP_3) || \
326 ((GROUP) == NVIC_PRIORITYGROUP_4))
328 #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10U)
330 #define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10U)
332 #define IS_NVIC_DEVICE_IRQ(IRQ) ((IRQ) >= (IRQn_Type)0x00U)
334 #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \
335 ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))
337 #if (__MPU_PRESENT == 1U)
338 #define IS_MPU_REGION_ENABLE(STATE) (((STATE) == MPU_REGION_ENABLE) || \
339 ((STATE) == MPU_REGION_DISABLE))
341 #define IS_MPU_INSTRUCTION_ACCESS(STATE) (((STATE) == MPU_INSTRUCTION_ACCESS_ENABLE) || \
342 ((STATE) == MPU_INSTRUCTION_ACCESS_DISABLE))
344 #define IS_MPU_ACCESS_SHAREABLE(STATE) (((STATE) == MPU_ACCESS_SHAREABLE) || \
345 ((STATE) == MPU_ACCESS_NOT_SHAREABLE))
347 #define IS_MPU_ACCESS_CACHEABLE(STATE) (((STATE) == MPU_ACCESS_CACHEABLE) || \
348 ((STATE) == MPU_ACCESS_NOT_CACHEABLE))
350 #define IS_MPU_ACCESS_BUFFERABLE(STATE) (((STATE) == MPU_ACCESS_BUFFERABLE) || \
351 ((STATE) == MPU_ACCESS_NOT_BUFFERABLE))
353 #define IS_MPU_TEX_LEVEL(TYPE) (((TYPE) == MPU_TEX_LEVEL0) || \
354 ((TYPE) == MPU_TEX_LEVEL1) || \
355 ((TYPE) == MPU_TEX_LEVEL2))
357 #define IS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE) (((TYPE) == MPU_REGION_NO_ACCESS) || \
358 ((TYPE) == MPU_REGION_PRIV_RW) || \
359 ((TYPE) == MPU_REGION_PRIV_RW_URO) || \
360 ((TYPE) == MPU_REGION_FULL_ACCESS) || \
361 ((TYPE) == MPU_REGION_PRIV_RO) || \
362 ((TYPE) == MPU_REGION_PRIV_RO_URO))
364 #define IS_MPU_REGION_NUMBER(NUMBER) (((NUMBER) == MPU_REGION_NUMBER0) || \
365 ((NUMBER) == MPU_REGION_NUMBER1) || \
366 ((NUMBER) == MPU_REGION_NUMBER2) || \
367 ((NUMBER) == MPU_REGION_NUMBER3) || \
368 ((NUMBER) == MPU_REGION_NUMBER4) || \
369 ((NUMBER) == MPU_REGION_NUMBER5) || \
370 ((NUMBER) == MPU_REGION_NUMBER6) || \
371 ((NUMBER) == MPU_REGION_NUMBER7))
373 #define IS_MPU_REGION_SIZE(SIZE) (((SIZE) == MPU_REGION_SIZE_32B) || \
374 ((SIZE) == MPU_REGION_SIZE_64B) || \
375 ((SIZE) == MPU_REGION_SIZE_128B) || \
376 ((SIZE) == MPU_REGION_SIZE_256B) || \
377 ((SIZE) == MPU_REGION_SIZE_512B) || \
378 ((SIZE) == MPU_REGION_SIZE_1KB) || \
379 ((SIZE) == MPU_REGION_SIZE_2KB) || \
380 ((SIZE) == MPU_REGION_SIZE_4KB) || \
381 ((SIZE) == MPU_REGION_SIZE_8KB) || \
382 ((SIZE) == MPU_REGION_SIZE_16KB) || \
383 ((SIZE) == MPU_REGION_SIZE_32KB) || \
384 ((SIZE) == MPU_REGION_SIZE_64KB) || \
385 ((SIZE) == MPU_REGION_SIZE_128KB) || \
386 ((SIZE) == MPU_REGION_SIZE_256KB) || \
387 ((SIZE) == MPU_REGION_SIZE_512KB) || \
388 ((SIZE) == MPU_REGION_SIZE_1MB) || \
389 ((SIZE) == MPU_REGION_SIZE_2MB) || \
390 ((SIZE) == MPU_REGION_SIZE_4MB) || \
391 ((SIZE) == MPU_REGION_SIZE_8MB) || \
392 ((SIZE) == MPU_REGION_SIZE_16MB) || \
393 ((SIZE) == MPU_REGION_SIZE_32MB) || \
394 ((SIZE) == MPU_REGION_SIZE_64MB) || \
395 ((SIZE) == MPU_REGION_SIZE_128MB) || \
396 ((SIZE) == MPU_REGION_SIZE_256MB) || \
397 ((SIZE) == MPU_REGION_SIZE_512MB) || \
398 ((SIZE) == MPU_REGION_SIZE_1GB) || \
399 ((SIZE) == MPU_REGION_SIZE_2GB) || \
400 ((SIZE) == MPU_REGION_SIZE_4GB))
402 #define IS_MPU_SUB_REGION_DISABLE(SUBREGION) ((SUBREGION) < (uint16_t)0x00FF)
This file contains HAL common defines, enumeration, macros and structures definitions.
void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn)
void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn)
void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority)
uint32_t HAL_NVIC_GetPriorityGrouping(void)
uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn)
uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
void HAL_NVIC_SystemReset(void)
const uint8_t[]
Definition: 404_html.c:3
void HAL_SYSTICK_Callback(void)
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
void HAL_NVIC_DisableIRQ(IRQn_Type IRQn)
void HAL_SYSTICK_IRQHandler(void)
void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource)
uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn)
void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)