Skip to main content
Joe Sun
Associate
October 9, 2018
Question

STM32L083 Jump to System Memory DFU bootloader?

  • October 9, 2018
  • 3 replies
  • 847 views

Is there any issue to jump to system memory DFU bootloader for STM32L083? I can see it works if BOOT0 is puled to high when powered ON.

thanks,

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    October 10, 2018

    Not sure, why don't you try it? You would need to map the ROM to zero and jump in via the vector table.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Joe Sun
    Joe SunAuthor
    Associate
    October 10, 2018

    Hi Clive,

    Thank you. this is the code I have tried, but it did not work. I put the code in SystemInit, which is executed right in the Reset handler of the flash memory, but there is no USB device enumerated in the PC and the code reset repeatedly.

    void SystemInit (void)

    {   

    void (*start_of_bootloader)(void);

    /* Enable the SYSCFG APB Clock */

    *(__IO uint32_t *) 0x40021034 |= ((uint32_t)0x00000001);

    __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();

    __set_MSP(*(__IO uint32_t*)0x00000000);

    __set_PSP(*(__IO uint32_t*)0x00000000);

    start_of_bootloader = (void(*)(void))*(unsigned int*)0x00000004;

    start_of_bootloader();

    }

    Note:

    MSP and PSP is : 0x200014d0

    start_of_bootloader is : 0x1ff00405

    thanks,

    Joe Sun
    Joe SunAuthor
    Associate
    October 12, 2018

    He Clive,

    After carefully reading the manual , now I understand. If Boot 0 pin is 0, the only way to enter and stay in boot-loader is to configure STM32L083 in bank mode and make the code in both banks invalid.

    thanks,