2024-08-05 05:31 AM
Is it possible to program an empty STM32F042 using UART1 instead of SWCLK-SWDIO?
I want to flash programming of STM32F042 which is zero.
Solved! Go to Solution.
2024-08-05 06:26 AM
Yes
2024-08-05 05:48 AM
If you hold BOOT0 high during reset, it will boot into the bootloader. You can then use UART to program it.
STM32CubeProgrammer can do this for you if you have a USB to UART adapter and hook it up to the correct pins. See AN2606 for supported pinout.
cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf
UART bootloader protocol is detailed here:
cd00264342-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
2024-08-05 05:55 AM
If I do BOOT0 high (always pulled up) and connect USB to UART adapter TX-RX to STM32f042C4U6 as picture, May I program all flash with STM32CubeProgrammer?
2024-08-05 06:02 AM
BOOT0 will need to be Low for normal operation once programmed.
2024-08-05 06:24 AM
Ok, so when programming from UART BOOT0 must be high, after programming we have to do low BOOT0 for normal operation, right?
2024-08-05 06:26 AM
Yes