PRU interrupt program

48 views
Skip to first unread message

t.n.jay...@gmail.com

unread,
Jul 13, 2020, 2:26:50 PM7/13/20
to BeagleBoard
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

Dennis Lee Bieber

unread,
Jul 13, 2020, 4:56:49 PM7/13/20
to Beagleboard
On Mon, 13 Jul 2020 10:32:37 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user
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
-=-=-=-
/*
* NOTE!
* This example is no longer supported. It interacts with ARM side code
* that no longer exists. It is only included as a potential reference.
*/

<SNIP>

/* Wait until receipt of interrupt on host 0 */
while ((__R31 & 0x40000000) == 0) {
}
-=-=-=-


Unfortunately, those pages also seem to be based on the UIO PRUSS
system, which I think is deprecated and RemoteProc is the "current" scheme.

http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_PRU-ICSS_PRU_ICSSG.html#getting-started-with-pru-icss


--
Dennis L Bieber

Reply all
Reply to author
Forward
0 new messages