I learned, that SPI-code uses interrupts. So is it true then, that I can't use SPI related code inside an ISR?
Background: I want to capture one or more revolution speeds with an MCP23S17. I rewired the interrupt lines to INT1 and INT2 accordingly to get the interrupts at the Arduino.
I thought it was good to fetch the port registers from the MCP23S17 inside the ISR, but this apparently doesn't work.
Is the only thing I can do in my ISR set a flag for another test in the main loop? And let a routine called from lood() then poll the registers from the port expander? This opposes the idea to fetch the relevant data which issued the interrupt ASAP.
SPI.transfer()
. I learned, that SPI-code uses interrupts. - where did you learn that? – Nick Gammon♦ Aug 20 '15 at 10:23apparently doesn't work.
- I hate that expression. What happened? What did you expect to happen? In what way did they differ? – Nick Gammon♦ Aug 20 '15 at 10:25