[En-Nut-Discussion] Overflow in At91GetPllClock()
Harald Kipp
harald.kipp at egnite.de
Mon Sep 11 11:14:53 CEST 2006
Many thanks, Ben. However, this had been fixed already in CVS using
the same hack.
http://ethernut.cvs.sourceforge.net/ethernut/nut/ChangeLog?revision=1.354
Harald
At 15:55 11.09.2006 +1200, you wrote:
>But At91GetPllClock() tries to calculate 18,432,000*250, which is
>4,608,000,000 -- a nice 32-bit overflow which mucks up the timing. I've
>fixed it by dividing the master clock frequency by 1000 beforehand, then
>multiplying by 1000 afterwards ... probably not the ideal fix, but here it
>is (from ostimer_at91.c):
More information about the En-Nut-Discussion
mailing list