Skip to main content
Visitor II
February 1, 2022
Question

STM32 UART bootloader on brand new chip.

  • February 1, 2022
  • 2 replies
  • 2032 views

Hi, I have some questions about the STM32 UART bootloader. I've never used this technology, so the questions might be trivial, but I couldn't find detailed information on the internet.

Question 1 - In all the tutorials I found, development boards or evaluation boards are always used, so always chips that have already been programmed. The question is:  The STM32 UART Bootloader also present in brand new STM32 chips or does it need to be programmed?

I ask because I intend to design a module that must be as small as possible, to save space I would like to avoid letting out the SWD signals, and use the two wires of the UART also for first initial programming (brand new chip), I can do it?

Question 2 - All STM32 microcontrollers support UART bootloader? On some datasheets I see that it is not mentioned, but then there are generic documents for all STM32 that talk about it.

Thanks in advance

    This topic has been closed for replies.

    2 replies

    Super User
    February 1, 2022

    > The STM32 UART Bootloader also present in brand new STM32 chips or does it need to be programmed?

    The bootloader is in ROM. It is present in new chips and cannot be erased.

    > I would like to avoid letting out the SWD signals, and use the two wires of the UART also for first initial programming (brand new chip), I can do it?

    You need a way of getting the chip into bootloader mode, and you need to ensure the UART is the only active interface when that happens. Assuming you do both of those, yes.

    However, not breaking out SWD signals significantly slows down development and is not something I would recommend for anything except a finished product that needs no further development/debugging.

    > All STM32 microcontrollers support UART bootloader?

    Certainly the vast vast majority, if not all. Details are in AN2606 for specific chips.

    https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

    Visitor II
    February 1, 2022

    > You need a way of getting the chip into bootloader mode, and you need to ensure the UART is the only active interface when that happens. Assuming you do both of those, yes

    By "getting the chip into bootloader mode" do you mean to set the level on the boot pins?

    By " ensure the UART is the only active interface when that happens" do you mean for example to connect the RX pin of all the other uart to ground, to connect the SCK of the SPI to ground, and things like that?

    Super User
    February 1, 2022
    Setting BOOT0 pin level high during reset is one way, assuming the value is not overridden by option bytes.
    Yes. Doesn’t need to be grounded, just need to be inactive/ not toggling.