I am reading an ADC that signals when the data conversion is complete by setting the SPI MISO pin low. I would like to set an interrupt on that pin, but using the GPIO library to do so isn't working. If I try to simply attach an interrput using GPIO.add_event_detect, I get the error than the GPIO pin has not be set to an input. If I try setting it as an input, then attach hardware SPI (spi = spidev.SpiDev()
) I don't seem to be getting the interrupt.
Does anyone have a good solution for attaching an interrupt on the MISO pin without interfering with the SPI?
libgpiod
, but have you tried one of thelibgpiod
"tools"; i.e.gpiomon
? There's aman
page for it - it sucks much like the rest oflibgpiod
, but it's the "way ahead" according to RPi pundits. You might have better luck withpinctrl
- a RPi "product" written to fill the gap left by the brain-dead libgpiod. Sorry I can't help more - I've not done any interrupt handling on an RPi.