Hello Andreas :-)

On Thu, Jun 9, 2011 at 11:30 PM, Andreas Fritiofson
<andreas.fritiofson at gmail.com 
<https://lists.berlios.de/mailman/listinfo/openocd-development>> 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...
That's make the openocd inter-session more robust.
I have mentioned this trouble from a long time (4-5months ago). The sebastien patch 1..5/5 resolve all of this.

>/ 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.

I think there are no standardization, The only to do is to put the DEBUG JTAG SWD ... in High-Z !

Best regards! :-)
Tomek
Regards,
Laurent
http://www.amontec.com


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to