Pārlūkot izejas kodu

Actually use RAM vector table!

teensy4-core
PaulStoffregen pirms 10 gadiem
vecāks
revīzija
7402581745
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      teensy3/mk20dx128.c

+ 1
- 1
teensy3/mk20dx128.c Parādīt failu

@@ -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

Notiek ielāde…
Atcelt
Saglabāt