Browse Source

Actually use RAM vector table!

teensy4-core
PaulStoffregen 10 years ago
parent
commit
7402581745
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      teensy3/mk20dx128.c

+ 1
- 1
teensy3/mk20dx128.c View File

@@ -405,11 +405,11 @@ void ResetHandler(void)
while (dest < &_edata) *dest++ = *src++;
dest = &_sbss;
while (dest < &_ebss) *dest++ = 0;
SCB_VTOR = 0; // use vector table in flash

// default all interrupts to medium priority level
for (i=0; i < NVIC_NUM_INTERRUPTS + 16; i++) _VectorsRam[i] = _VectorsFlash[i];
for (i=0; i < NVIC_NUM_INTERRUPTS; i++) NVIC_SET_PRIORITY(i, 128);
SCB_VTOR = (uint32_t)_VectorsRam; // use vector table in RAM

// hardware always starts in FEI mode
// C1[CLKS] bits are written to 00

Loading…
Cancel
Save