cancel
Showing results for 
Search instead for 
Did you mean: 

Remapping the Interrupt Vector Table (IVT)

CTabo.1
Senior

Hello,
I need to map two different programs (a custom bootloader and the application) in the memory space of my STM32G0, as described in figure.

CTabo1_0-1689261587293.png

The bootloader should start at power-up, then check the application CRC and eventually jump to it.

Both in the bootloder and in the application, I need to remap the interrupt vector table.
Where can I find some documentation to do this, in the correct way?

Thank you,
Carlo

1 ACCEPTED SOLUTION

Accepted Solutions

The STM32G0 is a Contex-M0+ part, and will have a SCB->VTOR register to point at the base of the vector table. Given size I suspect this will need to a 256-byte aligned address, ie 0x00000000, 0x08000100

You can't put the CRC at the base of FLASH, you need an address pair for the initial SP/PC as the first two words

https://www.st.com/resource/en/programming_manual/pm0223-stm32-cortexm0-mcus-programming-manual-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

The STM32G0 is a Contex-M0+ part, and will have a SCB->VTOR register to point at the base of the vector table. Given size I suspect this will need to a 256-byte aligned address, ie 0x00000000, 0x08000100

You can't put the CRC at the base of FLASH, you need an address pair for the initial SP/PC as the first two words

https://www.st.com/resource/en/programming_manual/pm0223-stm32-cortexm0-mcus-programming-manual-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you.