简体   繁体   English

STMEZH7 的 TXM_MODULE_MANAGER_16_MPU

[英]TXM_MODULE_MANAGER_16_MPU for STMEZH7

According to the application note AN4838 page 12, STMEZH7 has only 8 regions.根据应用笔记AN4838第 12 页,STMEZH7 只有 8 个区域。 However, there is the following statement in the project description of STM32H747I :但是, 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. TXM_MODULE_MANAGER_16_MPU 是一个预处理器定义,应在 C 和汇编预处理器定义列表中添加,以允许 stm32H7xx 系列上的应用程序正常工作。

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:我搜索了symbole,看看它是否真的指的是16个区域而不是8个区域的MPU配置,我在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.我曾尝试使用 STM32H735 删除项目的符号,但它给出了意外的行为。 Does this means the AN is wrong and we can configure 16 regions and which also means we can configure 128 (16*8) subregions?这是否意味着 AN 错误,我们可以配置 16 个区域,这也意味着我们可以配置 128(16*8)个子区域?

The app note is correct, see how the parentheses are after the 16, not the 8:应用笔记是正确的,看看括号是在 16 之后,而不是 8 之后: 应用笔记截图

The STM32H7xx chips should all have 16 region MPUs. STM32H7xx 芯片都应该有 16 个区域的 MPU。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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