CAN Ack Error with filtering on / CAN / Controller Area Network / filter

Started by February 17, 2006
Is the filter for CAN messages before or after the receiver / ack
hardware?

Consider only two nodes on a bus, the first node has ALL messages
filtered out, the second node transmits a message that will be filtered
by the first node.  Will the first node still generate the ACK on the
bus, assuming no errors in the packet?

Does the ACK occur before or after the filter is applied?

Please provide sources for your information / opinion.

thanks

lyleboys@yahoo.com wrote:
> Is the filter for CAN messages before or after the receiver / ack > hardware? > > Consider only two nodes on a bus, the first node has ALL messages > filtered out, the second node transmits a message that will be filtered > by the first node. Will the first node still generate the ACK on the > bus, assuming no errors in the packet? > > Does the ACK occur before or after the filter is applied? > > Please provide sources for your information / opinion. > > thanks >
That is, of course, dependent on the design of the CAN controller chip that you're using, and you haven't told us what it is. On the chips that I have looked into or used the ACK happens in hardware whether or not the message is filtered -- the only thing that filtering controls is whether the message is saved and the processor interrupted. My only direct experience with this is the TMS320F2812 DSP -- but all the data sheets that I have read seem to indicate the same thing. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
That is my experience as well, that the filtering happens after the
message receive and ack.

BUT, I couldn't find that specified in the CAN spec downloaded from
Bosch.

Rather than chip specific info, I was wondering if the _the spec_
dictates whether filtering affects generation of the ACK.

The hardware seems to do as you say, generate the ACK independent of
filtering, but is that only chip by chip?  Or is there a specified
behaviour?

thanks

Un bel giorno lyleboys@yahoo.com digitò:

> Is the filter for CAN messages before or after the receiver / ack > hardware?
As far as I know, the ACK simply means that the message has been received without CRC errors. The process of masking/mailboxing belongs to the "higher" levels: a CAN node receives all of the messages even if it doesn't put any of them into a mailbox for user processing. You can get the specs directly from Bosch site: http://www.semiconductors.bosch.de/pdf/can2spec.pdf At page 15 it is written: "ACK SLOT All stations having received the matching CRC SEQUENCE report this within the ACK SLOT by superscribing the ’recessive’ bit of the TRANSMITTER by a ’dominant’ bit." -- asd
lyleboys@yahoo.com wrote:
> That is my experience as well, that the filtering happens after the > message receive and ack. > > BUT, I couldn't find that specified in the CAN spec downloaded from > Bosch. > > Rather than chip specific info, I was wondering if the _the spec_ > dictates whether filtering affects generation of the ACK. > > The hardware seems to do as you say, generate the ACK independent of > filtering, but is that only chip by chip? Or is there a specified > behaviour? > > thanks >
I don't recall the filtering even being mentioned by the Bosch spec -- AFAIK it's just a really cool feature of the first CAN controller chip that everyone else adopted. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
It is mentioned in the Bosch can2spec.pdf, part B, section 4.

It talks of filtering based on the whole identifier, not the whole
message, so could a controller abort the message early, based on
filtering, and not generate any response?

lyleboys@yahoo.com wrote:

> BUT, I couldn't find that specified in the CAN spec downloaded from > Bosch.
And if you look at that for a while longer, you may eventually find out why that is: the CAN spec doesn't mention message filtering at all. Filtering is not part of CAN --- it's just so obviously a useful thing to have if a CAN controller offers more than one receive mailbox, that basically all of them have it. There are also the so-called "basic" CAN controllers that don't have any filtering. They just have a single receive mailbox (optionally a FIFO hiding behind it) that receives everything passing over the bus except what it sent itself. It's then up to the CPU to figure out what to do with all that data. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.