This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am3358 pru - Reading Pin at 3 MHz, setting a timer interrupt

Part Number: PRU-SWPKG
Other Parts Discussed in Thread: AM3358


I'm developing a firmware for the PRUs of am3358 from Sitara SoC. I'm using the Beagle Bone Black with a JTAG-Header, Code Composer Studio v10 and the PRUC-Compiler 2.3.3. I'm debugging bare-metal, without linux running, with the XDS110 Debug-Probe. 

I need to read a GPI-Pin with a frequency of 3 MHz and do another operations in the meantime - what is the best way to do this? 

Is there a possibility to set up a timer-interrupt (as known form ARM-Processors) that will fire up when the Timer Counter is bigger than Compare Value (I thought about using the IEP-Timer for this), interrupt other operations if needed and start an interrupt handler? Or is there some other way to handle this?

I also looked at the example for the IEP-Timer from the pru support package (PRU_IEP.c). When I run this code it got stuck in the while-loop (line 79) - I concluded, that the interrupt was not forwarded from INTC to the Bit 31 of R31. I enabled the Host0, system interrupt number 7 and global host interrupt (in HIER, ESR0 and GER register), but it still didn't work. Could you help me getting it to run?

Thank you in advance for your help,