Part Number: TDA3XEVM
Other Parts Discussed in Thread: SYSBIOS
Hi,
We are using the Fvid2 capture module and uses the built in timestamp function to get the correct time. As I understand it it uses the TimestampProvider as default. You can also register your own timestamp function in the capture module as well.
The Timestamp function uses a 64 bit timer where the counter register from the TDA3 timer is used for the lower 32-bits and when a rollover occurs an interrupt is generated which counts the upper 32 bits.
The capture module is interrupt driven and it reads the timestamp from the interrupt service routine. If a timestamp rollover occurs while in this routine you will get a negative timestamp by a U32 period. The timestamp function needs to check if there have been an overflow while reading the counters to get the correct timestamp.
We've seen that this has been addressed in other processors for getting the 64 bits but not for the dmtimer.
(see Timer_getExpiredCounts64 in sysbios/family/arm/lm4/Timer.c and both the sysbios/timers/dmtimer/Timer.c and TimestampProvider.c)
We have problems with intermittent negative timestamps. Maybe we've misinterpret something but if we hack the solution to take into consideration of the four cases described in the lm4 timer we do not get any negative timestamps.
Have you ever seen this occurring for the dmtimer and if so, would you agree that this is an issue/error that needs to be fixed?
Thanks
Jean