No target connected error in STM32F7 - Page 1
Forum section: electronics / general

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 26, 2019, 09:56:09 pm
content: On my custom board, I use STM32F767 microprocessor. When I try to flash program, I get no target connected error. When I set Boot0 pin as high/low and NRST pin as low, the Keil recognize the microprocessor. But when I remove GND connection of NRST pin, power supply current value oscillates and the microprocessor goes to same error mode again. Actually, I also add pull up 10k resistor to NRST pin because this resistor is missing in my design, but the problem is still there. Do you have any idea about solution and why it happens?Thanks

author: lucazader
author_rank: Regular Contributor
timestamp: March 26, 2019, 10:01:02 pm
content: Possibly try some different connection and/or reset modes.eg core reset, soft reset, hardware reset. Connect under reset, hotplug. etc..Instead of using keil, perhaps try using the STMCubeprogrammer software (the new version of the st-link utility) to try and narrow down the issues.

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 26, 2019, 10:05:41 pm
content: So you mean it is related with at software end?I first time to hear STM32Cube Prog. Is it an IDE?

author: thm_w
author_rank: Super Contributor
timestamp: March 26, 2019, 11:10:52 pm
content: Quote from: A.Ersoz on March 26, 2019, 10:05:41 pmhttps://www.st.com/en/development-tools/stm32cubeprog.htmlold version:https://www.st.com/en/development-tools/stsw-link004.html

author: lucazader
author_rank: Regular Contributor
timestamp: March 26, 2019, 11:27:09 pm
content: More just trying to narrow down if it is related to some settings in keil, or if it is a problem with your PCB

author: Howtosx
author_rank: Newbie
timestamp: March 27, 2019, 06:47:27 am
content: Not only useful but can still be extended again

author: ajb
author_rank: Super Contributor
timestamp: March 27, 2019, 02:05:38 pm
content: How are you connecting to the mcu? What debug probe? SWD or JTAG using a built-in bootloader? What settings? Please share a schematic showing your mcu's reset and programming circuitry (including any other devices that may be connected to the programming lines)

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 27, 2019, 02:29:10 pm
content: Quote from: ajb on March 27, 2019, 02:05:38 pmI use debugger connector placing on the PCB for flashing my codes. Schematic was attached to the post.

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 27, 2019, 03:36:03 pm
content: Quote from: lucazader on March 26, 2019, 11:27:09 pmI also tried to connect with CubePrg and got an error like attached file.

author: lucazader
author_rank: Regular Contributor
timestamp: March 27, 2019, 06:36:02 pm
content: It seems you are using an stlink v2 or v2.1.There are a few funny things in this screenshot.1) what is the error that the program prints if the debug probe is not attached to the board?2) the target voltage of 1.15v seems to be off. this should be 3.3v (probably) and this might be something to do with the power supply current oscillating.3) check the firmware of the st-link is up to date

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 27, 2019, 06:49:49 pm
content: Quote from: lucazader on March 27, 2019, 06:36:02 pmYes, I use ST Link v2.1) No STM32 target found!2) Actually, I didn't understand the target voltage. How can I control it?3) Yes, I updated it.

author: aldi
author_rank: Contributor
timestamp: March 27, 2019, 07:15:49 pm
content: The target voltage is the voltage that the STlink measures at pin 1/2, its connected to 3V3 in your schematic. You should check the power supply for stability issues, and check the wiring from board to STlink.Also: Not sure but it think that the resistor on pin 19 of the connector may connect the STlink 3V3 to ground?

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 28, 2019, 07:07:36 pm
content: I almost solved the problem but not exactly. I assembled new board with only power parts and microcontroller. Then, I have faced same problem. So the common situation among these boards are jumping cables which are connecting ST link adapter to PCB debugger connector. I replaced them and the problem is solved in the new board. However, in the old board, the problem is still there. I suspect that when I remove the GND from NRST pin, power supply current oscillates. During this oscillation, something happens and the microcontroller protects or closes itself.

author: A.Ersoz
author_rank: Regular Contributor
timestamp: March 28, 2019, 07:50:06 pm
content: Guys, I solved the problem completely just minutes ago. On the output of the OpAmps, there is a MUX (MAX396EQI). I used its package downloading from Ultralibrarian website and integrated in my design. But when I double check it with comparing its datasheet its package design is completely wrong. So, now I removed the MUX and total current consumption is 54mA. Now, I will do Boot0 high/low and NRST low cycle again. I hope Keil is also recognized it.

author: Yansi
author_rank: Super Contributor
timestamp: March 28, 2019, 10:30:52 pm
content: CubeProgrammer is a PoS... avoid it while you can as a plague!Use STLINK Utility software instead of that.

author: lucazader
author_rank: Regular Contributor
timestamp: March 29, 2019, 01:51:11 am
content: Quote from: Yansi on March 28, 2019, 10:30:52 pmI tend to disagree, at least for my purposes.1) I am developing on Linux. the Cube programmer is available on linux.2) There is a handy to use cli interface, which i find very convenient when integrating with vscode.3) you can easily change the connection interface, speed and reset types without the stlink utility trying to connect to the target (always seems to do this when you go into the settings in stlink utility)4) more convenient ui for erasing specific sectors etc (useful for when you use custom boot-loaders)It does have downsides, like much higher memory usage because java. But on the whole i definitely think its better.But yea each to their own!

author: Yansi
author_rank: Super Contributor
timestamp: April 01, 2019, 10:48:09 pm
content: You can disagree with whatever you want, but you shall probably take the suggestion more seriously, if one you know... works "there" and knows which tools are buggy and which are not. I would never trust the Cube Programmer. STLink Utility always for any sanity checks.STLINK Utility also has CLI, so now you know.It even supports multiple STLINKs at onceIt would also help, if the OP could attach a schematic and also a PCB layout screenshot, so we could independ//EDIT: Oh, I see it. Why haven't I see it before?You are missing a 100nF cap to GND on the NRST line. Power supply decoupling extremely inadequate I see just a couple of 100nF caps. To little for 100 (or more?) pin package with a 200MHz thing inside. Each VDD pin needs to have its own 100nF.

author: lucazader
author_rank: Regular Contributor
timestamp: April 01, 2019, 11:06:29 pm
content: Well each to their own i guess.I have found st-link utility more buggy and less likely to connect.Wonder why we are getting different experiences?Anyway the ability to run the Cube Programmer on linux is much more beneficial to me, it means i can actually use the program!