cancel
Showing results for 
Search instead for 
Did you mean: 

systick is not working after jump.

Rkuma.1964
Associate II

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.

13 REPLIES 13
Piranha
Chief II

Your code jumps to PROJ1_FLASHADDR - most likely itself...

yes it should jump to itself but it is getting stuck at systeminit.

TDK
Guru

Pretty sure the issue is that while one task is jumping to another spot, the rest of your system is still in its previous state.

If you feel a post has answered your question, please click "Accept as Solution".

This fixed my problem! Thank you! Forgot to clear the interrupt before jumping to the user application from the bootloader