mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
setup: disable SYSCFG registers
This commit is contained in:
parent
c82ce39ce5
commit
fdd5cbe202
6
setup.c
6
setup.c
@ -196,9 +196,13 @@ void mpu_config(void)
|
||||
// Peripherals (0x50000000 - 0x5007ffff, read-write, execute never)
|
||||
MPU_RBAR = 0x50000000 | MPU_RBAR_VALID | (6 << MPU_RBAR_REGION_LSB);
|
||||
MPU_RASR = MPU_RASR_ENABLE | MPU_RASR_ATTR_PERIPH | MPU_RASR_SIZE_512KB | MPU_RASR_ATTR_AP_PRW_URW | MPU_RASR_ATTR_XN;
|
||||
// SYSCFG_* registers are disabled
|
||||
// (0x40013800 - 0x40013BFF, read-only, execute never)
|
||||
MPU_RBAR = 0x40013800 | MPU_RBAR_VALID | (7 << MPU_RBAR_REGION_LSB);
|
||||
MPU_RASR = MPU_RASR_ENABLE | MPU_RASR_ATTR_PERIPH | MPU_RASR_SIZE_1KB | MPU_RASR_ATTR_AP_PRO_URO | MPU_RASR_ATTR_XN;
|
||||
|
||||
// Enable MPU
|
||||
MPU_CTRL = MPU_CTRL_ENABLE;
|
||||
MPU_CTRL = MPU_CTRL_ENABLE | MPU_CTRL_HFNMIENA;
|
||||
|
||||
// Enable memory fault handler
|
||||
SCB_SHCSR |= SCB_SHCSR_MEMFAULTENA;
|
||||
|
Loading…
Reference in New Issue
Block a user