Skip to main content
Harry Tsang
Associate II
March 27, 2018
Question

STM32L031x6 custom bootloader

  • March 27, 2018
  • 1 reply
  • 663 views
Posted on March 27, 2018 at 16:07

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!

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    March 27, 2018
    Posted on March 27, 2018 at 17:21

    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

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Harry Tsang
    Associate II
    May 7, 2018
    Posted on May 07, 2018 at 07:55

    Thanks for your information.  I am finally able to write my own bootloader using the libraries as you mentioned.