[En-Nut-Discussion] NutMicroDelay for AVR fails on small values
bon at elektron.ikp.physik.tu-darmstadt.de
Mon May 20 11:47:45 CEST 2013
>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:
Harald> Hi, I tried NutMicroDelay on a 16MHz ATmega128. While
Harald> NutMicroDelay(100) seems to work well, NutMicroDelay(10) creates
Harald> a much larger delay.
Harald> Uwe, from the history I can see that you did the latest fixes
Harald> here. If your time allows, may be you can check this.
Harald> avr-libc is 1.6.7, but I think I a saw similar problem with
Harald> 1.7.0 too.
is NUT_CPU_FREQ defined in you case? Maybe your
code hits the 32 bit division and that division causes a great offset?
Otherwise, it is not clear to me in what direction to optimize? There may be
code that will do good on slort delays and bad on long delay, code that will
do the other way round and much more compilcate code that does better in
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
More information about the En-Nut-Discussion