瀏覽代碼

Actually use RAM vector table!

teensy4-core
PaulStoffregen 10 年之前
父節點
當前提交
7402581745
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      teensy3/mk20dx128.c

+ 1
- 1
teensy3/mk20dx128.c 查看文件

@@ -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…
取消
儲存