Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
David Prentice
01/17/12 10:25
Read: 399 times
Wormshill
England


 
#185539 - You will not lose anything.
Responding to: Shankara Rao's previous message
Shankara Rao said:
I am using atmel microcontroller 89LP4052. In this the UART and the SPI share the same interrupt.

1. Will I loose a SPI interrupt if the interrupt occurs during the execution of the interrupt service routine for UART.

No. SPIF gets set and the IRQ will fire again.


2. Will I loose aa UART interrupt if the interrupt occurs during the execution of the interrupt service routine for SPI.

No. RI or TI gets set and the IRQ will fire again.


3. Can I nest the interrupts to check for SPI interrupt inside the ISR of UART and vice versa.

I see little point. Any respectable ISR() is very short anyway.
If you are paranoid, simply test RI, TI, SPIF, RI, TI, SPIF in each ISR().

Personally, I think it crazy that they share the same IRQ, There is plenty of space to have another vector.

David.

List of 4 messages in thread
TopicAuthorDate
Shared interrupts.      Shankara Rao      01/17/12 10:10      
   what you think does not cause interrupts      Erik Malund      01/17/12 10:21      
   You will not lose anything.      David Prentice      01/17/12 10:25      
      no surprise      Erik Malund      01/17/12 10:46      

Back to Subject List