Hi Clément,
Yes, you can log your own sync point events with your own custom parameters if you want. You'll still need to include LogSync = xdc.useModule('ti.uia.runtime.LogSync'); in your .cfg file, but instead of calling the LogSync_writeSyncPoint method, you'll instead log the following two events:
#include <ti/uia/events/UIASync.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/Gate.h>
#include <xdc/runtime/Types.h>
#include <xdc/runtime/Timestamp.h>
...
IArg key;
Types_Timestamp64 globalTStamp;
Types_Timestamp64 cpuTStamp;
Types_FreqHz globalFreq;
Types_FreqHz cpuFreq;
UInt32 globalTimestampCpuCyclesPerTick = 10; // set to the number of CPU cycles per global timestamp tick.
// store your global timestamp frequency into globalFreq.lo and globalFreq.hi
globalFreq.lo = ...
globalFreq.hi = ...
key = Gate_enterSystem(); // prevent preemption
#ifndef xdc_target__isaCompatible_64P
LogSync_CpuTimestampProxy_get64(&cpuTStamp);
#else
cpuTStamp.lo = TSCL;
cpuTStamp.hi = TSCH;
#endif
// store your global timestamp value into globalTStamp.lo and globalTStamp.hi
globalTStamp.lo = ...
globalTStamp.hi = ...
Gate_leaveSystem(key);
Log_write8(UIASync_syncPoint,cpuTStamp.lo, cpuTStamp.hi, globalTStamp.lo,globalTStamp.hi,
LogSync_cpuTimestampCyclesPerTick,cpuFreq.lo,cpuFreq.hi);
Log_write4(UIASync_globalTimerFreq,globalTimestampCpuCyclesPerTick, globalFreq.lo, globalFreq.hi);
I'm currently on vacation and won't be able to check this out in the lab until I get back in the office on August 12. If it doesn't work, you may need to assign a custom logger instance for use by both the LogSync module and the Main module (e.g. LogSync.setSyncLogger(myLogger); and LoggingSetup.mainLogger = myLogger;) just to generate the metadata that tells System Analyzer which logger to expect the sync point events in.
One thing to note is that the accuracy of the correlation will depend on the clock period of your global timer - if it's a 1kHz clock, the accuracy will only be 1ms. So try to use as high a clock frequency as you can for your global timestamp.
I hope this helps.
Regards,
Brian