openocd-development-boun...@lists.berlios.de wrote on 2009-09-04 11:45:13: > Jonas Horberg wrote: > >> The attached patch add the khz and speed_div functions to > >> the parport interface driver. > >> > >> This enables the jtag_khz command for parport interfaces. > >> > >> The patch also adds a command named parport_toggling_time > >> that tells the parport driver how long (in nanoseconds) it > >> takes for the hardware to toggle RTCK. The khz and speed_div > >> functions needs this data. The default value is set to > >> 1000 ns, perhaps it exist a better typical value. My PC > >> have a 1.37 us toggle time. > >> > > > > Comments? > > > > Configuration scripts with jtag_khz or jtag_rclk fails if these > > commands are unsupported. > > jtag_speed works just as before. > > > It seems we do need this, however, the implementation seems wrong. > > First, I do not see how RTCK comes into play - AFAIK, the parport > interface does not support RTCK, so only TCK frequency should be > relevant for jtag_khz.
Sorry, the patch have nothing to do with RTCK, all references to RTCK should be TCK. A corrected patch is included. > Second, using arbitrary timing values that are measured on one system > seems doubly wrong. If we need a specified clock, we need to make sure > that the code really produces that clock speed (at most), so the could > should auto-adapt to the port timing on the machine it runs on (note > that we also do not want overly pessimistic timings - clocking slower > than requested degrades performance). The intention is that the user measures the correct value for his/her system and use the added parport_toggling_time command. The jtag_khz and the jtag_rclk should perhaps fail if the configuration script lacks a call to this command. 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 can easily change the patch to use automatic toggle time detection if this exist. > cu > Michael Best regards Jonas Hörberg
parport_khz_and_speed_div.patch
Description: Binary data
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development