Forum Discussion
Altera_Forum
Honored Contributor
12 years agoThank you dsl !!
--- Quote Start --- I will use interrupts on embedded systems, but only where it is necessary to process something before the current 'task' returns to the idle loop. In which case it is necessary to do all the relevant hardware accesses in the interrupt routine itself. --- Quote End --- Could you explain me a little more ?? This is my scenario: I am a SPI master and I have a SPI slave in my system. The slave keeps doing some operation and if it encounters an error it pulls up a pin to signal an error event. What I want to do is to launch an isr when this condition comes true. Then in the isr routine I read the register slave with the SPI protocol to see what error the slave had encountered and subsequently update some local variable. In alternative I must keep polling via SPI the status register of the slave but the interrupt solution seemed to me much more efficient. Any suggestion !? Thank you for help !