Skip to main content
Associate
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. 

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

Andrew Neil
Andrew NeilBest answer
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

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
STTwo-32
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
Associate
July 14, 2025

Hi, 

Thank you both very much this is very helpful, 

How do I control the Boot1 (bit) ? 

STTwo-32
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