cancel
Showing results for 
Search instead for 
Did you mean: 

How to Communication with bootloader using SWD pins of MCU?

parth kothiya
Senior

I want to write my own custom bootloader program so I want to communicate with MCU using SWD data & clk pins​ but how can I use this pins?

1 REPLY 1
KnarfB
Principal III

MCUs have an on-chip boot ROM which helps programming devices easily via UART, I2C, SPI, ... but not SWD. See AN2606 "STM32 microcontroller system memory boot mode". Take a look at open source SWD boot loaders like OpenOCD or stlink-org to grasp an idea of the complexity of that task and if possible, use them.

See also https://community.st.com/s/question/0D53W00000DJKotSAH/how-to-program-flash-directly-thru-swd

hth

KnarfB