This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Multiple Interrupt Vector Table

Hello Fellas,
I am a newbie in bootloader Development..i have one doubt...i am making an IAP, there will be bootloader and a firmware application on the MCU's(SM470R1B1M- ARM7TDMI core) Flash.I am confused how both the application(bootloader & firmware) will have there vector tables allocated on the flash, As per the data sheet interrrupt vector table address starts from 0x00 & end at 0x23h.

Confusion :- 1. Can both the application(bootloader + firmware) will use same vector table, how? 2. If we have to reposition the vector table then how to do that...

Regards,
Amjad

Parents
  • You should have different vector tables for your bootloader and application, you set your vector table before jumping to application from bootloader:

    void NVIC_SetVectorTable(unsigned long NVIC_VectTab, unsigned long Offset)
    {
    
            SCB->VTOR = NVIC_VectTab | (Offset & (unsigned int)0x1FFFFF80);
    }
    

    used for example in:

            NVIC_SetVectorTable(NVIC_VectTab_FLASH, AP_START_SECTOR);
            user_code_entry = (void (*)(void))((AP_START_SECTOR)+1);
            user_code_entry(); // this will be on end of bootloader
    
    

Reply
  • You should have different vector tables for your bootloader and application, you set your vector table before jumping to application from bootloader:

    void NVIC_SetVectorTable(unsigned long NVIC_VectTab, unsigned long Offset)
    {
    
            SCB->VTOR = NVIC_VectTab | (Offset & (unsigned int)0x1FFFFF80);
    }
    

    used for example in:

            NVIC_SetVectorTable(NVIC_VectTab_FLASH, AP_START_SECTOR);
            user_code_entry = (void (*)(void))((AP_START_SECTOR)+1);
            user_code_entry(); // this will be on end of bootloader
    
    

Children