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 12:49 PM
It may be worth purchasing a genuine programmer if you want tools you can trust to work. Could be a bad connection on the programmer.
Should be able to connect if you don't modify SWDIO/SWCLK pin functions and the chip is running. Otherwise, starting the chip into bootloader mode will let you connect.
2025-01-06 01:04 PM - edited 2025-01-06 01:06 PM
Could it be that somebody else played with these boards? Coworkers or kids? A lightning or power spike, maybe?
If possible, get a new set of hardware.
2025-01-06 01:20 PM
@Pavel A. wrote:Could it be that somebody else played with these boards? Coworkers or kids? A lightning or power spike, maybe?
If possible, get a new set of hardware.
No, no one of them. It's winter in my country now, so lighting isn't expected.
Yes, I ordered a brand-new programmer from a trusted reseller.
2025-01-06 01:37 PM
We get thunder-snow in the winter where I am.
Also gets to be very low humity as water falls out of the air, and indoor furnace heat drys the air. Watch for ESD / static discharge issues.
I seem to recall WaveShare doing PCBA for ST, so conceivable they have an agreement/license for ST-LINK/V2
Generally speaking the error comes from a lack of viability in the Target, circuits not powered, and thus non-responsive, or the part has physically locked out debugging. Behaviour with BOOT0=HIGH might be instructive. Connectivity of NRST required for "Connect Under Reset" to be possible.
2025-01-06 01:58 PM
@Tesla DeLorean wrote:Watch for ESD / static discharge issues.
Yes, I think the same now. It could be a static discharge issue. I programmed the last device about two weeks ago, and probably after that, I had this case. Before this case, it worked perfectly. If I recall correctly, there was a warning on the box to avoid static discharge. But is difficult to work still connected to the ground.
@Tesla DeLorean wrote:Behaviour with BOOT0=HIGH might be instructive. Connectivity of NRST required for "Connect Under Reset" to be possible.
VaweShare ST-LINK mini doesn't have an NRST pin. What is the BOOT0=HIGH in this programmer's context?
2025-01-06 02:04 PM
@TDK wrote:Should be able to connect if you don't modify SWDIO/SWCLK pin functions
Let me know how to modify the SWDIO/SWCLK pin functions. To be honest, I don't know how.
2025-01-06 02:22 PM
>>What is the BOOT0=HIGH in this programmer's context?
It's a general STM32 hardware thing, a boot pin, or button, causing the MCU to run a system loader out of ROM vs user code in FLASH, the former being more of a safe-harbour, the latter reconfiguring pins or interfering.
2025-01-10 02:18 PM
To be honest, it's driving me crazy.
I bought the new brand ST-LINK V2. I upgraded it successfully:
The driver to it is actual:
I use the ST32CubeProgrammer:
I've got pinouts for this programmer from the official link:
According to the above document, the order of the pins looks like this:
So I connected wires to the Lora E5 Mini:
And to ST-LINK V2 (from the point of view the ribbon):
I have got the the result:
So nothing changed:
Next, I connected wires from the point of the pins on the board:
Connections to the Lora were the same as above (the target voltage is 0V in this case).
So I'm still at the same *** point.
So if there's no change, maybe the problem is at another point?
Is it possible that the problem is on the STM32CudeIde configuration or something else?
Three weeks ago, it simply worked, and after something happened, I can't program devices now.
Who can help me and point me out where I'm wrong?
2025-01-10 02:38 PM - edited 2025-01-10 02:46 PM
Both those connectors to the ST-LINK look backward.
Look at the diagram again
Pin ONE is the RED DOT, and RED LINE on the cable
2025-01-10 02:50 PM
Look at the last picture of my last post. I made the connections assuming that the first pin is in the right upper corner. The second is in the row below. Ans so on.
So exactly the way as you point out. Am I wrong?