On Wednesday, August 25, 2010 02:43:59 Frans Meulenbroeks wrote:
> Probably the best way to measure the max frequency is by toggling a
> gpio pin as fast as possible for a substantial time and determine the
> frequency.

i meant we should treat the frequency specified as the max allowed.  if the 
host PC cant actually meet that timing, well nothing urjtag can do about it.  
but it certainly can keep from going too fast for a device to keep up.

> If the freq of the device is lower than this (so we're going too fast)
> we could decide to emit a warning or error as the bare minimum.

it isnt really in the realm of urjtag to try and figure out why communication 
isnt working.  that is left to the monkey typing at the console.

> Another source of dismay could be the io pins themselves. E.g. even
> while thinking that you drive them at a 1-1 duty cycle it could be
> that e.g. some capacitance in the system makes that this cycle is
> deformed potentially making the pulses or gaps too small.

right, which is why we'd want to treat the frequency as a ceiling not to be 
exceeded.  as for the "right" frequency for a particular board, that too is up 
to the user to determine.

> As a workaround gpio_set_value could contain a small macro which
> evaluates to a while loop that introduces a fixed amound of delay
> (controlled by a #define in the file). At least then someone can
> easily add additional delay if the freq is too high. (especially
> combined with the warning as mentioned before).

we have the "delay" mech already in place -- the frequency field of the cable.  
from that, we can easily calculate the min delay between pulses and leverage 
nanosleep() to fill the gaps if we go too fast.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to