cancel
Showing results for 
Search instead for 
Did you mean: 

Using STM32F407VG Discovery Board's Debugger to debug STM32f0304P6

EUygu.1
Associate II

Hello. This is my first post here. I'm pretty unexperienced at the hardware side of MCU's and I want to debug my STM32F304P6 processor (on an unofficial board) through debugger of STM32F407VG Discovery Board. I connected SWD pins ( 2nd to CLK, 4th to DIO, GND to GND and 3v3 to 3.3V on Discovery) and unplugged CN3 headers. And I get can not find target error. Than I tried to connect 5th SWD pin with NRST on board but the result is same. I read the documentation and I don't know where am I doing wrong. Thanks

PS: I tried the same method with STM32F103 too. Result is same. Discovery board works well.

Unofficial STM32F034P6 Board:

0693W000005AhCPQA0.png

1 ACCEPTED SOLUTION

Accepted Solutions
EUygu.1
Associate II

Thanks for all the comments.

I connected BOOT0 to 3V3 STM32F03 to PC while reseting core by hand than wiped the system memory. Than took the BOOT0 to GND back and connected under system reset. Now it works well =)

View solution in original post

9 REPLIES 9

Make sure the ST-LINK has current firmware that recognizes the F0 part, also keep the connection speed down, perhaps 1 or 2 MHz

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
EUygu.1
Associate II

I tried on 1.8 MHz but did not work.

TDK
Guru

> STM32f0304P6

> STM32F304P6

> STM32F034P6

Three references and three different typos.

Make sure the target board has power. The SWD connector pin 1 does not provide power.

If you feel a post has answered your question, please click "Accept as Solution".
EUygu.1
Associate II

I'm sure that board has power. I connected 3.3v via 3.3 pin of Discovery board. Not the SWD.

Andreas Bolsch
Lead II

Would you mind giving any *precise* information? E.g. there is no 3.3V pin on the discovery board, so ...?. How did you attempt to connect (which software), what's the *precise* error message you get? "I'm sure that board has power" isn't useful at all. Whether you *think* it is powered and whether it *is* powered are two very different things. Did you verify with a voltmeter?

Andreas Bolsch
Lead II

0693W000005AhubQAC.jpgWorks without trouble. The error appearing in the log is due to the 'blinky' firmware on the F030. Pressing the (Reset-) button on the F030-board cures this.

EUygu.1
Associate II

@Andreas Bolsch​ I did the same connections with you and tested on ST-Link Utility and STM32Cubeide by using ST Link GDB Server (sorry as I say 3.3 I mean 3 that's a terrible mistake). And having errors on both of them. I'm using latest debugger frimware on STM32 Debug+Mass Storage+VCP type. I tried on different clock speeds. Thanks for your respond

Message I get on STM32CubeIde

 STMicroelectronics ST-LINK GDB server. Version 5.4.0

Copyright (c) 2019, STMicroelectronics. All rights reserved.

Starting server with the following options:

       Persistent Mode           : Disabled

       Logging Level             : 1

       Listen Port Number        : 61234

       Status Refresh Delay      : 15s

       Verbose Mode              : Disabled

       SWD Debug                 : Enabled

       InitWhile                 : Enabled

Target no device found

Error in initializing ST-LINK device.

Reason: No device found on target.

0693W000005AnkXQAS.jpg

EUygu.1
Associate II

st-probe output while CN3 headers ON

Found 1 stlink programmers
 serial:     303636464646333633343336344534453433303334323430
 hla-serial: "\x30\x36\x36\x46\x46\x46\x33\x36\x33\x34\x33\x36\x34\x45\x34\x45\x34\x33\x30\x33\x34\x32\x34\x30"
 flash:      1048576 (pagesize: 16384)
 sram:       196608
 chipid:     0x0413
 descr:      F4xx

st-probe output while STM3203 connected:

Found 1 stlink programmers
 serial:     303636464646333633343336344534453433303334323430
 hla-serial: "\x30\x36\x36\x46\x46\x46\x33\x36\x33\x34\x33\x36\x34\x45\x34\x45\x34\x33\x30\x33\x34\x32\x34\x30"
 flash:      0 (pagesize: 0)
 sram:       0
 chipid:     0x074b

st-util output while STM3203 connected:

st-util
2020-11-09T19:48:22 WARN common.c: unknown chip id! 0x374b
2020-11-09T19:48:22 INFO gdb-server.c: Listening at *:4242...

EUygu.1
Associate II

Thanks for all the comments.

I connected BOOT0 to 3V3 STM32F03 to PC while reseting core by hand than wiped the system memory. Than took the BOOT0 to GND back and connected under system reset. Now it works well =)