cancel
Showing results for 
Search instead for 
Did you mean: 

MPU G0+

OAgui.1
Associate II

Hi community.

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 this example;

https://community.st.com/s/article/how-to-configure-the-mpu-of-an-stm32-using-stm32cubemx

In addition in the reference manual there is no much information about this function or the registers involved:

https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

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.

https://www.st.com/content/ccc/resource/technical/document/application_note/group0/bc/2d/f7/bd/fb/3f/48/47/DM00272912/files/DM00272912.pdf/jcr:content/translations/en.DM00272912.pdf

Thanks for your help!

7 REPLIES 7

Perhaps the Programming Manual?

https://www.st.com/resource/en/programming_manual/pm0223-cortexm0-programming-manual-for-stm32l0-stm32g0-stm32wl-and-stm32wb-series-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Oh! That's great!​ Thank you so much. I am new working with STM32.

Last question, is it available to set with .ioc?​ Because I am unable to see It!

I don't use CubeMX/IDE

I believe the part has an MPU

STM32Cube_FW_G0_V1.3.0\Projects\NUCLEO-G031K8\Examples\Cortex\CORTEXM_MPU\CORTEXM_MPU.ioc

STM32Cube_FW_G0_V1.3.0\Projects\NUCLEO-G031K8\Examples\Cortex\CORTEXM_MPU\Src\main.c

STM32Cube_FW_G0_V1.3.0\Projects\NUCLEO-G031K8\Examples\Cortex\CORTEXM_MPU\Src\stm32_mpu.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Semer CHERNI
ST Employee

Hello @OAgui.1​ 

First let me thank you for posting.

From CubeMx side the MPU configuration is not supported by the tool for the STM32G0x1 MCUs.

But as @Community member​ has mentioned you can inspire from the examples and build your project using the drivers from the FW package.

May be in the future this functionality could be add to CubeMx for this line of MCUs.

Kind regards,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AScha.3
Chief III
  • if not in Cube - not in chip. (most likely)

seems the "protection unit" is here, but a very simple level:

0693W00000UoY7LQAV.png0693W00000UoY7aQAF.pngso there is no special "MPU-unit" to activate in Cube, just some registers for flash protection:

0693W00000UoY89QAF.png 

If you feel a post has answered your question, please click "Accept as Solution".

The product page seems pretty explicit.. Both in the text, and the infographic.

https://www.st.com/en/microcontrollers-microprocessors/stm32g031k8.html

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
OAgui.1
Associate II

Thank you all, for your help!