Skip to main content
Visitor II
January 6, 2021
Question

MPU_Config : init structure MPU_InitStruct.TypeExtField

  • January 6, 2021
  • 1 reply
  • 1273 views

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?

    This topic has been closed for replies.

    1 reply

    Super User
    January 7, 2021

    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.