Browse Source

Add comment about MPU allocation order

teensy4-core
PaulStoffregen 4 years ago
parent
commit
adecf720cc
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      teensy4/startup.c

+ 3
- 1
teensy4/startup.c View File

@@ -222,7 +222,9 @@ FLASHMEM void configure_cache(void)
SCB_MPU_RBAR = 0x00000000 | REGION(i++); // ITCM
SCB_MPU_RASR = MEM_NOCACHE | READWRITE | SIZE_512K;

// TODO: trap regions should be created last, because the hardware gives
// priority to the higher number ones.
SCB_MPU_RBAR = 0x00000000 | REGION(i++); // trap NULL pointer deref
SCB_MPU_RASR = DEV_NOCACHE | NOACCESS | SIZE_32B;


Loading…
Cancel
Save