cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030C8 Embedded system memory bootloader

Ahmed Kamel
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

Check the answer of this question.

View solution in original post

3 REPLIES 3

Check the answer of this question.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ahmed Kamel
Associate II

Many thanks. It works now after forcing the reset of USART1 peripheral.