mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

MPU management functions

MPU management functions
[Platform]

Functions

void mbed_mpu_manager_lock_ram_execution (void)
 Lock ram execute never mode off.
void mbed_mpu_manager_unlock_ram_execution (void)
 Unlock ram execute never mode.
void mbed_mpu_manager_lock_rom_write (void)
 Lock rom write never mode off.
void mbed_mpu_manager_unlock_rom_write (void)
 Unlock rom write never mode.

Function Documentation

void mbed_mpu_manager_lock_ram_execution ( void   )

Lock ram execute never mode off.

This disables the MPU's execute never ram protection and allows functions to run from RAM. Execution directly from ram will be allowed if this function is invoked at least once (the internal counter is non-zero).

Use this locking mechanism for code which needs to execute from ram such as flash programming algorithms and ram thunks.

The lock is a counter, can be locked up to USHRT_MAX This function is IRQ and thread safe

Definition at line 28 of file mbed_mpu_mgmt.c.

void mbed_mpu_manager_lock_rom_write ( void   )

Lock rom write never mode off.

This disables the MPU's read only ROM protection and allows ROM to be written to. Writing to ROM will not result in an MPU fault if this function is invoked at least once (the internal counter is non-zero).

Use this locking mechanism for code which needs to write to ROM such as flash programming algorithms.

The lock is a counter, can be locked up to USHRT_MAX This function is IRQ and thread safe

Definition at line 50 of file mbed_mpu_mgmt.c.

void mbed_mpu_manager_unlock_ram_execution ( void   )

Unlock ram execute never mode.

Use unlocking in pair with mbed_mpu_manager_lock_ram_execution().

The lock is a counter, should be equally unlocked as locked This function is IRQ and thread safe

Definition at line 39 of file mbed_mpu_mgmt.c.

void mbed_mpu_manager_unlock_rom_write ( void   )

Unlock rom write never mode.

Use unlocking in pair with mbed_mpu_manager_lock_rom_write().

The lock is a counter, should be equally unlocked as locked This function is IRQ and thread safe

Definition at line 61 of file mbed_mpu_mgmt.c.