SIGNAL <-> INTERRUPT confusion

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay im confused about what signal and interrupt scripts and how they work.
If i get an interupt while prosessing an interupt, same or different type whant hapens in the two cases that im using SIGNAL and INTERUPT? :?
At the moment im using SIGNAL which should block the new interrupt untill the old one is done and then run it. My program dosen't do that. Insted it seems to do the new interupt but then it infinit loops the old interrupt. :(
So the question realy is have i missunderstod somting or am I just a crapy programmer? :D
This is in AVRGCC and using AT2313 and the interrupts that are coliding are SIG_UART_RECV and SIG_OUTPUT_COMPARE1A

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You understood the difference between the SIGNAL and the INTERRUPT
macro very well.

I guess you're running into some other pitfall, like not clearing the
interrupt condition in the interrupt service routine, so the same
interrupt triggers oveer and over again. SIG_UART_RECV *must* read
UDR in order to clear the interrupt. The output compare interrupt
condition is automatically cleared upon executing the respective ISR.
Hmm, I wonder how they would collide.

It's probably best if you posted your code.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Didn't fall into thows pitfalls.
Going to check my program some more before i post it. And clean it up a bit... :D