CAN & CANopen DISCUSSION

Why does a microcontroller with a built-in CAN controller still need an external transceiver?

Started by priya CAN transceiverCAN controllerCANH and CANL levelsMCP2551differential bus
4 replies 248 views 5 participants
Latest activity · 30 Sep 2026

Why does a microcontroller with a built-in CAN controller still need an external transceiver?

priya CAN & CANopen Forum
#1

My STM32 has CAN_TX and CAN_RX pins and the datasheet says it includes a CAN controller. I assumed I could wire the pins of two boards together as CANH and CANL, but every example adds a chip such as an MCP2551 or SN65HVD230 between the microcontroller and the bus.

What does the transceiver do that the microcontroller cannot, and is there any way to test CAN between two boards on the bench without it?

Community replies 4

Re: Why does a microcontroller with a built-in CAN controller still need an external transceiver?

#2

The CAN controller inside the microcontroller handles the protocol: building frames, bit stuffing, arbitration, CRC, acknowledgement and error handling. Its pins are ordinary logic signals, TX and RX, referenced to ground. The bus itself is a differential pair with specific voltage levels, and the transceiver is the physical layer that converts between the two.

In the recessive state (logic 1) the transceiver does not drive the bus and both lines sit near 2.5 V, so the difference is about 0 V. In the dominant state (logic 0) it pulls CANH up to about 3.5 V and CANL down to about 1.5 V, a difference of about 2 V. Two push-pull GPIO pins cannot produce that kind of wired-AND bus.

Re: Why does a microcontroller with a built-in CAN controller still need an external transceiver?

#3

The transceiver also provides what a bare pin lacks for a cable that leaves the board: a receiver that works over a common-mode range (the standard requires operation with the bus lines from -2 V to +7 V relative to the node's ground, and many parts tolerate far more), bus pins that survive shorts to supply or ground, ESD protection, and controlled edge rates to limit emissions.

Many also have a TXD dominant timeout, which releases the bus if the microcontroller hangs with TX low, so one crashed node cannot block everybody. Building this on a separate chip keeps the high-voltage-tolerant circuitry out of the microcontroller, which is the main reason it is rarely integrated.

Re: Why does a microcontroller with a built-in CAN controller still need an external transceiver?

#4

Note the supply and logic levels when picking one. The MCP2551 and TJA1050 are 5 V parts and their RXD output swings to 5 V, so check that the microcontroller pin is 5 V tolerant or choose a transceiver with a separate logic-supply pin. The SN65HVD230 family runs from 3.3 V and works on the same bus as 5 V transceivers, since the differential levels are what matter.

An MCP2551 is not a complete CAN interface by itself: it has no protocol logic, so a microcontroller without a CAN controller needs a controller chip such as the MCP2515 (connected by SPI) in addition to the transceiver.

Re: Why does a microcontroller with a built-in CAN controller still need an external transceiver?

#5

For a bench test without transceivers there are two options. On a single board, put the controller into loopback mode; it then receives its own frames internally, which verifies the bit timing setup, the filters and your driver code without any bus.

Between two or three boards at short distance you can build a wired-AND logic bus: connect each node's TX through a small signal diode (cathode towards TX) to a common line, tie all RX pins to that line, and add a pull-up of a few kΩ to the supply. Any node driving TX low pulls the line low, which reproduces dominant and recessive behaviour at logic level. It is only suitable for a few centimetres on a shared ground, not for a real cable.

TEP COMMUNITY