2022-11-01 05:29 PM
I have a question about the BOOT pin performance of the STM32G031.
In the datasheet says that upon reset, the boot pin (PA13) is established at the beginning as the picture shows. But I wanna know if it is only at the beginning of the reset and then I can use the BOOT pin as an ADC pin???
In the stm32g031 that boot pin automatically changes to SW after boot but we don't need to debug.
2022-11-02 01:15 AM
Welcome, @Edson Cruz González, to the community!
Unfortunately, you did not mention which of the more than a thousand STM32s you are referring to. However, I am not aware of any derivative that has the alternative function ADC input on the SWD pins. You can find the alternative functions that can be used in the respective data sheet in the section "Pinouts, pin description and alternate functions" and there in the table "Pin assignment and description".
Regarding the second question: yes, the SWD pins are polled shortly after the reset to a connected SWD debug interface and remain in this function until the SWD connection is terminated. It follows that the programmed alternative function is not available during debugging or programming via SWD.
Does this answer your question?
Regards
/Peter
2022-11-02 01:17 AM
BOOT state is sampled while coming out of reset. It's not needed afterwards, so in the chips which share BOOT pin with something else, few microseconds after reset the pin is used as an ordinary port pin. Also, in the MCUs in which BOOT is shared with GPIO, the boot function may be blocked by programming the option bytes.
2022-11-02 03:34 PM
Is it possible to avoid blocking the pin with the option bytes, and instead put a delay before changing the function to gpio?
2022-11-03 04:59 AM
All the STM32 microcontrollers have the capability to boot from:
Regard: Best dash cam apps
2022-11-03 08:27 PM
The values on the BOOT pin are latched on the 4th rising edge of SYSCLK after reset
release, so after MCU boot successfully, BOOT pin can be used as other functions. But the matters need to be attended is the BOOT pin is also re-sampled when the device exits the Standby mode.
Consequently, they must be kept in the required Boot mode configuration when the device is
in the Standby mode.
2022-11-04 03:23 PM
The FLASH memory address is 0x08000000 (careful with zeros).