Kishor Giri
Kishor Giri

Reputation: 11

VTOR not found in STM32F030

when attempting to jump to the bootloader App code address on an STM32F030 microcontroller . I cannot find the vector table offset register. Can anyone provide guidance on how to successfully perform the jump operation.

We created a linker script to place the vector table in RAM at a specific address for an STM32F0 microcontroller

Upvotes: 1

Views: 237

Answers (2)

Tom V
Tom V

Reputation: 5510

In Cortex M0+ the VTOR is optional, but this is a plain Cortex M0, so it definitely doesn't have one.

The vector that is loaded when an interrupt occurs will always be from address zero.

You might be able to work around the problem by copying your vector to RAM and remapping the start of RAM to address zero, as described in this thread in the ST forum.

Upvotes: 1

Ilya
Ilya

Reputation: 1525

Cortex-M0 doesn't support vector table relocation.

Reference Manual RM0360, page 45:

Physical remap
Once the boot mode is selected, the application software can modify the memory accessible in the code area. This modification is performed by programming the MEM_MODE bits in the SYSCFG configuration register 1 (SYSCFG_CFGR1).

Unlike Cortex® M3 and M4, the M0 CPU does not support the vector table relocation. For application code which is located in a different address than 0x0800 0000, some additional code must be added in order to be able to serve the application interrupts. A solution is to relocate by software the vector table to the internal SRAM:
• Copy the vector table from the flash (mapped at the base of the application load address) to the base address of the SRAM at 0x2000 0000.
• Remap SRAM at address 0x0000 0000, using SYSCFG configuration register 1.
• Then once an interrupt occurs, the Cortex-M0 processor fetches the interrupt handler start address from the relocated vector table in SRAM, then it jumps to execute the interrupt handler located in the flash. This operation should be done at the initialization phase of the application. Please refer to AN4065 and attached IAP code from www.st.com for more details

Upvotes: 2

Related Questions