stk500.c: Fixed fosc behaviour for values exceeding maximum frequency (contributed by Galen Seitz)
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@422 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
66ce0f3cf4
commit
fc0d98fc3e
|
@ -1,3 +1,7 @@
|
|||
2004-07-04 Jan-Hinnerk Reichert <hinni@despammed.com>
|
||||
* stk500.c: Fixed fosc behaviour for values exceeding
|
||||
maximum frequency (contributed by Galen Seitz)
|
||||
|
||||
2004-07-04 Jan-Hinnerk Reichert <hinni@despammed.com>
|
||||
* avrdude.conf.in: Added support for
|
||||
ATtiny2313 (contributed by Bob Paddock)
|
||||
|
|
2
stk500.c
2
stk500.c
|
@ -919,7 +919,7 @@ static int stk500_set_fosc(PROGRAMMER * pgm, double v)
|
|||
if (fosc >= fbase / (256 * ps[idx] * 2)) {
|
||||
/* this prescaler value can handle our frequency */
|
||||
prescale = idx + 1;
|
||||
cmatch = (unsigned)(fbase / (2 * v * ps[idx]));
|
||||
cmatch = (unsigned)(fbase / (2 * fosc * ps[idx])) - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue