How to Calculate the Controller Parameters for an Isolated CAN (Controller Area

How to Calculate the Controller Parameters
for an Isolated CAN (Controller Area Network)
Network to Run at 1 Mbps
By Hein Marais, Senior Product Applications Engineer
CAN is a differential signaling standard that is widely used in the automotive,
industrial, and instrumentation industries. It is used for serial communication
between systems that can be connected to different power systems, often
over long distances. Due to these environments, galvanic isolation is often
used in order to break ground loops or provide physical safety.
Isolated CAN networks will have an increased propagation delay over
nonisolated CAN networks, and it can often be challenging to design.
Figure 1 shows an example of an isolated CAN node using the ADM3053
signal and power isolated CAN transceiver for calculating the necessary CAN
controller parameters to communicate at 1 Mbps over a 20 m cable.
A CAN bit consists of four separate time segments, synchronization segment (SYNC_SEG), propagation segment (PROP_SEG), phase segment 1
(PHASE_SEG1), and phase segment 2 (PHASE_SEG2). These time segments
are programmable in the CAN controller and are critical in calculating the setup
parameters for the CAN controller. Figure 2 shows the different segments of a
nominal bit time.
The following assumptions were made during the calculation:
• Cable length of 20 m
• Cable propagation delay of 5 ns/m
• Data rate or bit rate of 1 Mbps
• CAN controller oscillator frequency
of 36 MHz
5V
SUPPLY
10𝛍F
100nF
100nF
10𝛍F
VISOOUT
VCC
isoPower DC-TO-DC CONVERTER
OSCILLATOR
RECTIFIER
3.3V/5V
SUPPLY
REGULATOR
VIO
10nF
VISOIN
100nF
100nF
ENCODE
RxD
DECODE
ENCODE
SLOPE/
STANDBY
RS
DRIVER
RT
CANL
RECEIVER
REFERENCE
VOLTAGE
CAN TRANSCEIVER
ADM3053
VREF
GND2
GND1
GND2
ISOLATION
BARRIER
CANH
CANH
RxD
VREF
LOGIC SIDE
RS
DECODE
RS
CAN
CONTROLLER
PROTECTION
TxD
TxD
10nF
VCC
DIGITAL ISOLATION iCoupler
BUS SIDE
Figure 1. Isolated CAN node using the ADM3053 signal and power isolated CAN transceiver.
www.analog.com/iCoupler
CANL
BUS
CONNECTOR
SYNC_SEG
PROP_SEG
PHASE_SEG1
PHASE_SEG2
SAMPLE POINT
NOMINAL BIT TIME
Figure 2. CAN nominal bit time.
CAN uses bitwise arbitration, which allows different nodes to
contend for access on the bus. This causes more than one node
to be able to transmit data at a time. A transmitting node will
have to sample the data on the bus in order to determine if it
has won arbitration. Due to the propagation delay of the system,
the controller has to compensate for when to sample each bit.
Programming the PROP_SEG into the controller will allow this
compensation and can be calculated as follows:
The propagation delay from TxD to RxD for the ADM3053 is
250 ns (max).
The physical delay of the cable is equal to 5 ns/m multiplied by
a length of 20 m equaling a total of 100 ns.
PROP_SEG = ROUND_UP ( 700 ns/28 ns) = 25 Time Quanta
From 36 time quanta per bit, subtract 25 for PROP_SEG and 1
for SYNC_SEG. This leaves 5 time quanta for PHASE_SEG1 and
PHASE_SEG2.
Due to the tolerance in the CAN system clock, an accumulated
phase error will occur. This requires the system to resynchronize
through the resynchronization jump (RJW). This is determined as
the smaller value of 4 and PHASE_SEG1.
This allows us to calculate the oscillator tolerance required for
the system:
Δf < RJW/(20 × NBT) = 4/(20 × 36) = 0.006
Δf < Minimum (PHASE_SEG1 and PHASE_SEG2)/2(13 × NBT
– PHASE_SEG2) = 5/2(13 × 36 – 5) = 0.005
The smaller of these two values is the required oscillator
tolerance, 0.5%.
This calculation gives the following setup parameters:
This gives a total propagation time through the system and back
as 2 (physical delay + transceiver prop delay) equaling 700 ns
(2 × (100 + 250) = 700 ns).
• SYNC_SEG = 1
In order to program the controller, the registers have to be setup
as an integer multiple of a unit called a time quantum. The time
period of the time quantum is equal to the CAN system clock,
which in this case is 28 ns.
• PHASE_SEG2 = 5
Analog Devices, Inc.
Worldwide Headquarters
Analog Devices, Inc.
One Technology Way
P.O. Box 9106
Norwood, MA 02062-9106
U.S.A.
Tel: 781.329.4700
(800.262.5643,
U.S.A. only)
Fax: 781.461.3113
• PROP_SEG = 25
• PHASE_SEG1 = 5
• RJW = 4
A time quantum of 28 ns will give 36 (1000/28 = 36) time
quanta per bit.
Analog Devices, Inc.
Europe Headquarters
Analog Devices, Inc.
Wilhelm-Wagenfeld-Str. 6
80807 Munich
Germany
Tel: 49.89.76903.0
Fax: 49.89.76903.157
Analog Devices, Inc.
Japan Headquarters
Analog Devices, KK
New Pier Takeshiba
South Tower Building
1-16-1 Kaigan, Minato-ku,
Tokyo, 105-6891
Japan
Tel: 813.5402.8200
Fax: 813.5402.1064
Share this on: ©2011 Analog Devices, Inc. All rights reserved.
Trademarks and registered trademarks are the
property of their respective owners.
T10472-0-12/11
Follow ADI: www.analog.com/iCoupler
twitter.com/adi_news
Analog Devices, Inc.
Southeast Asia
Headquarters
Analog Devices
22/F One Corporate Avenue
222 Hu Bin Road
Shanghai, 200021
China
Tel: 86.21.2320.8000
Fax: 86.21.2320.8222