2018-10-09 12:46 PM
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,
2018-10-09 07:58 PM
Not sure, why don't you try it? You would need to map the ROM to zero and jump in via the vector table.
2018-10-10 08:05 AM
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,
2018-10-12 01:35 PM
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,