Below is the code snippet of Can_Ipw_GetTimestamp(Can_TimeStampType * TimestampPtr, uint32 Value)
Then condition in the red rectangular is occured not only in yellow rectangular situation but also in timbase overflow. TimestampPtr->seconds shall not be incremented and TimestampPtr->nanoseconds shall not be zero in the latter case.
Solved! Go to Solution.
Hello,
I have got information from RTD SW team: They will fix this potential issue in the next release.
Best regards,
Peter
Hello,
I have got information from RTD SW team: They will fix this potential issue in the next release.
Best regards,
Peter
Hello,
Could you let me know what is this RTD version?
Best regards,
Peter
Hi,
We are usinng SAF85_S32R41_RTD_0_9_0_D2207.
There is no change of the Can_Ipw_GetTimestamp in the SAF85xx_SAF86xx_S32R41_RTD_2_0_0_P03_D2404.
Please refer to the following CAN global timstamp configuration we are using.
Hello,
The STM counter rolls over at FFFF_FFFFh to 0000_0000h.
The driver includes the case when counter overflows. See Can_Ipw_GetTimeElapsed function for more details.
Best regards,
Peter
Hi,
You are right. 'Can_Ipw_GetTimeElapsed' already considers the rollover of the time base so that return value of the 'Can_Ipw_GetTimeElapsed' is correct.
It means that 'TimestampPtr->nanoseonds is correct even though the rollover happens between 'Value' and 'CurrCompareValTemp' in the red rectangular of the below capture.
Let's suppose as below:
CAN_43_FLEXCAN_TS_STM_TARGETTIME = 0x2625A00 = 4000000
Value = 0xFFFFFFFA
CurrCompareValTemp = 0x2625A00
'TimestampPtr->nanoseconds' would be calculated as 0x2625A01 so that 'TimestampPtr->nanoseconds' is greater than 'CAN_43_FLEXCAN_TS_STM_TARGETTIME
In yellow rectangular, Value(0xFFFFFFFA) is greater than CurrCompareValTemp(0x2625A00). However, that's not the situation which the programmer wants. In the perspective of physical timeline which doesn't have the roll-over concept, the 'Value' does not exceed 'CurrCompareValTemp'.
Therefore, codes in white rectangular shall not be executed.
Hello,
We have created internal ticket and ask software team solution.
I will inform you ASAP.
Best regards,
Peter
Hello,
I have asked RADAR team for help here.
But you should have also dedicated NXP FAE, please get in touch with him also.
Best regards,
Peter