mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
mpu_config: depend on MEMORY_PROTECT
This commit is contained in:
parent
e907cb87bc
commit
14233fcc26
2
setup.c
2
setup.c
@ -163,6 +163,7 @@ void setupApp(void)
|
||||
// Never use in bootloader! Disables access to PPB (including MPU, NVIC, SCB)
|
||||
void mpu_config(void)
|
||||
{
|
||||
#if MEMORY_PROTECT
|
||||
// Disable MPU
|
||||
MPU_CTRL = 0;
|
||||
|
||||
@ -206,4 +207,5 @@ void mpu_config(void)
|
||||
|
||||
// Switch to unprivileged software execution to prevent access to MPU
|
||||
set_mode_unprivileged();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user