In a system with multiple sensors, I’d like to create timestamps for sensor data in order to synchronize the different sensors. Assume that some sensors are connected to the Orin main processor and some are connected to the Sensor Processing Engine (SPE). The main processor uses an RTC clock that represents the reference time source of the system. How can I synchronize all sensors in the sytem?
I realize that there is the Generic Timestamp Engine that can be used to monitor GPIOs of the SPE. Assume, however, that I use an SPE GPO to trigger a sensor reading and want to create a timestamp for that trigger. Is this possible with the Generic Timestamp Engine? Where can I find more information regarding this driver?
Hello,
I’m not quite clear about your statement by ‘main processor uses an RTC clock that represents the reference time source of the system’.
Within the whole Orin chip, generally a global TSC is used for timestamp. And you can take a look at TRM for details.
Back to your question, yes, GTE can record timestamps for GPIO events, as GTE demo in SPE firmware package shows.
If you are using different timestamp source between CCPLEX and SPE, you may have to convert one to a unique timestamp base. It’s highly application-dependent.
Hello, David:
Sorry that I’m still confused for RTC as timestamp. The clock source of RTC is only 32khz, and it may be quite inaccurate for a timestamp.
yes, GTE can be used to record timestamp, and also, you can get timestamp in ISR (SW implementation).
so to sum it up: TSC should be used to generate timestamps and the GTE can be used to communicate timestamp events from the SPE to the CCPLEX. Is that correct?
Hello, David:
Not so exactly.
TSC is a read-only timestamp counter, and it’s sync inside the SOC. You can take it as a global TS for the chip. For example, both CCPLEX and SPE can read TSC to get a same counter if the read operations are exactly in the same time.
GTE is just a generic timestamping engine, and it can record the timestamp of events like GPIO toggle. It has nothing to do with communications between SPE and CCPLEX.
the GTE can run on the CCPLEX domain while monitoring GPIOs in the SPE domain
Honestly, I have not tried so. But I think as long as GPIO interrupt mapping (to CCPLEX) is good, GTE should work as well. Also, you may have to check the GTE driver in Linux side.