How can I find out whether the PRU and CPU are driven by the same oscillator? Specifically, a colleague told me that the IEP timer (which I’m reading with the PRU) is driven by a 24 MHz oscillator that’s PLL’d so the timer increments at 200 MHz, whereas the CPU is driven by a 25 MHz oscillator PLL’d so that the CPU runs at 1 GHz.
It seems to me that if they’re driven by different oscillators, then they could drift apart over time.
Page 1177 of the TRM (spruh73n.pdf) mentions a 32-kHz crystal oscillator, but I don’t see how that’s related.
Also, are these oscillators within the Sitara SoC, or somewhere else on the BBB? The SRM just references 24.576 MHz oscillator (pg 70 of e14 BBB_SRM_rev 0.9.pdf), and I’m not sure how that’s related to the 24/25 MHz oscillators my colleague mentioned.
Thanks for your help.
The CPU in a BBB runs from a 24 MHz Oscillator.
There is a 25 MHz oscillator on the board, but that is for the Ethernet.
Thanks Graham. Follow-up questions:
Where exactly did you find this information? I looked through the TRM and SRM but couldn’t find anything definitive.
Is the 200-MHz PRU driven from the same 24 MHz oscillator that drives the CPU? If so, is it correct that the PRU cycle counter increments precisely once for every 5 CPU cycles?
Thanks for your help.
Well, best way is to read the schematic. (BBB Rev C schematic, dated March 21, 2014)
24 MHz Sitara clock crystal is on upper left of page 3, hooked to main oscillator I/O.
There is also a 32 kHz crystal shown there for the Real Time Clock.
The 25 MHz crystal is on page 9, hooked to the LAN8710, which is the Ethernet PHI.
I am not a PRU expert, but I don’t think there is, or should be, a fixed relationship between
the PRU clock and the CPU clock. The CPU in a Sitara is a variable speed CPU, and
can run anywhere from a few hundred MHz to a GHz, depending on loading,
and it is under kernel control.
I would not think you would want the 200 MHz clock for the PRU to be variable
like that, since it would totally destroy the real time advantage of the PRU.
So, I suspect that the clock for the PRU is a fixed clock coming from a different
place in the clock tree than the variable speed CPU.
You should really check and verify the clock tree behavior.
Graham is right. The oscillator used for the processor is the 24MHz crystal oscillator (Y2 in schematic), whereas, the one used by the ethernet controller or the IEP timer is 25MHz crystal oscillator (Y3 in schematic).
Thanks Graham. What do you mean by “check and verify the clock tree behavior”? I searched the TRM for “clock tree” but I’m still not sure how to figure out which timers make their way through various PLLs to the PRU and main CPU.