Hello Andreas :-)

On Thu, Jun 9, 2011 at 11:30 PM, Andreas Fritiofson
<[email protected]> wrote:
>> I have created simple quit() that sets all port pins high and as input
>> (mpsse command 0x80 0x82) but that did not shut down the yellow led
>> :-(
>
> Since the suitable setting depends on the mapping of the GPIOs and the
> surrounding electronics, the quit function would probably need to be layout
> specific, as Laurent mentioned.

I think setting all pint as input create Hi-Z for them, so his is the
safest choice and _should_ produce situation as if the interface was
not connected at all... unless interface use some buggy buffer
construction where high impedance would cause output to be active. I
thought that was what Laurent mentioned... it sounds sensible, but
maybe I did some error somewhere...


> What problem is setting pins to a default state on exit supposed to
> solve? Are we sure this is what we want? If I make openocd pull the reset
> line and then quit openocd, I'd expect the target to remain in reset. If I
> quit openocd while the target is running, I'd expect it to keep on running.
> How would that work if we make this change?

This is good question and we should standardize this behavior to one
options as you mentioned - interface remains in its last state it was
on quit() or interface switches to a state that makes it invisible to
the target. I think the second choice is more secure, as it may happen
that openocd/program crash will cause environment left in a harmful
state for a longer period of time. In that case launching openocd will
activate interface's electrical connection to the target and
disconnect them on quit.

Best regards! :-)
Tomek


-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to