cancel
Showing results for 
Search instead for 
Did you mean: 

MPU_Config : init structure MPU_InitStruct.TypeExtField

Anand Ram
Associate III

what does MPU_InitStruct.TypeExtField ? mean

only three options available

#define MPU_TEX_LEVEL0  ((uint8_t)0x00)

#define MPU_TEX_LEVEL1  ((uint8_t)0x01)

#define MPU_TEX_LEVEL2  ((uint8_t)0x02)

does it mean only 3 set of HAL_MPU_ConfigRegion(&MPU_InitStruct); can be called?

is any of many macros can be repeated or if HAL_MPU_ConfigRegion can be called more than three times with multiple regions?

1 REPLY 1
TDK
Guru

This controls the TEX field in the MPU->RASR register, which, along with C/B/S bits, define the properties of that section of memory.

https://www.st.com/resource/en/application_note/dm00272912-managing-memory-protection-unit-in-stm32-mcus-stmicroelectronics.pdf

https://developer.arm.com/documentation/dui0646/a/cortex-m7-peripherals/optional-memory-protection-unit/mpu-access-permission-attributes?lang=en

0693W000006Hm9xQAC.png 

> is any of many macros can be repeated or if HAL_MPU_ConfigRegion can be called more than three times with multiple regions?

The MPU_InitStruct.Number specifies the region number. For the chip I'm looking at, you can have up to 8 different regions.

If you feel a post has answered your question, please click "Accept as Solution".