David Brownell <davi...@pacbell.net> wrote on 2009-09-04 17:17:14:

> On Friday 04 September 2009, Jonas Horberg wrote:
> > Automatic detection of the toogle speed is of course the next step.
> > Do we have something platform independent that can measure
> > with the required precision?

I did some research and found that timers with the required precision
is not commonly available. This is an dead end.

> Presumably:  measure the time to toggle some bit a few thousand
> times.  But that's subject to interference from the scheduler.

I think that the scheduler, but also the interrupt handling to a
lesser degree, will have a too large effect on the timing.
Remember, we actually want to set the minimum time that elapse
between TCK transitions. We will only get an average value and
it is impossible to extract the shortest time from it. We have to
put in a large safety margin and the speed will in most cases be
much lower than requested.

It is perhaps possible to detect when OpenOCD is scheduled out
(jump of the timer?) so we only have to deal with the overhead of
the interrupt handling. The required safety margin will be lower
in this case.
 
> I'd avoid measuring it every time, and log the number when it's
> computed.  But isn't 1 MHz top speed fairly standard for PC
> parport hardware and toggle performance?

I have mostly seen data about that is should be around 1 MHz.
It was dependant on the ISA bus speed in older PC:s. The speed can
not deviate to much for newer PC:s because of backward compatibility
reasons.
The detection could be simplified and be exact if there exist only
a few fixed speeds. However, I have not seen such data.

I will not put more work into this. I will use my patch for now
and will probably get some more USB based interfaces in the future.

Note that configuration files with jtag_khz or jtag_rclk can not be
used with the parport interfaces until a fix is created.

Best regards
Jonas Hörberg
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to