How to tranform "recvMsg.cs" in a time information (from "can_pal" example for s32k144) .

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to tranform "recvMsg.cs" in a time information (from "can_pal" example for s32k144) .

588 次查看
pierpaolo_dini
Contributor III

Hello, everybody,
I'd need to know how to interpret the data provided by the "cs" structure field.
From what I understood it should give us an indication of timestamp but when I go to console to print the value of recvMsg.cs (after the cast to type int) I get a value that apparently makes no sense.
is it possible to get information in seconds/milliseconds for example?

0 项奖励
1 回复

515 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

the time stamp is captured from free running 16bit counter which is fed by CAN bit clock. This is implemented according to CAN bus specification. Expected use-case is that the time stamp is used to check order of received messages if necessary (or for debugging in general). If you need to get the time stamp in seconds/milliseconds, it must be solved on application level. There's no such function in hardware or in SDK.

Regards,

Lukas

0 项奖励