File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -196,9 +196,13 @@ void mpu_config(void)
196196 // Peripherals (0x50000000 - 0x5007ffff, read-write, execute never)
197197 MPU_RBAR = 0x50000000 | MPU_RBAR_VALID | (6 << MPU_RBAR_REGION_LSB );
198198 MPU_RASR = MPU_RASR_ENABLE | MPU_RASR_ATTR_PERIPH | MPU_RASR_SIZE_512KB | MPU_RASR_ATTR_AP_PRW_URW | MPU_RASR_ATTR_XN ;
199+ // SYSCFG_* registers are disabled
200+ // (0x40013800 - 0x40013BFF, read-only, execute never)
201+ MPU_RBAR = 0x40013800 | MPU_RBAR_VALID | (7 << MPU_RBAR_REGION_LSB );
202+ MPU_RASR = MPU_RASR_ENABLE | MPU_RASR_ATTR_PERIPH | MPU_RASR_SIZE_1KB | MPU_RASR_ATTR_AP_PRO_URO | MPU_RASR_ATTR_XN ;
199203
200204 // Enable MPU
201- MPU_CTRL = MPU_CTRL_ENABLE ;
205+ MPU_CTRL = MPU_CTRL_ENABLE | MPU_CTRL_HFNMIENA ;
202206
203207 // Enable memory fault handler
204208 SCB_SHCSR |= SCB_SHCSR_MEMFAULTENA ;
You can’t perform that action at this time.
0 commit comments