Hi,
I am using S32K146's RxFIFO feature of FlexCAN device CAN0 for message receiving experiments. My intention is to get the current value of the free-run timer in FlexCAN module so that to compare it with the timer value in can_message_t.cs field of the received message.
Here are my settings:
- FlexCAN is using external 8Mhz clock;
- Message format is 8 byte standard CAN message;
- CAN speed is 500Kbps
Upon receiving a new CAN message, the FlexCAN TIMER register value is read and compared with the value in the .cs field of the message. We found the delta is about 115 most of the time, which we don't know how to interpret.
If the stamp in .cs field means the starting of the CAN message, then the delta shall be equivalent to the time needed to receive the whole message from CAN bus -- this shall be 216us, if the free runner timer is ticking at 8Mhz, then the delta shall be 216*8=1728. This is not in line with the value 115.
Can anyone help on this topic?