Mistake on this page?
Report an issue in GitHub or email us
Modules | Functions
MPU hal

The MPU hal provides a simple MPU API to enhance device security by preventing execution from ram. More...

Modules

 MPU hal tests
 The MPU test validates proper implementation of the MPU hal.
 

Functions

void mbed_mpu_init (void)
 Initialize the MPU. More...
 
void mbed_mpu_enable_rom_wn (bool enable)
 Enable or disable ROM MPU protection. More...
 
void mbed_mpu_enable_ram_xn (bool enable)
 Enable or disable ram MPU protection. More...
 
void mbed_mpu_free (void)
 Deinitialize the MPU. More...
 

Detailed Description

The MPU hal provides a simple MPU API to enhance device security by preventing execution from ram.

Defined behavior

Undefined behavior

See also
MPU hal tests

Function Documentation

void mbed_mpu_enable_ram_xn ( bool  enable)

Enable or disable ram MPU protection.

This function is used to mark all of RAM as execute never. When enabled code is only allowed to execute from flash.

By default execution from RAM is disabled.

Parameters
enabletrue to disable execution from RAM, false otherwise
void mbed_mpu_enable_rom_wn ( bool  enable)

Enable or disable ROM MPU protection.

This function is used to mark all of ROM as read and execute only. When enabled writes to ROM cause a fault.

By default writes to ROM are disabled.

Parameters
enabletrue to disable writes to ROM, false otherwise
void mbed_mpu_free ( void  )

Deinitialize the MPU.

Powerdown the MPU in preparation for powerdown, reset or jumping to another application.

void mbed_mpu_init ( void  )

Initialize the MPU.

Initialize or re-initialize the memory protection unit. After initialization or re-initialization, ROM and RAM protection are both enabled.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.