2022-04-14 03:40 PM
I am attempting to write software for a "Kakute F7", which is a flight controller with an STM32F745VG on it (the schematic is attached). Some good graphics and a diagram of this can be found here.
I keep getting errors when connecting to the MCU over the ST-LINK. When trying to connect from the command line (by creating a GDB server) I get the error:
STMicroelectronics ST-LINK GDB server. Version 5.7.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 31
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Enabled
SWD Debug : Enabled
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
And in STM32 ST-LINK Utility I get:
Can not connect to target!
Please select "Connect Under Reset" mode from Target->Settings menu and try again.
If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu.
No target connected
Or...
Can not connect to target!
If you're trying to connect to an STM32W1xx device, please select Normal or HotPlug mode from Target->Settings menu.
If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu.
No target connected
(I've tried "Connect Under Reset", "Normal" and "HotPlug").
I've checked over and over again, and the connections appear to be soldered on properly and connected to the correct part of the ST-LINK.
I've tried using this ST-LINK on another MCU, and it works just fine, so I have ruled out it being an issue with the ST-LINK.
Additionally, after continuous plugging in and removing, the STM32F745 does occasionally connect, sometime for quite a while (enough that I can successfully use it and write and debug software on it) and sometimes only temporarily. I'm not sure what is different about the times it works, but it certainly isn't anything intentional.
It's frustrating and I've been checking connections for hours, as well as changing the connection mode in STM32 ST-LINK Utility.
I'm not really sure what else needs to be checked, and I'm not really getting anywhere. Does anyone have any ideas?
2022-04-14 04:02 PM
Is the board powered?
Did you connect GND between the board and the ST-Link? I only see 2 wires. Should be at least 3. Assuming the other two go to a battery.
2022-04-14 04:04 PM
Also try a lower SWD speed, given that you have long jumper wire connections.
2022-04-14 04:11 PM
The board is powered (the power LED is on) and there are 4 wires connected to the board: SWDIO, SWDCLK, GND and VDD_3V3.
2022-04-14 04:12 PM
Tried at 5 KHz (the lowest that STM32 ST-LINK utility seems to go) and no difference
2022-04-15 05:38 PM
Remove the R49, which has been put there by incompetent copy-paste designers. Connect NRST to the debugger and select the "Connect Under Reset" mode.
2022-04-16 01:22 PM
I assume NRST connects to the "RST" part of the debugger? Is this correct?
2022-04-16 02:41 PM
Obviously yes. By the way, RST is a pin name written on Chinese clones. Apparently the designers of it doesn't even understand that the letter N means "negative" and is important...
2022-06-18 03:45 PM
is there any way i can figure out which is R49??
2022-06-18 06:02 PM
Probe against pin 14, the edge along by the 8 MHz crystal. I'd guess its one of those resistors.
My guess would be the one between the crystal and barometer (BMP280)