Author Topic: SWDIO is at 0V when the ST link is connected?  (Read 1661 times)

0 Members and 1 Guest are viewing this topic.

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
SWDIO is at 0V when the ST link is connected?
« on: November 19, 2018, 05:30:49 pm »
Hello,

I designed a custom board with stm32f767zi. Firstly, I connect power supply and all pins are correct. But after I connect st link adapter to debugger connector on board with PC and download the codes, I get 'no target connected' error and SWDIO pin is connected with GND automatically. Why is that happened? Do you have any idea?

Thanks,
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: SWDIO is at 0V when the ST link is connected?
« Reply #1 on: November 19, 2018, 05:41:48 pm »
I guess you configured the SWD-pins for other usage, so you get no connection anymore; you have to tell the programmer to pull the reset before connecting to the SWD port
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: SWDIO is at 0V when the ST link is connected?
« Reply #2 on: November 19, 2018, 07:02:23 pm »
So how should I do this? In options for target settings?
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14465
  • Country: fr
Re: SWDIO is at 0V when the ST link is connected?
« Reply #3 on: November 19, 2018, 08:00:06 pm »
So how should I do this? In options for target settings?

First thing is for it to work, you'd have to have connected the NRST pin of the programmer to the reset pin of the MCU on your board. If it's not, then you're out of luck. ;D

If it's not and you have a manual reset button, you can always try pressing it (holding the MCU in reset) while trying to connect and then release it - if it works, then you know what to do.
 

Offline mubes

  • Regular Contributor
  • *
  • Posts: 238
  • Country: gb
  • Do Not Boil
Re: SWDIO is at 0V when the ST link is connected?
« Reply #4 on: November 20, 2018, 09:17:06 am »
First thing is for it to work, you'd have to have connected the NRST pin of the programmer to the reset pin of the MCU on your board. If it's not, then you're out of luck. ;D

If it's not and you have a manual reset button, you can always try pressing it (holding the MCU in reset) while trying to connect and then release it - if it works, then you know what to do.

Well, I've not used the F7's so perhaps things have changed, but it's certainly not necessary to pull NRST from the programmer on earlier parts. SWO genuinely only needs SWCLK, SWDIO and Gnd to operate. All that's needed is to avoid hitting the code where the SWO is switched off. The easiest way to do that is to force the chip into one of the bootloader modes when it comes out of reset. Generally that is done by holding a pin high or low. Once it's in the bootloader then you can happily load new code.

This won't work if you've burned the security bits though...if you've managed to do that (extremely unlikely to have happened by accident) then you're SOL and it's unsoldering time.

DAVE
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: SWDIO is at 0V when the ST link is connected?
« Reply #5 on: November 20, 2018, 02:02:57 pm »
If you use STLink it's I guess called "connect under reset", but like already said, the NRST has to be wired up to the programmer to work out like that.
Basically it's true, that you only need SWDIO and SWCLK, but if you assign the SWD pins of the mcu as GPIO or other AFIO, then you need to use the NRST to enter the bootloader mode to newly programm the flash memory - otherwise you stay locked out
 

Offline A.ErsozTopic starter

  • Regular Contributor
  • *
  • Posts: 75
  • Country: us
Re: SWDIO is at 0V when the ST link is connected?
« Reply #6 on: November 20, 2018, 05:23:04 pm »
Thank you guys for your contributions.

Right, when I set boot0 as high and connect NRST with GND, then I can program it. After that I set again boot0 as low and NRST with GND. Now, circuit works perfectly fine.

Thanks again!
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14465
  • Country: fr
Re: SWDIO is at 0V when the ST link is connected?
« Reply #7 on: November 20, 2018, 05:29:35 pm »
That may be a sign that the MCU was not blank, as a blank MCU should not exhibit this behavior IMO. Whether the fact it wasn't blank is normal is your call, we don't know what was done with it before or where you bought it from. ;)
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: SWDIO is at 0V when the ST link is connected?
« Reply #8 on: November 20, 2018, 07:41:42 pm »
If I understand him right from the first post, this happened after downloading his code on the chip; so it was likely housemade.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf