Skip to main content
thanhnt
Associate
November 1, 2015
Question

STM32F103R8T6 SWD problem

  • November 1, 2015
  • 1 reply
  • 727 views
Posted on November 01, 2015 at 08:19

Hello everyone,

I am making PCB with STM32F103R8T6 but I have problem with SWD. I connect PCB with ST Link Mini via SWD 

SWCLK <--> PA14

SWDIO <--> PA13

RST <--> NRST

SWIM <--> PB3

GND <--> VCC

3V3 <--> VDD

In Keil, it can recognize SW Device but I cannot download flash it say Flash Download failed - ''Cortex - M3''

However, if I tried to erase full chip I can download flash but after ''Programming Done''  it shows 

Contents mismatch at: 08000000H  (Flash=FFH  Required=60H) !

......

Contents mismatch at: 08000063H  (Flash=FFH  Required=08H) !

and then''Flash Download failed - ''Cortex - M3''''

In this case, if I unplug power and plug power again PCB work.

Can you give me some advise to solve my problem?

Thank you very much.

    This topic has been closed for replies.

    1 reply

    Amel NASRI
    ST Technical Moderator
    November 10, 2015
    Posted on November 10, 2015 at 11:04

    Hi trung_thanh.nguy.001,

    I think that PB3 is not required for SWD configuration.

    You may refer to the schematic of

    http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/CD00267113.pdf

    for example to check the connections of STLink component.

    I recommend you also to connect using the STLink Utility and do some operations using its graphical interface.

    -Mayla-

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.