Hello,
I am sorry I am not able to reproduce the issue on KL25Z (FreeCntr32 component). The GetTimeReal() method call the RealTimeLdd1_GetTimeReal() method that contains the following code:
LDD_TError RealTimeLdd1_GetTimeReal(LDD_TDeviceData *DeviceDataPtr, LDD_RealTime_Tfloat *TimePtr)
{
RealTimeLdd1_TDeviceData *DeviceDataPrv = (RealTimeLdd1_TDeviceData *)DeviceDataPtr;
uint32_t CopyTicks; /* Working copy of variable TimerTicks */
bool CopyOverflow; /* Working copy of variable Overflow */
/* {Default RTOS Adapter} Critical section begin, general PE function is used */
EnterCritical();
CopyTicks = DeviceDataPrv->TimerTicks; /* Loading actual number of timer ticks */
CopyOverflow = DeviceDataPrv->Overflow; /* Loading actual state of "overflow flag" */
/* {Default RTOS Adapter} Critical section end, general PE function is used */
ExitCritical();
if (CopyOverflow) { /* Testing counter overflow */
return ERR_OVERFLOW; /* If yes then error */
}
*TimePtr = (LDD_RealTime_Tfloat)CopyTicks * 0.02499961853F; /* Multiply ticks and clock configuration 0 coefficient */
return ERR_OK;
}
There is multiplication of ticks by the real-time coefficient. In this case the Resolution of FreeCntr32 is 0.02499961853 s, i.e. every Timer Tick (TimerTicks variable) represents 24.99961853 ms. It is correct.
If you see any defect in your project sent me the project or steps how to reproduce the issue, please.
Best Regards,
Marek Neuzil