[En-Nut-Discussion] Timer and "timerres" - how to use?

Mathias Seger matse650 at student.liu.se
Wed Mar 24 23:59:03 CET 2004


Hi,

I downloaded "timerres" (timer.c) by Ralph Mason from ethernut.de/en/projects. My question is how do I "use it" ?
I tried to switch this with os/timer.c and changed NUT_CPU_FREQ in MAKEDEFS after compiling OS. Is this the correct use?

Compared to the original .c-file there are no NutGetMillis() and NutGetSeconds() which are used in for example TCP- and UDP-programming. (I tried to put in these from the original file and then got it to compile after some changes).

My goal is to use timered events every 20ms with 
'timer1=NutTimerStart(20, TimerCallback, &SendUDP, 0); ' (where SendUDP is the HANDLE to the event), but going under 63ms - as usual makes the program stop! = The timer doesn't work properly. Where is the error? (It works correctly above 63ms).

Are there a better solution?

I use latest Nut/OS 342 and an ATmega128 CPU.
 
Thankful for help,

Mathias Seger




More information about the En-Nut-Discussion mailing list