CAN Transceiver

Overview

A CAN transceiver is an external device that converts the logic level signals from the CAN controller to the bus-levels. The bus lines are called CAN High (CAN H) and CAN Low (CAN L). The transmit wire from the controller to the transceiver is called CAN TX, and the receive wire is called CAN RX. These wires use the logic levels whereas the bus-level is interpreted differentially between CAN H and CAN L. The bus can be either in the recessive (logical one) or dominant (logical zero) state. The recessive state is when both lines, CAN H and CAN L, are roughly at the same voltage level. This state is also the idle state. To write a dominant bit to the bus, open-drain transistors tie CAN H to Vdd and CAN L to ground. The first and last node use a 120-ohm resistor between CAN H and CAN L to terminate the bus. The dominant state always overrides the recessive state. This structure is called a wired-AND.

CAN Transceiver

CAN Transceiver API Reference

group can_transceiver

CAN Transceiver Driver APIs.

Since

3.1

Version

0.1.0

Functions

static inline int can_transceiver_enable(const struct device *dev, can_mode_t mode)

Enable CAN transceiver.

Enable the CAN transceiver.

See also

can_start()

Note

The CAN transceiver is controlled by the CAN controller driver and should not normally be controlled by the application.

Parameters:
  • dev – Pointer to the device structure for the driver instance.

  • mode – Operation mode.

Return values:
  • 0 – If successful.

  • -EIO – General input/output error, failed to enable device.

static inline int can_transceiver_disable(const struct device *dev)

Disable CAN transceiver.

Disable the CAN transceiver.

See also

can_stop()

Note

The CAN transceiver is controlled by the CAN controller driver and should not normally be controlled by the application.

Parameters:
  • dev – Pointer to the device structure for the driver instance.

Return values:
  • 0 – If successful.

  • -EIO – General input/output error, failed to disable device.