Mbed OS Reference
|
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... | |
The MPU hal provides a simple MPU API to enhance device security by preventing execution from ram.
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.
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.
enable | true to disable writes to ROM, false otherwise |
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.
enable | true to disable execution from RAM, false otherwise |
void mbed_mpu_free | ( | void | ) |
Deinitialize the MPU.
Powerdown the MPU in preparation for powerdown, reset or jumping to another application.