cancel
Showing results for 
Search instead for 
Did you mean: 

How do I configure Memory Protection Unit?

Muzahir Hussain
Associate III
Posted on November 03, 2017 at 19:56

How do I configure the Memory Protection Unit in STM32F103RB? I need to protect a region of memory from writing. Can I do it using MPU?

#memory-protection #stm32f103xx #cortex-m3 #cortex-m4
3 REPLIES 3
Posted on November 03, 2017 at 20:32

Have you tried reviewing the ARM documentation?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AVI-crak
Senior
Posted on November 04, 2017 at 00:05

There are 5 regions available for cortex m3.

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0179b/CHDFDFIG.html

Each region is programmed sequentially into the MPU registers.

First, we declare a new region, then the starting address, then the parameters themselves, then we need to turn on the protection mechanism. It is done once, then you can leave it alone. It is important to remember which region has already been used, because it is impossible to see all regions at once. Only one region is available for reading and modifying - the one you selected at the moment.

http://forum.ixbt.com/topic.cgi?id=48:11266:2178#2178

Posted on November 13, 2017 at 13:49

I've been told that STM32F103RB do not have an MPU. I couldn't find it on stm's Reference Manual either. So is there any other way to protect a memory region?