On Sat, 31 Mar 2012 00:52:14 +0900 Samir Ibradžić sibradzic@gmail.com wrote:
On 2012年03月07日 00:25, Stefan Tauner wrote:
On Tue, 28 Feb 2012 11:50:37 +0900 Samir Ibradžićsibradzic@gmail.com wrote:
But i vote for supporting specific divider after all, one can never know if there is some obscure device out there in the wild that supports only 6365372Hz.
well we could support both actually... selecting the divider as in our patch, or alternatively the frequency (if it is not possible print the next lower available one)...
anyway this can be done later and i'd like to get this into svn now-ish rather than wait for the perfect patch. you do not happen to own a logic analyzer that could confirm that the frequency now is really what we think it is, do you?
Sorry, no analyzer available here. I can confirm though, that when using bigger dividers, data transfer speeds achieved matches the calculated frequencies, at least on the device i have here (PicoTAP).
by "matches" you mean that e.g. doubling the divisor approximately doubles the time needed for an read/erase/write, right?
in any case could you please test the patch i have sent so that we know it does not break the programmer completely?
Already tested, seems ok. Anyway, we just need to be careful that the patch has zero consequences when "spispeed" option is not used at all.
thanks for testing. yes (though i think you meant divisor not spispeed?), altough zero consequences need to be specified more precisely: the previous code set divisor 2 by sending 0 to the device. our new code does the same by setting DEFAULT_DIVISOR to 2 and doing the math right. so from the programmers point of view the communication should be equal.
if you like to work on a followup patch please use "spispeed" as the parameter for the frequency because that is the one used in serprog and the buspirate already.
Do you have any updates, or i can re-base on top of your previous patch?
no updates yet, but i will change this bit because it does seem like a typo: * Hence the expressible divisors are all even numbers between 2 and - * 2^17 (=131072) resulting in SCK frequencies of 2 MHz down to about + * 2^17 (=131072) resulting in SCK frequencies of 6 MHz down to about * 92 Hz for 12 MHz inputs. */
it would be nice if someone could really verify the correct frequencies on the output pins, but if no one will do that in the next days/weeks, i will commit it anyway.