Hi,
I am trying to create a function that will check when the last CAN message was received, and if it has not been received within x amount of time an action will be take. My question is how do I get the current time, to be able to see the difference between the CAN Timestamp and current time? Also is this timestamp in seconds?
Thank you in advance,
Fernando
已解决! 转到解答。
Hello fernando.barrios@uwaterloo.ca, dumitru-daniel.popa,
Sorry for the delayed answer on this topic, I missed it; I think it was answered here . To answer the question, here is the output of the CAN block:
This timestamp is part of the MB structure (2B long), and is a value that the free running timer returns.
The TIMER_SRC bit (from CAN_CTRL2) is negated, thus the free running timer is clocked by the CAN bit-clock (the one that defines the baud rate on the CAN bus). This timer increments by one after each bit (received/transmitted); when there is no message on the bus, it counts using the programmed baud rate.
You can find out more details in the reference manual, in FlexCAN -> Functional description -> CAN protocol related features -> Timestamp.
Kind regards,
Razvan.
Please have a look over this. Is it still an issue ?
Hello fernando.barrios@uwaterloo.ca, dumitru-daniel.popa,
Sorry for the delayed answer on this topic, I missed it; I think it was answered here . To answer the question, here is the output of the CAN block:
This timestamp is part of the MB structure (2B long), and is a value that the free running timer returns.
The TIMER_SRC bit (from CAN_CTRL2) is negated, thus the free running timer is clocked by the CAN bit-clock (the one that defines the baud rate on the CAN bus). This timer increments by one after each bit (received/transmitted); when there is no message on the bus, it counts using the programmed baud rate.
You can find out more details in the reference manual, in FlexCAN -> Functional description -> CAN protocol related features -> Timestamp.
Kind regards,
Razvan.
Yes you did answer it on my other post, this explanation is helpful though I really appreciate it.
Thank you,
Fernando