On 11/29/2015 06:54 PM, Jeppe Johansen wrote:
Don't use noreturn. It signals to the compiler that your function will
not return (i.e. do an infinite loop).
Ok, this is good to know.
Use the interrupt directive for interrupt handlers. That makes them
emit the iret instruction instead of ret t
On 11/29/2015 11:35 PM, Andrew Haines wrote:
On 11/29/2015 02:13 PM, Jeppe Johansen wrote:
Not sure the timer initialization is right, but it looks ok.
One thing you need is the interrupt procedure directive:
procedure TIMER0_overflow; interrupt; public name 'TIMER0_COMPA_ISR';
Otherwise it'l
On 11/29/2015 02:13 PM, Jeppe Johansen wrote:
Not sure the timer initialization is right, but it looks ok.
One thing you need is the interrupt procedure directive:
procedure TIMER0_overflow; interrupt; public name 'TIMER0_COMPA_ISR';
Otherwise it'll probably reset at some point.
Ok I got it
On 11/29/2015 02:13 PM, Jeppe Johansen wrote:
Not sure the timer initialization is right, but it looks ok.
One thing you need is the interrupt procedure directive:
procedure TIMER0_overflow; interrupt; public name 'TIMER0_COMPA_ISR';
Otherwise it'll probably reset at some point.
What compiler
Not sure the timer initialization is right, but it looks ok.
One thing you need is the interrupt procedure directive:
procedure TIMER0_overflow; interrupt; public name 'TIMER0_COMPA_ISR';
Otherwise it'll probably reset at some point.
What compiler commandline are you using?
Best Regards,
Jepp
Hi, I am experimenting with the avr embedded compiler from trunk and am
trying to set an interrupt. I am not sure how to do it. The interrupt I
want to change is TIMER0_COMPA_ISR.
I see in the startup code there is:
.weak TIMER0_COMPA_ISR
and later there is:
.set TIMER0_COMPA_ISR, Default_IRQ