From: Laurent G. <lau...@am...> - 2010-03-24 17:28:48
|
David Brownell wrote: > On Wednesday 24 March 2010, Laurent Gauch wrote: > >> ... why not jtag_khz as before or something more specific ? >> > > You can still call jtag_khz, though it'll be inappropriate for SWD. > (And will eventually go away.) > > We really don't want to need JTAG and SWD versions of every config > script and event handler based on what transport is in use... > We do not need to write specific scipt versions for JTAG or SWD serial port, but we will have to give in the target script what is the maximum specific frequency of each serial port : 'target_jtag_max_tck_frequency_khz' 'target_swd_max_tck_frequency_khz' or removing TCK 'target_jtag_max_frequency_khz' 'target_swd_max_frequency_khz' then 'target_spi_max_frequency_khz' 'target_i2c_max_frequency_khz' Electrically, the JTAG serial port as a SPI serial port will ever have a faster frequency capability than SWD, since the JTAG has all signals as unidirectional, but the SWD play with bidirectional signal (push-pull mode), the I2C play with bidirectional signal too (open-drain mode) ... with adapter_khz only, we will not be able to specify a JTAG frequency faster than SWD frequency, and what about we will have I2C protocol ... For I, it make sense to specify the Max Frequency for each different serial port protocol (or parallel protocol TRACE) in the target script. > > >> The adapter_khz is confusing to end-users of OpenOCD. >> >> When we will coming with the SWO we will have to specifiy a SWO >> frequency (baudrate) too. >> > > Kicking in SWO trace will need to specify a few other things too, > so having another clock setting won't hurt. When a UART is used > to collect the SWO data, it's not likely to go at the same clock > rate as SWD... > > >> adapter_khz is really bad since at long term we do not know which >> frequency we are talking about. >> >> I vote for coming back with a jtag_khz or better jtag_tck_frequency_khz. >> > > So you really do NOT want to see target config files that work correctly > regardless of whether they're used with JTAG -or- SWD?? > Yes I want to see same target config file for all serial protocol, and I am sure we will have. But what I really want is target config file more robust and understandable. But, for me, the adapter_khz is really not the good way to have robust I just want to have in the target file the possibility to have something like : target_jtag_max_frequency_khz 40000 target_swd_max_frequency_khz 12000 target_spi_max_frequency_khz 50000 target_i2c_max_frequency_khz 480 This is not possible with your only adapter_khz target_xxxx_max_frequency_khz is will be a robust notation and understandable for end-user writing target script. > THat makes no sense to me. I should be able to switch to some other > debug adapter -- maybe SWD-only, or JTAG-only -- without rewriting any > part of the target config file. > > That means minimizing the number of commands that are JTAG-specific. > (or SWD-specific.) > > I vote for something like target_jtag_max_frequency_khz 40000 target_swd_max_frequency_khz 12000 target_i2c_max_frequency_khz 480 Do you too now ? Regards, Laurent http://www.amontec.com |