mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #293 from hollie/fix_nvic_table_init
Ensure the NVIC table gets copied to RAM even when it is not at 0x0000pull/299/head
commit
152b58673f
|
@ -13,7 +13,7 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
// Copy and switch to dynamic vectors if the first time called
|
// Copy and switch to dynamic vectors if the first time called
|
||||||
if (SCB->VTOR == NVIC_FLASH_VECTOR_ADDRESS) {
|
if (SCB->VTOR < NVIC_RAM_VECTOR_ADDRESS) {
|
||||||
uint32_t *old_vectors = vectors;
|
uint32_t *old_vectors = vectors;
|
||||||
vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
|
vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
|
||||||
for (i=0; i<NVIC_NUM_VECTORS; i++) {
|
for (i=0; i<NVIC_NUM_VECTORS; i++) {
|
||||||
|
|
Loading…
Reference in New Issue