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) .

668件の閲覧回数
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 返信

595件の閲覧回数
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 件の賞賛
返信