avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Handling High Speed Interrupts


From: Larry Barello
Subject: RE: [avr-gcc-list] Handling High Speed Interrupts
Date: Wed, 22 Sep 2004 06:53:38 -0700

Forget the "naked" attribute: write your handler in assembly.  With only 74
cycles, at BEST you can only have 74 instructions... and likely a whole lot
less.

I have done this before: 64 average cycles/interrupt and being interrupted
every 80 cycles (200khz @ 16mhz).  It still leaves an amazing amount of
power for the high level tasking stuff.  I think I was decoding four R/C
pulse channels, and generating three channels of PWM output...  I couldn't
use hardware since the H-Bridge chips had a funny signaling scheme, plus
there simply were not enough PWM channels...


-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of Janos Sztriko
Sent: Wednesday, September 22, 2004 6:18 AM
To: address@hidden
Subject: Re: [avr-gcc-list] Handling High Speed Interrupts


Hi,

You need to use the "naked" interrupt attribute. See this links:

http://www.avr1.org/pipermail/avr-gcc-list/2002-February/001449.html
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Attributes.html

I hope this helps.

Janos

Ramkumar Rengaswamy wrote:

> Hi,
>    I have an application that needs to generate a Timer Output Compare
> Interrput every 10 uS. I have an ATMega128L clocked at 7.329 MHz. This
> means that I have 74 clock cycles to handle the interrupt routine and
> currently most of the clock cycles are wasted in pushing and popping
> things off the stack. Is there anyway in avr-gcc to avoid all this
> overhead and utilize all the cycles for my processing only ?
>
> Thanks,
> -Ram



_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]