2013-06-12 09:26 PM
Dears,
Do STM32F0 support NVIC_SetVectorTable command?I would like to point the vector table as my program start from 0x08001001NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x1000)Thanks.2013-06-12 11:14 PM
No.
The STM32F0xx is a Cortex M0, which have a fixed vector table address. You will need a M3 if you require this feature.2013-06-13 02:32 AM
On the STM32F0 the method employed to change the active vector table is to map/shadow the internal SRAM at zero, and copy the new vector table there, and not using that area for variables.
2014-09-15 01:12 PM
Hi Clive,
Any could you provide any guidance on how I could do this? I want to write a bootloader and would beenefit fomr being able to do this.2014-09-15 01:33 PM
The IAP examples might be a good place to start, but the goal is to carve out enough space for the vectors, this means bumping up the 0x20000000 starting point as provided to the linker via the scatter file, or linker script, and then memcpy()ing the vector table from the base of the new image to the base of RAM, and then remapping the RAM
/* Relocate by software the vector table to the internal SRAM at 0x20000000 ***/
/* Copy the vector table from the Flash (mapped at the base of the application
load address 0x08003000) to the base address of the SRAM at 0x20000000. */
for(i = 0; i < 48; i++)
{
VectorTable[i] = *(__IO uint32_t*)(APPLICATION_ADDRESS + (i<<2));
}
/* Enable the SYSCFG peripheral clock*/
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
/* Remap SRAM at 0x00000000 */
SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
http://www.st.com/web/en/catalog/tools/PF258152
STM32F0xx_AN4065_FW_V1.0.0\Project\STM32F0xx_IAP\binary_template Watch that they reset the peripheral, not enable the clock.