how to get 48 bit timer value (CCU4)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User17086
Level 1
Level 1
Hello
I use 3 concatenated slices of CC40. I need to get the time stamps of 48bit counter periodically.
Of course I can read time value of each slices but if at this time one of the counters overflows i'll get a wrong timestamp.
Now i use timers in compare mode, if I'm not mistaken in capture mode i can to store at the moment time values of each timer(and then read this timestamp), but event connects to defined pin, and in my case i need to get timestamps via application.
Could you help me?
0 Likes
1 Reply
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

You can use as input for the capture event the SCU_GSC4x signals that get activated by writing to SCU_GENRAL->CCUCON register or using XMC_SCU_SetCcuTriggerHigh()/XMC_SCU_SetCcuTriggerLow().

Regards,
Jesus
0 Likes