Hello,

I need to synchronize some actions on arm and pru and therefore need the 
fastest way to read the ARM cycle counter into the PRU.

I basically want to match up the PRU cycle counter and the ARM cycle 
counter. Am I right when I assume the ARM cycle counter runs exactly (PLL 
phase locked) 5 times faster than the PRU's?


So I want to catch some GPIO event (gps pps) on the PRU and tell the ARM 
core in a scale of a few nanoseconds when it occured on his time scale.

When ignoring overflowing 32 bit counters my pseudocode would be:



1) PRU waits in the initialization process to receive the ARM cycle counter 

2) Write ARM cycle counter into PRU-DRAM

3) PRU sets his own counter to this value divided by 5 (+2 for the ram read 
and register write) 

4) PRU waits for GPIO event

5) On GPIO event save own counter state, multiply by 5 and message it to ARM

6) ARM compares his cycle counter to the messaged one and knows when the 
GPIO event occured


Any thoughts how to improve?


Thanks, Steve

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to