2024-07-15 02:08 PM - last edited on 2024-07-20 06:44 AM by Tesla DeLorean
We have a new board that uses the STM32H747 MCU and is based on an existing, proven design.
Despite being schematically identical, the MCU on the new board cannot be detected by the STLINK-V3SET programmer and STM32Cube software. For whatever reason, when connected it delivers 5V to the TVAPP pin and says "cannot find target MCU".
Can someone please help ASAP to explain how the voltage and MCU sensing/detection works so that we can do some debugging? It is not over the TVAPP pin as mentioned in the user manual, because it works on our reference design whether it is connected or not.
I would like to know what the programmer is seeing or measuring that is different so that we can troubleshoot and find a solution.
I have checked the voltages and resistances to ground and they are identical.
We do have a small mezzanine connector and adaptor board for the JTAG, perhaps the JTAG is extremely sensitive...?
Can someone please let me know how the programmer detects the MCU and decides when and what voltage to deliver?
Also any tips on how to trouble-shoot further would be extremely appreciated.
Thanks!
2024-07-19 04:26 PM
Please, calm down (and be more polite and patient).
"We" think, you have misleading expectations (bias) (e.g. assuming programmer provides power via pin 1). Or: you have not excluded (e.g. via tests and confirmations) other possibilities for what you experience.
I am still sure: a programmer does NEVER provide power, it wants to measure your board VDD.
2024-07-19 04:40 PM
Thanks, I appreciate your reply.
To clarify, again:
-My board has nothing whatsoever on VDD pin #1. It is 0v when powered up. Power to the mcu is not at all connected to the programmer connector. This is identical to the H7.
-The H7 has 0v at pin#1 when the mcu is erased and no firmware or boot loader. The programmer is able to find it and program is successfully.
-I do not expect any power delivery from the programmer, which is correct.
-Power (3v1 for the mcu) comes only from the pre-programmed pmic, exactly the same as the H7, which is working fine. The pmic does not get configured to deliver any more power from the other channels until the mcu is programmed, which I cannot do until I can tap to it.
-I do not have any firmware in the MCU because the programmer cannot even recognise it, let alone program it. Which is the issue.
-5v does not come from my board. 5v appears in the VDD wire from the programmer when that wire is NOT CONNECTED to my board. I said this already a few times, is this still not clear?
-Pin 9 and all GND wires are connected to my board, just as shown in the H7 jtag connector above.
-The H7 also has 0.0000v on pin 1 until programmed and bootloader uploaded into the mcu. The STLINK programmer programs the H7 with 0v on pin one and also in fact with the wire to pin 1 completely disconnected.
I really don’t know how you come to the conclusion that I am trying to power my board with the VDD pin. My JTAG VDD pin, exactly like the H7, is 0v until the bootloader is installed and MCU power comes direct from the PMIC
2024-07-19 04:42 PM
The ST-LINK/V3SET shouldn't be outputting 5V, are you sure the ground are commoned? It's like you're measuring unrelated supplies. You could perhaps find 5V at the USB connection, but it shouldn't interface to anything other than a regulator. The board's not on a conductive surface?
Show a picture of what you have connected to what, ideally showing you probing the pin with 5V on a multimeter.
It is much more probable that the 5V comes from your board. The ST-LINK doesn't negotiate voltages, you present VTarget so the ST-LINK can buffer IO to the Target at it's voltage.
Check the H747 orientation.
Check you can see 1.25V at the VCAP pin(s) / capacitors.
Check NRST voltage level
2024-07-19 04:57 PM
I am calm, but frustrated because it seems you have not read what I have said at all or refuse to believe it.
- I do not expect power from the programmer, mcu power comes from the pmic and it is alive and well and not connected to VDD, exactly like the H7. I am very happy with it.
-When the programmer is connected to my powered board, 5v is seen on the programmer VDD wire (in reference to the programmer and JTAG connector GND pins which are all connected to common GND on my board) when that wire in the ribbon cable is physically cut in half. So for sure, again, that is not coming from my board and the only other end of the wire is connected to the programmer.
2024-07-19 05:20 PM - edited 2024-07-19 05:21 PM
Hi Tesla, thanks for your input and suggestions.
To answer your am questions:
- Yes the 3 GND pins are all commoned on the board and connected to board GND.
- Nope the board was on a non-conductive surface but that’s definitely good to watch out for!
-With my board powered up and jtag connector connected to the programmer and VDD wire cut, the NRST pin is 3v1, so is the TMS pin, in relation to board GND. Rest are 0v.
- I did check mcu orientation on the pcb and double checked all the ball nets in case they were mirrored or rotated or somehow wrong.
-VCAP has 1.22V when the board is powered up
What I found a little surprising with the H7 design, which seems to work of course, is that with the VDD pin at 0v and even the VDD wire physically cut, the programmer sees the MCU and connects to the Cube software and programs.
I’m out of the lab at the moment but can upload some details tomorrow.
The 5v is not very spectacular. It’s the programmer connected to my board with the VDD wire of the ribbon cable cut in the middle. Multimeter on the side of the VDD wire that leads to the programmer, showing 5.12V.
I even checked my VBUS in (power level at the connector where power enters the board) and it’s only 4.95. So, the 5.12V on the VDD wire is coming through the programmer, probably through its usb input/cable.
2024-07-19 05:30 PM
I believe you, but the ST-LINK/V3SET should NOT be outputting 5V on the SWD/JTAG side.
Some of the older SEGGER/J-LINK provided 5V via pin 19 of the standard 0.1" pitch 20-pin connector
You still haven't explained where this "TVAPP" designation is coming from, it's not usual nomenclature.
Can you show a picture of the ST-LINK unit that you are using?
Levels for NRST / VCAP seem as expected, and suggest orientation is good.
2024-07-19 05:49 PM
I believe the programmer shouldn’t be, but I have 2 that do and that’s why I’m here asking for help to figure out why. It’s a mind bender.
In my first reply I explained that the TVAPP I referred to is the VDD pin #1 of the jtag connector on the diagram I uploaded earlier.
The programmers are both brand new STLINK-V3SET units and were both ordered separately less than 3 weeks ago from Digikey and Farnell.
Ribbon cables used are the ones provided in the programmer box. One of them currently has the red wire cut in the middle.
2024-07-19 06:05 PM
>>I believe the programmer shouldn’t be, but I have 2 that do and that’s why I’m here asking for help to figure out why. It’s a mind bender.
Any other 5V signals on your board headers, or the wiring back to the ST-LINK?
I ask for a picture to help contextualize this, it shouldn't have to be a mind-bender or a riddle, there's some rational explanation for this, but I've got no visibility into the problem.
Farnell should be sell legitimate product, you have a consistent situation as both "do" this, but it's not consistent with my experience with these parts.
The ST-LINK does not negotiate voltages, your other working board doesn't do this, so it's something with your new board and wiring.
2024-07-19 07:12 PM
> What I found a little surprising with the H7 design, which seems to work of course, is that with the VDD pin at 0v and even the VDD wire physically cut, the programmer sees the MCU and connects to the Cube software and programs.
This is interesting. The MCU can't be programmed without power, we can surely all agree on that, yes? So if pin 1 on the board-side has 0 V, it's either not hooked up to MCU power, or something else is happening.
> In my first reply I explained that the TVAPP I referred to is the VDD pin #1 of the jtag connector on the diagram I uploaded earlier.
Okay, so you have developed a custom board which is analogous to the H7 Portenta plus the Ethernet shield and you're using a JTAG port analogous to the port on said ethernet shield.
The ethernet shield "+3V3" line isn't tied directly to the MCU voltage. So that explains why it can be zero and still get programmed.
On your custom board, in which you've severed pin 1 on the cable, the pin is still not powered by the programmer. Logically, there must be some other difference in hardware, yes? How is your hardware powered while programming? What voltage is the H7 chip and VCAP caps at?
To your question of how does voltage sensing on the programmer work: On some programmers, the pin 1 (T_VCC) voltage is used by a level shifter to change the logic level of the signals. On the V3SET (without the logic shifter board), it is not used in this manner and the logic level stays at 3.3 V. The T_VCC voltage is just relayed to STM32CubeProgrammer to display. Otherwise it has no functionality and is not needed by the programmer (as evidenced by it still working while at 0V).
If your V3SET programmer really is putting +5V on pin 1, either the programmer is damaged, or perhaps the measurement is faulty. The programmer just doesn't work that way.
2024-07-19 07:15 PM
Sorry, I think we try to help you (still) even you fire comments like "I said this already a few times, is this still not clear?" against us. Thank you.
You have mentioned this:
"My board has nothing whatsoever on VDD pin #1"
Do you have TARGET_VDD on pin 1 or not?
When do you say "H7" and mention a PMIC - are you referring to a Portenta H7 board?
(which provides power as pin 1 for VDD just after bootloader/FW has configured PMIC)
If you have a PMIC on board:
Try to run debugger in "connect in low power mode", in "connect under reset" etc.
Again: if you have any VDD, e.g. for MCU alive on board, and you are sure the MCU is powered (and out of reset): just use a jumper wire and provide VDD on pin 1: grab it from the same VDD used on MCU (so that MCU can boot, even PMIC no configured yet, the VDD which powers MCU for boot).
Or: even provide 3V3 (as target VDD) from something else, e.g. your external 5V for main power input (with a resistor divider).
I am still convinced: your JTAG adapter to programmer does not see a VDD on pin 1.
Do you reference to a NUCLEO-H7 board (e.g. the NUCLEO-H743ZI2)?
I did a measurement: pin 1: it is 3V3 (and it has to be T_VCC as such 3V3 or 3V1).
But:
See in schematics that pin 1 is not pin 1: the MIPI connector is soldered with an offset and "real" pin 1 is not connected.
Show us your schematics.
Have you tried with a patch wire to bring target VDD to pin 1?