PRU interrupt program


I am trying to configure a low latency interrupt to detect change in GPIO input pin i.e. input to Beagle Bone AI changes from 0 ->1 or 1-> 0 , it should generate an interrupt. I want to do this preferably in PRU by implementing an ISR .

Do you have an example code?


Everything I've read indicates that the PRUs do not have true
interrupts. One writes a polling loop looking for a change of state.

  There does appear to be a way for the PRU to interrupt the ARM (after
the polling loop detects the state change), however...
{I don't like that example -- they are writing to memory /after/ generating
the interrupt signal; if the ARM response is fast enough, it could be
reading that memory before the PRU writes to it!}

  All the other mentions of "interrupt" on the PRU contain the phrase