2018-03-27 07:07 AM
Hello! I manage to write a custom boot loader in STM32L031E6 using I2C interface. To do so, it requires the MCU to provide at least the following features:
1. Reallocation of vector table
2. API functions for internal flash read/write/erase
For (1), I know the there is a vector register VTOR available in STM32L031E6 to reallocate vector table. However, I cannot find any information of (2). Could anyone advise how can I do and anything I have missed out? Many Thanks!
2018-03-27 08:21 AM
Use the HAL functions provided in the libraries and review the examples
stm32l0xx_hal_flash.c
stm32l0xx_hal_flash_ex.c
stm32l0xx_hal_flash_ram.c
2018-05-07 12:55 AM
Thanks for your information. I am finally able to write my own bootloader using the libraries as you mentioned.