on 2021-11-16 02:19 AM
The purpose of this article is to explain how to use STM32CubeMX to configure the MPU. For details about the MPU please refer to the Application Note (AN), Managing memory protection unit in STM32 MCUs - Application note.
As an example configuration, we will define three MPU regions following the example provided in the application note as shown below:
Note: All the terms in this table are explained in the application note as well as all the definitions and explanations.
The STM32H743AI microcontroller will be used as the target device. It uses an Arm Cortex-M7 core that embeds the MPU.
Hi community. I am new using ST MCUs and I have to say that I am very pleased.
I am planning to use memory protection unit (MPU) in my project. My MCU is STM32G031K8 but I cannot find how to activate this function with CubeMX. I would want to do the same as the example above:
In addition in the reference manual there is no much information about this function or the registers involved:
or in the datasheet
https://www.st.com/resource/en/datasheet/stm32g031k8.pdf
An I wrong? or maybe this function is not available for this MCU. According to this is link I can use this function but I am not sure.
Thanks for your help!
Hello @OAgui.1 ,
@ST AME Support NF should be able to help you.
Thank you,
Laura
Hello,
You are correct.
For STM32G0 you cannot configure the MPU from CubeMX, you can configure the MPU by code and here is an example from the STM32CubeG0.
C:\Users\xxxxx\STM32Cube\Repository\STM32Cube_FW_G0_V1.6.1\Projects\NUCLEO-G071RB\Examples\CORTEX\CORTEXM_MPU
BR
Nico
Thank you so much for your explanation.
Hello, how to config Static Ram, Flash Memory and LCD ? I'm trying config, but displaying message conflict NE2 and NE3....