2019-05-09 05:20 AM
Dears,
I need help with this function; I can't enter system memory bootloader using the jump function
{
void(*systemMemoryJump)(void);/* pointer to function */
volatile uint32_t add = 0x1FFFEC00 ;
HAL_RCC_DeInit();
/* disable systick timer */
SysTick->CTRL = 0 ;
SysTick->LOAD = 0 ;
SysTick->VAL = 0 ;
__disable_irq(); /* Disable interrupts */
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();
systemMemoryJump = (void(*)(void))(*((uint32_t*)(add+4)));
USART_SendData8_USART1(0x55);
__set_MSP(*(uint32_t*)add); /* Set stack pointer */
systemMemoryJump();
}
The controller stuck after send the get command.
Solved! Go to Solution.
2019-05-09 05:29 AM
Check the answer of this question.
2019-05-09 05:29 AM
Check the answer of this question.
2019-05-09 06:45 AM
And who enables the IRQ on the other side?
Have you stepped this to follow where it goes, or that it enters the loader properly?
Don't enter the ROM from an IRQ Handler
Make sure the SYSCFG clock is enabled, and the ROM is visible at zero
After the remap add could equal zero, and work.
2019-05-11 11:09 PM
Many thanks. It works now after forcing the reset of USART1 peripheral.