Skip to main content
Ahmed Kamel
Associate II
May 9, 2019
Solved

STM32F030C8 Embedded system memory bootloader

  • May 9, 2019
  • 3 replies
  • 934 views

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.

This topic has been closed for replies.
Best answer by After Forever

Check the answer of this question.

3 replies

After Forever
After ForeverBest answer
Senior III
May 9, 2019

Check the answer of this question.

Tesla DeLorean
Guru
May 9, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Ahmed Kamel
Associate II
May 12, 2019

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