On Wed, Sep 26, 2012 at 11:42 PM, Peter Stuge <[email protected]> wrote: > Andreas Fritiofson wrote: >> When no -oe (or -noe) is specified, the only valid setting for >> reset_config is push-pull, otherwise it will error out when releasing >> reset. > > Could it error out when setting reset_config instead?
Unfortunately, no. The adapter driver may not even be initialized when reset_config is issued and even if it is, there's no provision for examining the reset capabilities without actually fiddling with the reset lines. And the adapter driver isn't notified when reset_config is altered so it can't give the message either. > >> Similarly, without -data (or -ndata), only open-drain reset can >> be used. > > Same here. Error on invalid combinations. > > Or better yet; simply force the only valid combination, as deduced > from IO configuration. I would prefer that very much. But that's the effect the following idea would have. >> I've been thinking to add a signal level specifier to select >> hi-z OR drive high, whichever is available, and use that to deassert >> reset, in order to be more forgiving for reset_config settings that >> doesn't match actual adapter capabilities. > > I would rather give an error message when an invalid reset_config is > requested. > It doesn't need to be a new level specifier, even though that could be convenient for manual signal manipulation. The ftdi driver could also try the reset_config type first and if it fails, fallback to the other type. That is to say: Honor the reset_config if you can do both types, otherwise disregard reset_config and reset the only way you can. /Andreas ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
