From: Michael S. <rin...@di...> - 2010-12-07 21:40:06
|
On 12/07/2010 10:39 AM, Laurent Gauch wrote: > Will be never good. A JTAG frequency is not only board specific, but > wire (cable length) dependent, buffer dependend, dongle dependent .... > Too many parameters !!! Chip, dongle, board configs could supply max values (and OpenOCD would have to select the lowest of them) - however, the user will have to select the frequency he wants to use, the config values can only limit the user's choice in case he sets a frequency that is too hight for some component. >> Having a default that works most of the time, but causes strange effects >> in some cases, is really bad useability. >> > The question is what is 'most of time' 80% 90% 99% > Fixing at a default 10KHz frequency will help user to auto-detect > their JTAG chain ... and this is REALLY ever a GOOD thing to know the > JTAG chain is auto-detected -> my JTAG Chain is working, the JTAG > transport layer is working, user are already happy ;-) I am not sure 10kHz is good. On a core where the max. JTAG frequency is cpu_clk / 6, with a 32.768kHz crystal, 10kHz is already too high. >> /Then how do you propose to implement such an auto-detection? >> > Work on 10KHz startup frequency. > READ the TAPID_old (the first TAP ID is enough) > READ the TAPID_new (the first TAP ID is enough) > WHILE TAPID_old = TAPID_new old > up/scale the frequency > TAPID_old <= TAPID_new; > READ the TAPID_new (the first TAP ID is enough) > DO > max safe frequency is TAPID_old Probably not. On cores where the JTAG frequency is limited to some fraction of the core frequency due to internal synchronization, you may get a broad area where probing works some of the times, so you would choose a frequency that fails from time to time. cu Michael |