Skip to main content
Explorer II
July 14, 2025
Solved

STM32L412RB - Programming

  • July 14, 2025
  • 3 replies
  • 382 views

Hi, 

Is there an option to program the STM32L412RB with DFU / Serial interface? 
I was programming the STM32F407 with DFU and Serial before and now I want to use the STM32L412RB and program it the same way. 
I can't find any information on the BOOT1 pin in this MCU to enter the system memory boot mode

Thank you in advance for your help, 

Ron. 

    This topic has been closed for replies.
    Best answer by Andrew Neil

    @ronnabh wrote:

    I can't find any information on the BOOT1 pin in this MCU to enter the system memory boot mode


    Here:

    AndrewNeil_0-1752487416781.png

    https://www.st.com/resource/en/datasheet/stm32l412rb.pdf#page=18

    via: https://www.st.com/en/microcontrollers-microprocessors/stm32l412rb.html#documentation

     

    So BOOT1 is an Option Bit - not a pin

    3 replies

    Super User
    July 14, 2025

    @ronnabh wrote:

    I can't find any information on the BOOT1 pin in this MCU to enter the system memory boot mode


    Here:

    AndrewNeil_0-1752487416781.png

    https://www.st.com/resource/en/datasheet/stm32l412rb.pdf#page=18

    via: https://www.st.com/en/microcontrollers-microprocessors/stm32l412rb.html#documentation

     

    So BOOT1 is an Option Bit - not a pin

    Technical Moderator
    July 14, 2025

    Hello @ronnabh and welcome to the ST Community. 
    For the STM32L412RB, you will follow the pattern 16 for Bootloader activation (you can find it on the table 2 of the AN2606) no BOOT1 pin to use . Also the paragraph 68 of the AN2606 should give you all details you need.

    Best Regards.

    STTwo-32

    ronnabhAuthor
    Explorer II
    July 14, 2025

    Hi, 

    Thank you both very much this is very helpful, 

    How do I control the Boot1 (bit) ? 

    Technical Moderator
    July 14, 2025

    the nBOOT1 is the bit 23 of the FLASH_OPTR register. So, you can set and reset it throw code. Also, you can connect to the STM32CubeProgrammer and go to the option bytes menu to set/reset the nBOOT1 bit. 

    Best Regards.

    STTwo-32