Skip to main content
Graduate II
July 13, 2023
Solved

Remapping the Interrupt Vector Table (IVT)

  • July 13, 2023
  • 1 reply
  • 3050 views

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

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    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

    1 reply

    Graduate II
    July 13, 2023

    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

    CTabo.1Author
    Graduate II
    July 14, 2023

    Thank you.