HI, I have a CAN bus archeitecture and want to know if i can check the age of message or freshness of received message. Transmitter does not send any freshness bit with the data. Its receiver resposibility to check if the data is received at certain rate. ANY ideas are welcome because if stuck. I am using freescale S12 series. Thanks
CAN BUS INFO
Started by ●April 20, 2006
Reply by ●April 20, 20062006-04-20
Fizzy wrote:> HI, > > I have a CAN bus archeitecture and want to know if i can check the age > of message or freshness of received message. Transmitter does not send > any freshness bit with the data. Its receiver resposibility to check if > the data is received at certain rate. ANY ideas are welcome because if > stuck. I am using freescale S12 series. > > Thanks >Some CAN transceivers timestamp their data -- you'd have to check yours to see if it does. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Reply by ●April 20, 20062006-04-20
On 2006-04-20, Tim Wescott <tim@seemywebsite.com> wrote:>> I have a CAN bus archeitecture and want to know if i can check the age >> of message or freshness of received message. Transmitter does not send >> any freshness bit with the data. Its receiver resposibility to check if >> the data is received at certain rate. ANY ideas are welcome because if >> stuck. I am using freescale S12 series. >> > Some CAN transceivers timestamp their data -- you'd have to check yours > to see if it does.I assume you mean CAN controller and not transceiver? The transceiver is an analog part consisting of a differential line driver and receiver pair. -- Grant Edwards grante@visi.com
Reply by ●April 20, 20062006-04-20
On Wed, 19 Apr 2006 21:15:26 -0700, Fizzy wrote:> I have a CAN bus archeitecture and want to know if i can check the age > of message or freshness of received message. Transmitter does not send > any freshness bit with the data. Its receiver resposibility to check if > the data is received at certain rate. ANY ideas are welcome because if > stuck. I am using freescale S12 series.For MSCAN and TouCAN modules, each message buffer has a timestamp field. ~Dave~
Reply by ●April 20, 20062006-04-20
Fizzy wrote:> HI, > > I have a CAN bus archeitecture and want to know if i can check the age > of message or freshness of received message. Transmitter does not send > any freshness bit with the data. Its receiver resposibility to check if > the data is received at certain rate. ANY ideas are welcome because if > stuck. I am using freescale S12 series. > > ThanksCAN frames don't inherently have a freshness bit or timestamp field, but it may be that the protocol you are running over the top of CAN does have this information. Do you know what protocol is being used?
Reply by ●April 20, 20062006-04-20
Fizzy <fpgalearner@gmail.com> wrote:> I have a CAN bus archeitecture and want to know if i can check the age > of message or freshness of received message. Transmitter does not send > any freshness bit with the data.I think you're looking completely in the wrong direction. You expect a network protocol to carry semantics. That's not at all what a network protocol, like CAN, is about. CAN doesn't care *at all* what the bytes in those messages mean. It's completely between the nodes on the network to invest meanings in those bits and bytes. There are pre-defined sets "standard meanings", e.g. the CanOpen framework. Some of them will have timestamps or age-of-reading information, others won't. The general strategy should be "best effort", i.e. if a node sends something, it should always send the most current information. And it must be specified *somewhere* how old this most current information may be at maximum. This somewhere can be in the data sheet of the transmitting device, in some higher-level protocol requirement, in a self-description message of the device, which it sends out during an initial bus setup/discovery phase, or right there in the individual message. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by ●April 20, 20062006-04-20
On 20 Apr 2006 09:53:55 GMT, Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> wrote:> >The general strategy should be "best effort", i.e. if a node sends >something, it should always send the most current information. And it >must be specified *somewhere* how old this most current information >may be at maximum. This somewhere can be in the data sheet of the >transmitting device, in some higher-level protocol requirement, in a >self-description message of the device, which it sends out during an >initial bus setup/discovery phase, or right there in the individual >message.In networks with more than one potentially active transmitting node, the transmission of any low priority message can be greatly delayed due to any messages from other nodes with higher priority (lower message-ID). If accurate time information is needed, the event should be time stamped at the source and the time stamp and the event value should be transmitted in the same frame. In this way, the receiver can reconstruct when the event actually happened, even if the message delivery was delayed by several frame transmission times due to several high priority messages from other nodes. Paul
Reply by ●April 20, 20062006-04-20
Grant Edwards wrote:> On 2006-04-20, Tim Wescott <tim@seemywebsite.com> wrote: > > >>>I have a CAN bus archeitecture and want to know if i can check the age >>>of message or freshness of received message. Transmitter does not send >>>any freshness bit with the data. Its receiver resposibility to check if >>>the data is received at certain rate. ANY ideas are welcome because if >>>stuck. I am using freescale S12 series. >>> >> >>Some CAN transceivers timestamp their data -- you'd have to check yours >>to see if it does. > > > I assume you mean CAN controller and not transceiver? The > transceiver is an analog part consisting of a differential line > driver and receiver pair. >Yes. And I forgot to ask why he can't just respond to interrupts from said controller and keep track that way. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Reply by ●April 20, 20062006-04-20
On 2006-04-20, Tim Wescott <tim@seemywebsite.com> wrote:>>>>I have a CAN bus archeitecture and want to know if i can check >>>>the age of message or freshness of received message. >>>>Transmitter does not send any freshness bit with the data. Its >>>>receiver resposibility to check if the data is received at >>>>certain rate. ANY ideas are welcome because if stuck. I am >>>>using freescale S12 series. >>> >>>Some CAN transceivers timestamp their data -- you'd have to check yours >>>to see if it does. >> >> I assume you mean CAN controller and not transceiver? The >> transceiver is an analog part consisting of a differential >> line driver and receiver pair. >> > Yes. And I forgot to ask why he can't just respond to interrupts from > said controller and keep track that way.I think he wants to know when the data was sent, not when it was received. On a high-traffic CAN bus, low-priority packets can (in theory) be delayed in the sending controller for a long time. AFAICT, he's trying to account for the latency incurred while the packet sits in the sending CAN controller waiting to be put on the wire. If that's the case, a "received at" timestamp doesn't help any. -- Grant Edwards grante Yow! Look DEEP into the at OPENINGS!! Do you see any visi.com ELVES or EDSELS... or a HIGHBALL??...
Reply by ●April 20, 20062006-04-20
Hi Tim, I like your idea of timestamping. But i have a very little knowledge about timestamping since it is not the part of CAN protocol. I guess may be my question was not completely understood. As i said transmitter does not send any information about the freshness of data or the time when the data is sent. My CONCERN is to make sure that i receive the data after every certian time and if do not see the data than i declare it stale. One of the idea that i had was to look at the interrupt and when i see interrupt happeing start a downward-counter. Now until the counter reaches to 0 if i see another interrupt happening than i have a new data other wise i would flag the data stale. Problem is that if i have 100 different messages how would i keep track of all thoes 100 messgaes (with different ID). Thanks