Thank you for explanation. I have discussed this with my mentor - for now, we will focus on accuracy and drift of the processor clock. We found out Beaglebone Black has support for high resolution timers within kernel modules - the kind that support nanosecond timestamping with ktime_get and such functions. These seem to be what we need. I want a timer that, after clock synchronization to global time, would trigger a gpio toggle on specific timestamp set in advance. For example, having it toggle on a specific timestamp that's about 10 minutes after synchronization to measure drift, or every 10 seconds for a period of time. Are there any examples of this?
Dne petek, 28. februar 2020 19.35.40 UTC+1 je oseba Dennis Bieber napisala: > > On Fri, 28 Feb 2020 01:35:54 -0800 (PST), in > gmane.comp.hardware.beagleboard.user Jaka Koren > <[email protected] <javascript:>> > wrote: > > > >-Is using a PRU even suitable for this kind of experiment? I am aiming > for > >sub-microsecond accuracy. > >-My task for example would require obtaining global time via selected > >protocol, then synchronizing the hardware clock and PRU to the obtained > >timestamp. Is this possible, considering PRU is a separate unit on the > >board? > > The processor clock(s) will be only as reliable as the crystal(s) > used > on the board. These crystals are not, to my knowledge, temperature > compensated, nor are they in an "oven" -- so some drift as the circuit > warms up or the environment changes temperature is to be expected. > > >-Is PRU clock accessible to programs in same way as processor clock (via > >hwclock on linux)? Is there a way to send pulses on pins periodically, > but > >starting on a predefined moment on clock? > > The PRUs do not have a time-of-day clock. The main processor > time-of-day is periodically synchronized using NTP, and I suspect is > incremented using an interrupt from a 32.768kHz crystal. The main > processor > itself appears to be driven by a 24MHz clock (probably via some multiplier > to get to the 1GHz internal cycle). > > The PRU processor clock is 200MHz, which I believe gives a 5ns > instruction timing (you'll have to figure out how many instructions will > be > needed to handle GPIO toggling and any time delays). I expect this clock, > as with the processor main clock, are conditioned on the 24MHz crystal > frequency. > > The time-of-day clock likely is not synchronized to the ARM > processor > clock (except as an artifact of interrupt signal gating). > > > > -- > Dennis L Bieber > > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/9adb37c1-9d80-48fe-b298-0be35d8448c1%40googlegroups.com.
