When jumping to application 1 or 2 from custom bootloader, interrupts are not working
I am using a custom bootloader in STM32F091RB controller (cortex M0) which has a system clock of 8MHz and my application STM32F091VC controller (cortex M0) has system clock of 48MHz. Will it affect my application peripheral's interrupt. As my interrupts are not working. I have also mapped vector table to SRAM and again remapped it to 0x00000000. Though its not working.
Below is from bootloader code.
#define SRAM_BASE_ADDR 0x20000000
#define CODE_SLOT_1_BASE_ADDR (uint32_t)0x08002100
#define CODE_SLOT_2_BASE_ADDR (uint32_t)0x08019000
void fnJumpToApp(void)
{
uint8_t i;
uint32_t *p = (uint32_t *)SRAM_BASE_ADDR; // Base of RAM (0xC0 carved out in scatter file)
uint32_t *q = (uint32_t *)CODE_SLOT_1_BASE_ADDR; // Base of FLASH
__disable_irq();
/* 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 0x08000000) to the base address of the SRAM at 0x20000000. */
for(i=0; i<48; i++)
*p++ = *q++;
/* Enable the SYSCFG peripheral clock*/
RCC_APB2PeriphResetCmd(RCC_APB2Periph_SYSCFG, ENABLE);
/* Remap SRAM at 0x00000000 */
SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
/* Set system control register SCR->VTOR */
uliJumpAddress = *(uint32_t*) (CODE_SLOT_1_BASE_ADDR + 4);
Jump_To_Application = (pFunction) uliJumpAddress;
__set_MSP(*(uint32_t*) CODE_SLOT_1_BASE_ADDR);
Jump_To_Application();
}Below is from the application code.
void fnRemapVectorTable(void)
{
uint8_t i;
uint32_t *p = (uint32_t *)SRAM_BASE_ADDR; // Base of RAM (0xC0 carved out in scatter file)
uint32_t *q = (uint32_t *)CODE_SLOT_1_BASE_ADDR; // Base of FLASH
/* 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 0x08000000) to the base address of the SRAM at 0x20000000. */
for(i=0; i<48; i++)
*p++ = *q++;
/* Enable the SYSCFG peripheral clock*/
RCC_APB2PeriphResetCmd(RCC_APB2Periph_SYSCFG, ENABLE);
RCC_APB2PeriphClockCmd (RCC_APB2Periph_SYSCFG, ENABLE);
/* Remap SRAM at 0x00000000 */
SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
__enable_irq();
}
can anyone please help me out?
