MPU configuration on cortex M7

stmuser wrote on Tuesday, October 29, 2019:

I am trying to configure MPU on stm32h753 microcontroller, As per the documentation the arm m7 has 16 MPU regions, where as the ports used by free rtos are corresponding to M4, hence we can use only 8 regions. Is there a reason for not using all the regions?

rtel wrote on Tuesday, October 29, 2019:

The MPU port was written when all MPUs had 8 regions, and I had not
actually seen one with 16 until you point this out now - although I
can’t access the datasheet at the moment. We would have to make the
number of regions a compile time option to support 16.

stmuser wrote on Wednesday, October 30, 2019:

Attaching the screen shots of the application note of the stm32 processor, also the screen shots of debugger window showing the mpu_type register window. As per the screen shots of the debugger window F7 series has 8 and H7 series has 16 regions. The corresponding hal_cortex.h header files defines 8 and 16 regions for F7 and H7 respectively.

Hi,

I actually worked with STM32H743ZIT. The MPU_TYPE register value is 0x1000. In the GCC->ARM_CM4_MPU port portEXPECTED_MPU_TYPE value is 0x800 then function prvSetupMPU will not setup a MPU. Please tell me how can i work with this port?

The STM32H743 is actually an M7 instead of an M4, and the FPU is different so you will need an M7 port with FPU. I suspect the M4+FPU port doesn’t save enough state for tasks that use the FPU on an M7 processor.

That’s not answer for my question :slight_smile: M4 MPU port is not working with 16 regions of MPU. No initialize the regions because init function is checking MPU_TYPE register for 8 regions when value is not 0x800 function leave with no info and no mpu init. :slight_smile:

Adding support for 16 regions is on our backlog. Feel free to create a pull request here: https://github.com/freertos with 16-region support if you would like to help it along :wink: