IRQ and procedure

How to start procedure from IRQ

Jest
 
Avatar
 
Betreff:

IRQ and procedure

 · 
Gepostet: 21.09.2010 - 12:46 Uhr  ·  #1
Hello,

I have situation with xMega, when there is interrupt on one of input pins and then I should start procedure - almost immediately. If the procedure is called in interrupt routine, it is not OK – system hangs from time to time. Setting flag and then checking this flag in main loop is not OK – I never knows when the procedure will be started. Now, I am lost. :(

Is there any other method to do this? And I don’t want to import multitasking.
What if I still run procedure from interrupt routine, what should be the stack? Frame? Any other settings?

Tnx for help,
Andrej
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: IRQ and procedure

 · 
Gepostet: 21.09.2010 - 13:46 Uhr  ·  #2
Hello Andrej,

it seems that you accidently destroy some registers in your interrupt service. To avoid this use complete register saving for interrupts or manually save the used registers by PUSHs and POPs.

rolf
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   50   64 · Page-Gen-Time: 0.028438s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI