Skip to main content
vector950
Associate
March 20, 2015
Question

Can't jump to STM bootloader on STM32L051

  • March 20, 2015
  • 3 replies
  • 895 views
Posted on March 20, 2015 at 08:45

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).

    This topic has been closed for replies.

    3 replies

    stm32forum
    Associate III
    March 20, 2015
    Posted on March 20, 2015 at 09:56

    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?

    vector950
    vector950Author
    Associate
    March 20, 2015
    Posted on March 20, 2015 at 13:26

    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)

    Tesla DeLorean
    Guru
    March 20, 2015
    Posted on March 20, 2015 at 14:07

    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

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..