simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] irq handling is broken in simulavr


From: Klaus Rudolph
Subject: [Simulavr-devel] irq handling is broken in simulavr
Date: Thu, 24 Jan 2013 19:26:23 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi all,

yesterday I did one real apllication example on simulavr and it runs
totally instable on it but works on a real device.

After a few hours I found out that the irq handling is broken.

What I expect:

If a irq comes up the core runs exactly one more instruction before
changing the pc to jump to the irq vector.

This was already implemented in my early versions, but someone wrote the
AvrDevice::Step method new and brake the irq behavior. :-(

0100:    nop
--- now a hardware irq comes up ----
0102:    nop     ; one more instruction runs on core
0014:    jmp 0x2000 ; vetcor xx jump

actually the implementation only works correct, if the instruction
before the irq is a sei() :-) I have no idea why this was implemented
this way.


QUESTION:

If I have the wrong idea to the avr core behavior please give me a hint
to the correct one!

I will now start working on a hot fix for the topic. If there is no
other advice I will commit after I finished the fix.

In hope that the actually broken implementation is the problem and not
my idea of avr and the gcc generated code :-)

Regards
 Klaus




reply via email to

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