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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

306 Views
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 Kudos
1 Reply

233 Views
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 Kudos