Merge pull request #293 from hollie/fix_nvic_table_init

Ensure the NVIC table gets copied to RAM even when it is not at 0x0000
pull/299/head
Bogdan Marinescu 2014-05-07 17:38:34 +01:00
commit 152b58673f
1 changed files with 1 additions and 1 deletions

View File

@ -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++) {