[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] AVR simulator and interrupts
From: |
James Fitzsimons |
Subject: |
Re: [avr-gcc-list] AVR simulator and interrupts |
Date: |
Wed, 14 Jul 2004 22:56:36 +0100 |
Hi Klaus,
Thanks for your reply.
On Wed, 2004-07-14 at 20:17, Klaus Rudolph wrote:
> You must set the irq flag, please insert a
> asm("sei");
> somewhere after initialisation your timer to enable the cpu executing
> the irq handler.
Yes, I realise it was a bit of a stupid mistake, but I am brand new to
the AVR and still have much to learn! ;-)
> You will see (trace below) the following (maybe a bit differnt because
> you have not
> the same version of the simulator)
> As you can see at time 10500 to 11000 there is the value named flag read
> from 0x0060 into register, inverted
> and wrote back to 0x0060. Thats all and it looks that the irq works as
> it should.
Just tried this a little while ago and it all works exactly as you said.
I hadn't been using the trace functionality so it was good to try this.
Do interrupts work with gdb and DDD as well?
After putting the sei() in immediately before I start the timer I now
get a hang in DDD/gdb as I step into the for loop...
The following appears in the gdb command window of DDD:
(gdb) next
(gdb) next
0x0000000e in __vectors ()
(gdb) next
Single stepping until exit from function __vectors,
which has no line number information.
Any ideas?
Thanks again for your help,
James Fitzsimons