2015-03-20 12:45 AM
I have tried to jump to STM bootloader, but unfortunately STM reset after that. Where can be error?
SysMemBootJump = (
void
(*)(
void
)) (*((
unsigned
int
*) 0x1FF00000 + 4));
__disable_irq(); HAL_RCC_DeInit(); SysTick->CTRL
= 0; SysTick->LOAD
= 0; SysTick->VAL
= 0;__set_MSP
(*(__IO
uint32_t
*) 0x1FF00000);SysMemBootJump
();This code works fine on STM32L151 and STM32F401(with appropriate addresses).
2015-03-20 01:56 AM
Can you tell me what type STM32L051 you are using?
What is your clock source and speed? How do you want to use the bootloader usb, can, uart?2015-03-20 05:26 AM
I use STM32L051C6T6. I have tried HSI(16 MHz) without PLL and MSI (4.2 MHz) both with same result. In my plan, download firmware through USART1 (PA9, PA10)
2015-03-20 06:07 AM
Where can be error? With the Cortex-M0 you're definitely going to need to map the ROM at zero before you start. These are for the F0 series, you'll need to do something chip appropriate for the L0
https://community.st.com/0D50X00009Xkg1VSAR
Edit:Fixed the DEADLINK