Skip to main content
tomero
Associate
June 20, 2025
Question

Pinout to read stm32F103zet6 using ST-LINK

  • June 20, 2025
  • 6 replies
  • 1425 views

Hi,

I want to know pinout to read flash from CHIP stm32F103zet6 using ST-LINK.

Can someone provide it, im new on STM32 chip.

 

Thanks.

6 replies

Andrew Neil
Super User
June 20, 2025

The pinout of the chip will be in its datasheet.

The pinout of the ST-Link will be in its User Manual.

 

If the STM32 is already programmed by someone else, it might be read-protected...

 


@tomero wrote:

I'm new on STM32 chip.


Are you familiar with any other microcontroller(s) ?

 

Here are some getting started tips:

https://community.st.com/t5/stm32-mcus-products/for-better-learning-stm32-programming-and-debugging/m-p/719485/highlight/true#M260696

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
tomero
tomeroAuthor
Associate
June 20, 2025

Im very stuck to reading pinout from datasheet, but I try configuration like this:

tomero_0-1750425733666.png

But still not connected. Btw, I just want to connect it for read flash test.

Andrew Neil
Super User
June 20, 2025

@tomero wrote:

Im very stuck to reading pinout from datasheet


It's all in Table 5:

AndrewNeil_1-1750429328113.png

https://www.st.com/resource/en/datasheet/stm32f103ze.pdf#page=35

via: https://www.st.com/en/microcontrollers-microprocessors/stm32f103ze.html#documentation

 

Note that this is not a genuine ST-Link - it's a clone:

AndrewNeil_0-1750428736722.png

See How to recognize a genuine ST-LINK/V2 versus a cloned one; in particular, this comment.

Double-check that you have the pinout correct for the actual clone you have - as noted in the above comment.

 

You need to connect:

  • SWDIO pin from the ST-Link to the SWDIO pin on the STM32;
  • SWCLK pin from the ST-Link to the SWCLK pin on the STM32;
  • RST pin from the ST-Link to the NRST pin on the STM32.

Plus 3.3V and GND

As @avinash_elec said, the STM32 needs to be in a functional circuit.

 


@tomero wrote:

I just want to connect it for read flash test.


Why do you need to do that?

I hope you're not trying to steal someone's code ... ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
avinash_elec
Associate III
June 20, 2025

Is your STM32 on a development board? or a bare chip? If its on a board then tell us about the board like its name and make. Other wise if you are using bare chips, it still need few more connection in order to work. Like there are so many VCC pins but you have connected only one of them. Proper level on RESET and boot pins also required and decoupling capacitors also.

avinash_elec
Associate III
June 21, 2025

You will also be needing decoupling capacitors on all VCC/GND pair. And BOOT pins to select booting from FLASH or RAM and avoid the bootloader. 

avinash_elec
Associate III
June 21, 2025

VBAT pin must also be at VDD level 3.3V

avinash_elec
Associate III
June 21, 2025

See BOOT0 and BOOT1 pin truth table in Reference manual. 

Andrew Neil
Super User
June 21, 2025

As @avinash_elec says, you need a fully-functional design to be able to do this.

See the datasheet.

See also Application Note AN2586Getting started with STM32F10xxx hardware development.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.