PRU interrupt program

Hello,

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?

Regards,
Jayasudhaa

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...
https://processors.wiki.ti.com/index.php/PRU_Linux-based_Example_Code#PRU_PRUtoARM_Interrupt
https://git.ti.com/cgit/pru-software-support-package/pru-software-support-package/tree/examples/am335x
{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
"polling".

https://git.ti.com/cgit/pru-software-support-package/pru-software-support-package/tree/examples/am335x/PRU_ARMtoPRU_Interrupt/PRU_ARMtoPRU_Interrupt.c