[En-Nut-Discussion] NutMicroDelay for AVR fails on small values
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon May 20 16:52:03 CEST 2013
>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:
...
Harald> My guess is, that
Harald> _delay_loop_2(0);
Harald> results in a very long delay.
Yes, that is documented:
http://www.nongnu.org/avr-libc/user-manual/group__util__delay__basic.html#ga74a94fec42bac9f1ff31fd443d419a6a
_delay_loop_2(0) does 0x10000 loops. But also the calculation was off by
a factor of 100, resulting in 0 in most cases. I have checked into SVN a
hopefully correct version. However I have no hardware to test at hand.
Bye
--
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
mailing list