0
\$\begingroup\$

I'm designing a custom board that contains an STM32G071RBT6.

For the burning in the development process, there is an SWD interface connected and the burning will be done through it.

For mass production, I'm thinking of an option to burn/update a version via UART. I read a bit about it and realized that there is a BOOT pin that needs to be set high and then the controller will go into bootloader. A few things that are not clear to me:

In a lot of manuals I've read, it's about two PINS for the BOOT, but I only have one (BOOT0).

How is the same pin also used for SWCLK? Isn't that a problem?

My goal is that the technician who burns does not touch the card and every time manually connects the BOOT0 to high or low. In the board I am designing, there is also FTDI, so assume that I have an interface to connect to the UART.

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ You should read the application note how to program the MCU over UART. \$\endgroup\$
    – Justme
    Jan 31, 2023 at 19:56
  • \$\begingroup\$ @Justme I read, cant find any answer. \$\endgroup\$
    – Knowledge
    Jan 31, 2023 at 20:15
  • \$\begingroup\$ hi. @Knowledge did you find the solution? \$\endgroup\$
    – mehmet
    Apr 5 at 19:36

1 Answer 1

0
\$\begingroup\$

Pin BOOT1 is used for booting from RAM. Quote from the reference manual:

In the STM32F0x0, three different boot modes can be selected through the BOOT0 pin and boot configuration bits nBOOT1 in the User option byte

So there is no BOOT1 pin, but nBOOT1 option bit. Refer to chapter 2.5 of the reference manual for more details.

BOOTx pins are sampled right after the reset or when exiting from Standby mode. I don't see how sharing BOOT0 with SWDCLK may be a problem. Unless you want to set boot mode and use SWD at the same time. In this case BOOTx pull-up/down resistor must be selected weak enough, so it will not interfere with SWD operation.

We usualy use a separate programming connector, that both powers the board and sets the BOOT0 pin to a correct value (boot from system memory)

Update: I've quoted RM for a F07 series chip, but G0x is almost the same in this part. See also "Empty check" function, that forces loading from System memory (bootloader) in case of an empty chip. May be usefull for mass-production.

\$\endgroup\$
2
  • \$\begingroup\$ how do you use in separate programming connector and power the board with only USB power? is it enough? \$\endgroup\$
    – Knowledge
    Feb 1, 2023 at 10:14
  • \$\begingroup\$ USB-only power is more than enough for a bootloader and often for the whole board. If the board contains power-hungry parts, these are only enabled by firmware, and/or powered from main power source, which is not connected and not required during programming. \$\endgroup\$
    – Flexz
    Feb 1, 2023 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.