2024-05-01 11:44 AM - edited 2024-05-02 12:18 AM
Hi :)
Problem: STM32F030R8T6 device not found.
ErrorMsg in CubeProgrammer: "No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug Authentication."
ErrorMsg in CubeIde: "Error in initializing ST-LINK device. Reason: No device found on target."
Setup: I made a breakout-board for an STM32F030R8T6. The board only carries the µC and spreads out the pins to use on a breadboard. I connected all VSS and VDD pins and used 0.1µF capacitors as close as possible to the µC. I connected the ST-Link-V2 as follows:
VSS -> any GND pin
VDD -> any 3V3 pin
NRST -> NRST (pin 7) (not sure if I need to connect the pin somehow aside from the debugger)
SWDIO -> SWDIO (pin 46) 220Ohm Pullup
SWCLK -> SWCLK (pin 49) 220Ohm Pulldown
I tried BOOT0 pin pulled low or high, both didn't work.
I double and tripple checked my connections. I am using the right pins on both sides and the µC has power.
-----------------------------------------------------------------
SOLUTION:
If you are NOT using an additional power supply you have to connect VDD and VAPP (pin 1 or 2 and pin 19 on STLinkV2) to the STM32's VDD.
VDD on STLinkV2 supplies power and VAPP senses target voltage. If the programmer can't sense a voltage you cannot connect.
So here is the correct configuration:
VSS -> any GND pin
VDD -> any 3V3 pin (to supply target with power)
VAPP -> any 3V3 pin (to sense target voltage)
SWDIO -> SWDIO (pin 46) no Pullup or Pulldown, leave pin floating
SWCLK -> SWCLK (pin 49) no Pullup or Pulldown, leave pin floating
I tried BOOT0 pin pulled low to use internal storage.
Depending on you application:
NRST -> NRST tied low through 100nF capacitor
Solved! Go to Solution.
2024-05-01 11:49 PM - edited 2024-05-01 11:49 PM
You're right, I didn't catch that. I was looking at "Board: --".
I finally got it to work. I had my red wire connected to VDD (pin 19 on STLinkV2). I put it on VAPP (pin 1 on STLinkV2) and it worked. But I still have to supply 3V3. But I can just use another wire and go from STLink VDD to STM32 VDD. This way I dont have to use my lab-psu.
Thank you for your help!
2024-05-01 12:20 PM - edited 2024-05-01 12:22 PM
Hi,
- leave away 220Ohm Pullup/+down !
- BOOT0 pin low !
- NRST no connect , just 100nF to gnd.
+
Connect with CubeProgrammer , reset mode: software reset .
+ tell...
2024-05-01 12:31 PM
Indicating the part is non-viable.
Shouldn't need pull-up/down of SWDIO/SWCLK values chosen are quite aggressive. Could be 10x weaker, ie 2K2 or 4K7
Check the static voltage on NRST, should be HIGH by default.
Connect NRST to debug header if you expect external tools to "Connect Under Reset"
Check part orientation, that the pin 1 designation is that, and not injection mold artifact.
2024-05-01 09:12 PM
I removed the Pulldown/Pullup resistors. The pins are floating now.
BOOT0 pin is tied to LOW.
NRST connected to GND via 100nF Capacitor. NRST is high by default, checked with multimeter.
I tried to connect with CubeProgrammer on these settings:
Port: SWD
Freq.: 4000
Mode: Under reset
Access Port: 0
Reset mode: Software reset
Speed: Reliable
Shared: Disabled
Debug in low power mode: true
Part orientation is correct. Pin one is in the bottom left.
This is the second µC I can't connect to. I soldered them myself. I don't have solder-bridges, I checked before applying power. How easily do they get damaged by soldering? Was my first time soldering this small but I think I did quite well.
I still get the same error msg as previously.
2024-05-01 10:29 PM - edited 2024-05-01 10:41 PM
Ok, it should work...
try setting : Reset mode: Software reset , Mode: normal ;
+ show pic, what CubeProgrammer shows.
+ What kind of debug probe you use ? (Original STM? Maybe you have to connect VDD to the debug probe .)
+ If still not working, maybe distance to caps is a bit to much,
can you solder the 100nF cer-caps (SMD) direct on the pin header ? (0805 fits between 0,1" pads)
->
2024-05-01 10:42 PM - edited 2024-05-02 12:17 AM
I am using STLinkV2 i got from mouser. So no clone, I got an original.
Maybe you're right and the capacitors are too far away but I am not the first one to make such a board. Others got it to work: https://youtu.be/ZH7zPy7Jb9M?si=0KXpfGCFPjmd85PN
I don't have any SMD parts. I would need to buy some. And then at this point I would rather design a new board with the capacitors already mounted.
----------------------------------------------------------------------------
EDIT: While tinkering I accidentally flipped the green and blue wires. This image and the later one where I show the breadboard don't match.
2024-05-01 10:45 PM - edited 2024-05-01 10:46 PM
So : Original STM? You have to connect VDD to the debug probe . + supply 3v3 to target !
(now 0,22V - no power at target cpu !)
+ show pic, what CubeProgrammer shows.
2024-05-01 10:53 PM
I have an original STM32, I got from mouser as well.
What do you mean with "You have to connect VDD to the debug probe . + supply 3v3 to target !"
The red wire you see in the image is +3V3 and it's connected to the µC. The µC has 3V2, I checked with my multimeter.
"+ show pic, what CubeProgrammer shows."
If you want to know the target information, I don't get any info. µC is connected but when I click connect it looks like the image above.
2024-05-01 11:03 PM
>What do you mean with "You have to connect VDD to the debug probe . + supply 3v3 to target !"
There is no power ! st-link tells : 0,0 V at target.
YOU have to add VDD 3,3V /gnd to the target cpu ! st-link not giving power, it only checks voltage on VDD.
2024-05-01 11:18 PM
Ok, I have now supplied +3V3 to the board with my benchtop psu. Unfortunately CubeProgrammer still shows "now power".