[En-Nut-Discussion] Timer1, AT90CAN128 & NutOS

Henrik Maier hmnews at proconx.com
Wed Jan 21 08:55:49 CET 2009


> From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-
> bounces at egnite.de] On Behalf Of jaripetteri
> 
> Can anyone check/comment is this totally wrong approach for native
> interrupt
> on CAN128 NutOS combination?
> 
> > ISR Timer1 Overflow routine:
> >
> > ISR(TIMER1_OVF_vect)
> > {
> >   if(counter_500ms == 0)
> >   {
> >      pass_500ms = 1;
> >      counter_500ms = 61;
> >   }
> >   counter_500ms--;
> > }
> >

With Nut/OS you should use NutRegisterIrqHandler() to configure the
interrupt handler and not the ISR macro.

Henrik





More information about the En-Nut-Discussion mailing list