#stm32f0_iap_config
void IAP_Set(void)
{
uint32_t i = 0;
/* 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 0x08002800) to the base address of the SRAM at 0x20000000. */
for (i = 0; i < 48; i++)
{
*((uint32_t*)(0x20000000 + (i << 2))) = *(__IO uint32_t*)(ApplicationAddress + (i << 2));
}
/* Enable the SYSCFG peripheral clock*/
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
/* Remap SRAM at 0x00000000 */
SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
}
- 这段程序是改变中断向量表,stm32f0没有设置中断向量表的函数NVIC_SetVectorTable(NVIC_VectTab_FLASH,VectorTable_Offset);