CAN Acceptance Filter: How a Broadcast Bus Lets Each ECU Choose Its Messages

Key takeaways

  • CAN is a broadcast network. One transmission reaches every node, and messages carry no sender or receiver address.
  • Each node has a transceiver and a controller on two lines, CAN_H and CAN_L.
  • The acceptance filter in the CAN controller checks each message ID and passes only allowed messages to the MCU.
Light trails from traffic on a highway at night, with the words CAN Communication Network
Traffic light trails on a highway at night. Image: Techqio

The CAN acceptance filter exists because a CAN message carries no address. Every electronic control unit (ECU) on the bus hears every message, and the filter in each controller decides which ones the node keeps. That design follows from how the bus is built and how it delivers messages.

CAN system architecture

The simplest CAN bus system has two ECUs joined by two lines. The pair is named CAN_H (High) and CAN_L (Low). Inside each CAN node sit two parts. A transceiver physically sends and receives the CAN signal, and a controller analyzes the data that comes in. Our guide to what a CAN transceiver does shows how a bit becomes voltages on those two lines.

Schematic of an ISO 11898-2 network: three CAN nodes tapped onto two parallel bus lines by short stubs, with a termination resistor at each end of the lines
Three nodes tapped onto two bus lines with end resistors. Photo: EE JRW / Wikimedia Commons (CC BY-SA 4.0)

Three ways a network delivers a message

Networks deliver messages in three ways. They differ in how many nodes a message is for and in what has to be defined before it is sent.

1. Unicast

Unicast is one-to-one messaging, also called peer-to-peer (P2P) communication. The sender needs the receiver’s address to reach exactly the right node. The receiver needs the sender’s address to confirm where the message came from. Both have to be defined before communication starts and travel inside the message.

Slide titled Unicast: one station sending information to another station, one-to-one. A red node has a single arrow to one green node while five yellow nodes get nothing
One red node with an arrow to a single green node. Image: Professor Messer (YouTube)

2. Broadcast

Broadcast is one-to-many (1:N) messaging, like a radio station whose signal many people tune in to. Broadcast does not require sender or receiver information to be defined in advance or included in the message.

All nodes get the same message at the same time, so one transmission reaches every receiver. Each receiving node looks at the message and then decides whether to take it.

Slide titled Broadcast: send information to everyone at once, one-to-all, one packet received by everyone. A red node has arrows fanning out to green nodes
A red node with arrows fanning out to green nodes. Image: Professor Messer (YouTube)

3. Multicast

Multicast resembles broadcast, but the message goes only to a specific group of nodes. On a network of N nodes it reaches M of them, where M is smaller than N.

Slide titled Multicast: delivery of information to interested systems, one-to-many-of-many. A red node has arrows to three green nodes while three yellow nodes get nothing
A red node with arrows to three green nodes among yellow ones. Image: Professor Messer (YouTube)

Automotive CAN is a broadcast network

The ECUs in a car are connected in a bus topology and exchange messages over it. CAN, commonly used for in-vehicle communication, uses broadcast out of the three methods. As Kvaser’s CAN tutorial puts it, all nodes hear all transmissions and the messages carry no explicit address. A sending node reaches every node with a single transmission, so each receiving node filters the messages it sees on the bus.

How the CAN acceptance filter decides what reaches the MCU

Counting the MCU it reports to, the CAN communication module in an ECU has three parts: a microcontroller (MCU), a CAN controller and a transceiver. Every CAN message has its own unique ID. CAN XL, the newest generation, is standardized in ISO 11898-1:2024. It gives addressing a field of its own, a 32-bit acceptance field next to an 11-bit priority ID.

The acceptance filter in the CAN controller checks the message ID and decides whether to receive that message. A message that does not pass is never sent up to the MCU. The controller simply leaves it alone until it is gone from the bus.

Block diagram of a CAN node: a microcontroller containing a CAN controller, with arrows to and from a CAN transceiver that connects to two bus lines. Labels mark the data link layer (ISO 11898-1) and the medium access unit with its electrical levels (ISO 11898-2, 3)
Block diagram of a node's microcontroller, controller and transceiver. Photo: EE JRW / Wikimedia Commons (CC BY-SA 4.0, cropped)

Controllers such as Microchip’s PIC32CM CAN module support a range filter, a filter for one or two dedicated IDs and a classic bit mask filter. In the bit mask type, a zero bit in the mask takes that bit position out of the comparison. If a node needs more IDs than its controller has filters, I’d plan for a second check in software.

The same datasheet describes one filter list for standard IDs and another for extended IDs. The module works through a list from the first element and stops at the first match. That match then stores the frame in a receive FIFO or buffer, or rejects it if the element is set that way. The order of the list matters as much as its contents.

What broadcast and filtering mean for a CAN node

CAN moves the addressing work from the sender to the receiver. On each node, that work falls to the CAN acceptance filter. What matters there is which IDs the list holds, which filter type each element uses and the order they are checked in. I’d count on the acceptance filter only to take work off the MCU, not to keep out messages from senders that don’t belong on the bus.

Sources

Share this article

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *