Forum Discussion
Altera_Forum
Honored Contributor
14 years agoInterrupt Driven SPI
I am having trouble configuring the SPI to create interrupts. I am calling the function below inside a key press interrupt(that works) to start an SPI transfer. My initialization, and following routi...
Altera_Forum
Honored Contributor
14 years agoYou should try first not to enable the interrupt and regularly check the ready bit on the status register, just to be sure an interrupt would be triggered by the SPI component.
Then I don't think it is recommended to call printf() within an ISR, as it can use interrupts itself when talking to the hardware. You should either use another debugging method (such as LEDs) or compile with the small C library which doesn't use interrupts in I/O IIRC.