I'm involved in a collaboration to develop a motor driver circuit based on the 48 pin STM32G474 microcontroller. I'm using TIM8 timers to drive the PWM of a DRV8323RH chip.
My question is about the use of BOOT0 pin. My understanding of the BOOT0 pin is that when the BOOT0 pin is at a low level, the STM32G4 microcontroller boots from the User Flash memory. When the BOOT0 pin is at a high level, the nBOOT1 bit determines the boot mode.
Where I'm confused is that in a previous incarnation of the PCB we tied BOOT0 to ground, and programmed STM32G474 we use an st-link2 system, through the TCK and TMS pins. In this incarnation of the board we would prefer to use PB8-BOOT0 to send PWM to the driver chip.
If I am programming using the st-link2 system as before, will I still be able to program the STM32G4 if I tie the PB8-BOOT0 to PWM of the driver?
thank you.
2 Answers 2
There is not only one nBOOT1
bit for boot configuration on STM32G4 devices.
There are also nBOOT0
and nSWBOOT0
bits, which allow to use different boot options as well as describe the use of BOOT0 pin.
Table 5 in section "2.6.1 Boot configuration" on page 89 of STM32G4 Series Reference manual shows, that there are such configuration that state on Reset of BOOT0 pin doesn't matter (you can even don't have any pull-up on it).
And, actually, BOOT0 pin has nothing to do with programming the MCU with ST-Link. BOOT0 only allows you to select the memory area to start the program execution. You can program MCU with any boot configuration selected.
Yes, as long as the Boot0 pin has a pull-down resistor so it is low when the MCU comes out of reset, it will boot to user program. It can be programmed via JTAG or SWD as usual.
-
\$\begingroup\$ Thank you but wont that mean I would not be able to use it to send PWM signals to the DRV chip? \$\endgroup\$Owen White– Owen White2020年05月06日 21:18:02 +00:00Commented May 6, 2020 at 21:18
-
\$\begingroup\$ No, it does not mean that. \$\endgroup\$Justme– Justme2020年05月06日 21:21:51 +00:00Commented May 6, 2020 at 21:21