2025-01-06 09:32 AM
I think it is the most popular topic among STM32 programmers who use ST-LINK V2 programming devices.
I have two devices: one is the Lora E5 MIni, and the second is the Lora E5Dev board. Both respond to the AT commands, so I expect they are healthy.
A few days ago, I could access these devices and see their memory. Today, I can't, and I don't know why.
I connected the programmer to the dev board as needed, and I can't connect to this device.
I tried to change settings as the other programmers suggested to achieve connection to such devices but without any success. Programming STM32 controllers using ST-LINK V2 is a kind of magic. It's a horror for me. I can't program my devices.
I upgraded firmware versions several times without any changes.
From the ST-LINK, it looks as expected, I think:
As I wrote above, changes of modes and reset modes gave no change.
So, what is wrong? ST-LINK answers on connection, but why it doesn't see devices connected to it?
2025-01-06 09:47 AM
Please post the error log from the CubeProgrammer.
What you show in the photos isn't a genuine ST-Link from ST.
Have you tried with a genuine ST-Link?
Can your "ST-Link" connect to any other STM32 board(s)?
Can't make out what are the connections from the photos - please show a schematic.
@markpow wrote:A few days ago, I could access these devices and see their memory. Today, I can't
Have you changed the code on the devices?
In particular, have you added sleep and/or reconfigured the debug pins?
@markpow wrote:ST-LINK answers on connection
What do you mean by that?
2025-01-06 11:04 AM - edited 2025-01-06 11:07 AM
@Andrew Neil, I had a genuine ST-LINK V2, but it stopped working, so I gave it away.
So I bought another from VaweShare. It worked for several weeks, but it stopped working today.
I checked wired connections many times. All looks well.
For both devices (Lora E5 MIni and Lora E5 Dev Board) I have the following wire connections:
From the ST LINK V2 (mini) I have the following pins:
VCC
GND
SWDIO
SWCLK
On the Lora E5 Mini I connect them to as usual:
V3.3 <- VCC
GND <- GND
DIO <- SWDIO
CLK <- SWCLK
The same connections were for the Lora E5 Dev board.
When I say, "ST-LINK answers on connection," I mean that it reacts to the refresh action from the STM32CubePrograming.
2025-01-06 11:08 AM
@Andrew Neil : there is a sample log:
19:27:25 : UR connection mode is defined with the HWrst reset mode
19:27:25 : Error: No debug probe detected.
19:27:34 : UR connection mode is defined with the HWrst reset mode
19:27:34 : ST-LINK SN : 36FF6F063146503236522143
19:27:34 : ST-LINK FW : V2J37S7
19:27:34 : Board : --
19:27:34 : Voltage : 3.26V
19:27:34 : Error: Unable to get core ID
19:27:34 : Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication
19:59:10 : UR connection mode is defined with the HWrst reset mode
19:59:10 : ST-LINK SN : 36FF6F063146503236522143
19:59:10 : ST-LINK FW : V2J37S7
19:59:10 : Board : --
19:59:10 : Voltage : 3.26V
19:59:10 : Error: Unable to get core ID
19:59:10 : Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication
2025-01-06 11:21 AM
Have you changed the code on the devices?
In particular, have you added sleep and/or reconfigured the debug pins?
2025-01-06 11:41 AM
No, I didn't change the code for both devices. I said that both devices answered AT commands, so both have the original code without removing protection.
What do you mean when you say, "Have you added sleep and/or reconfigured the debug pins?" I'm sure I didn't change any part of the debug configuration under CubeIDE. In CubeIDE, I have run mode set to the release, not to debug.
2025-01-06 11:47 AM
@markpow wrote:What do you mean when you say, "Have you added sleep and/or reconfigured the debug pins?"
They would be changes to the code. As you say you haven't changed the code, it's irrelevant.
But, if you're just using the original code and not changing it, why do you need to connect the ST-Link?
2025-01-06 11:47 AM
Finally, I ordered a brand new ST-LINK V2 from a trusted reseller.
I think my ST-LINK V2 (mini) is destroyed, but I don't know what caused it.
Of course, may be I'm wrong in my thinking about this problem, then let me know what might be.
2025-01-06 11:53 AM - edited 2025-01-06 11:55 AM
I need to upload the code for them. The code is ready to upload. Usually, I follow the steps for new devices:
For now, I can't do this because I failed on the first step.
As I said above, both devices answered only AT commands, but my devices need my code instead of the AT command service originally installed on them.
2025-01-06 12:02 PM - edited 2025-01-06 12:03 PM
@Andrew Neil wrote:But, if you're just using the original code and not changing it, why do you need to connect the ST-Link?
Even if I made no changes to the code, I should be able to connect to such a device. Do you agree with me?