Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 12:49, Paul Fertser wrote: Here's a log with 2596 applied with "reset init": It looks fine, and if you didn't have reset init there, you'd be able to call mdm mass_erase I think. If mdm check_security worked (and it did, judging by the message), so should mdm mass_erase too. and wi

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Paul Fertser
On Fri, Mar 13, 2015 at 10:32:10AM +, Chris Fryer wrote: > The "reset init" is in my openocd.cfg script. It's been there since I first > started using oocd in 2013. I've tried taking it out (see below. should I > replace it with just reset? or nothing at all?). I do not think for a normal usec

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 09:48, Paul Fertser wrote: > On Fri, Mar 13, 2015 at 09:36:35AM +, Chris Fryer wrote: >> This is a log of attempting to connect to a secured part: > Is that with 2596 applied? Where does "reset init" come from? I think > it might be one of the reasons mdm mass erase doesn't work. >

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Paul Fertser
On Fri, Mar 13, 2015 at 09:36:35AM +, Chris Fryer wrote: > This is a log of attempting to connect to a secured part: Is that with 2596 applied? Where does "reset init" come from? I think it might be one of the reasons mdm mass erase doesn't work. -- Be free, use free (http://www.gnu.org/phil

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 08:30, Paul Fertser wrote: > On Fri, Mar 13, 2015 at 08:24:04AM +, Chris Fryer wrote: >> >> I would add that connecting to factory blank K1x devices (whilst in >> their initial COP reset loop) is seriously temperamental and connecting >> to secured K1x parts doesn't work at all. >>

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Paul Fertser
On Fri, Mar 13, 2015 at 08:24:04AM +, Chris Fryer wrote: > On 13/03/15 07:30, Tomas Vanek wrote: > > I don't think that robust reset is needed only for PSoC4 and SAM4L. > > E.g. Kinetis K2x sometimes needs numerous reset before OpenOCD regains > > control. > I would add that connecting to facto

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Chris Fryer
On 13/03/15 07:30, Tomas Vanek wrote: > I don't think that robust reset is needed only for PSoC4 and SAM4L. > E.g. Kinetis K2x sometimes needs numerous reset before OpenOCD regains > control. I would add that connecting to factory blank K1x devices (whilst in their initial COP reset loop) is serio

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Tomas Vanek
On 13.3.2015 8:00, Paul Fertser wrote: > I do not have access to problematic boards at all. And I'm not sure > why, but when I'm trying to fix issues like that, it always takes > several iterations to get it right. Your testing and feedback helped > me a lot already. I do not know in advance how

Re: [OpenOCD-devel] reset robustness

2015-03-13 Thread Paul Fertser
Hey Tomas, On Fri, Mar 13, 2015 at 07:37:00AM +0100, Tomas Vanek wrote: > So poll is off and ordinary user retries reset. > Now reset fails and keeps failing just because target is not examined. I was thinking about the issues and came to about the same conclusions. Reset should just try resettin

[OpenOCD-devel] reset robustness

2015-03-12 Thread Tomas Vanek
Hi Paul and others I finally understand why OpenOCD is so prone to lock in target-cannot-be-reset state. Polling is off during reset processing. Let say DP initialization fails for whatever reason. Reset process fails leaving poll off and target in not examined state. Poll is able to resolve m