简体   繁体   中英

TXM_MODULE_MANAGER_16_MPU for STMEZH7

According to the application note AN4838 page 12, STMEZH7 has only 8 regions. However, there is the following statement in the project description of STM32H747I :

The TXM_MODULE_MANAGER_16_MPU is a Preprocessor define that should be added in both C and Assembly preprocessor define list to allow the application on the stm32H7xx family to work properly.

I searched for the symbole to see if it really refers to the MPU configuration of 16 regions instead of 8, and I found the following in the tx_thread_schedule:

config_mpu:
    LDM     r0!,{r2-r9}                             // Load MPU regions 0-3
    STM     r1,{r2-r9}                              // Store MPU regions 0-3
    LDM     r0!,{r2-r9}                             // Load MPU regions 4-7
    STM     r1,{r2-r9}                              // Store MPU regions 4-7
#ifdef TXM_MODULE_MANAGER_16_MPU
    LDM     r0!,{r2-r9}                             // Load MPU regions 8-11
    STM     r1,{r2-r9}                              // Store MPU regions 8-11
    // Regions 12-15 are reserved for the user to define.
    LDM     r0,{r2-r9}                              // Load MPU regions 12-15
    STM     r1,{r2-r9}                              // Store MPU regions 12-15
#endif

I have tried to remove the symbol for a project with STM32H735, but it gives unexpected behaviour. Does this means the AN is wrong and we can configure 16 regions and which also means we can configure 128 (16*8) subregions?

The app note is correct, see how the parentheses are after the 16, not the 8: 应用笔记截图

The STM32H7xx chips should all have 16 region MPUs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM