Connection under reset on ST-LINK doesn't work-NRST invert?

Open source ARM Debugger

Moderator: phalanx

Connection under reset on ST-LINK doesn't work-NRST invert?

Postby RayeR » Mon Mar 06, 2017 10:19 am

Hi,
I use ST-LINK (the FW updated to the latest ver. V2J27M15) from nucleo board for programming an external target with STM32F030C6T6 MCU via CN4 (VDD, SWDCLK, GND, SWDIO, NRST are connected to the target). In case if I reconfigure GPIO used by SWD by a mistake I need to use "Connection Under Reset" option in ST-Link Windows utility to be able to connect. It works fine. But I'd like to do the same with OpenOCD (0.10.0-00113-g0f83948 24.1.2017). When SWD GPIOs are not reconfigued then OpenOCD works fine. But I cannot reproduce "Connection Under Reset" behavior. I tried many reset_config options, e.g. reset_config srst_only srst_nogate connect_assert_srst that I had found on this forum but nothing works. I hooked the scope to ST-LINK and watch what's going on. If connect_assert_srst then it starts to control NRST pin but it seems the signal is inverted! And I cannot find any OpenOCD option how to invert it back to desired level (normal level should be 1, active 0).

So let's see, here's the scope of how ST-Link utility is doing "Connection Under Reset":
Image

And here's how OpenOCD do it with reset_config srst_only srst_nogate connect_assert_srst
Image

Could it be an OpenOCD bug? Or did I miss something?
BTW I also found that delays options like adapter_nsrst_delay doesn't change the waveform when different values used.
RayeR
 
Posts: 2
Joined: Mon Mar 06, 2017 9:26 am

Re: Connection under reset on ST-LINK doesn't work-NRST inve

Postby RayeR » Tue Mar 07, 2017 8:10 am

Aha, it was problem i my config. It works fine now :)
https://sourceforge.net/p/openocd/tickets/146/
RayeR
 
Posts: 2
Joined: Mon Mar 06, 2017 9:26 am


Return to OpenOCD

Who is online

Users browsing this forum: No registered users and 2 guests