cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L083 Jump to System Memory DFU bootloader?

Joe Sun
Associate II

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,

3 REPLIES 3

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
Up vote any posts that you find helpful, it shows what's working..
Joe Sun
Associate II

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
Associate II

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,