2020-07-26 09:59 PM
below are the codes(0x0801E000U) which is used for jump:
#define PROJ1_FLASHADDR 0x08000000U
#define PROJ2_FLASHADDR 0x0801E000U
__disable_irq();
/* Get the main application start address */
uint32_t jump_address = *(__IO uint32_t *)(PROJ1_FLASHADDR + 4);
/* Set the main stack pointer to to the application start address */
__set_MSP(*(__IO uint32_t *)PROJ1_FLASHADDR);
/* Create function pointer for the main application*/
void (*pmain_app)(void) = (void (*)(void))(jump_address);
/* Now jump to the main application*/
pmain_app();
i am also enabling irq in the beginning of main function.
2020-07-27 02:37 AM
Seems like a statement of facts rather than a question.
Make sure SCB->VTOR points to the vector table properly
2020-07-27 02:42 AM
SCB->VTOR is points to correct vector table. i checked it.
i think my systick is not working properly after jump.
any suggestion will be very helpful.
2020-07-27 03:14 AM
find your systick interrupt vector entry address in your new vector table. check that there is correct code in that address.
also capture systick registers before jump and compare with the values after jump
2020-07-27 05:50 AM
Are you performing the jump within an interrupt?
2020-07-27 05:52 AM
Hi TDK,
i am not performing jump in an ISR.
jump performing in a task of freertos.
2020-07-27 05:55 AM
> __disable_irq();
Do you enable interrupts after jumping?
2020-07-27 06:02 AM
yes,
right after entering the main function.
2020-07-27 10:51 AM
>>jump performing in a task of freertos.
You'd likely want to do it from a system state.
Consider if you can generate a reset, and then transfer control immediately in Reset_Handler.
2020-07-27 09:04 PM
for my project jump is required not reset.
how i can switch to system state from a task?