Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Interface (Data Transmission) Texas Instruments Incorporated

Basics
控制器局域网( of debugging the controller area
CAN)物理层调试基础知识
network (CAN) physical layer
作者:Scott Monroe,德州仪器 (TI) 工业接口系统工程师

By
引言 Scott Monroe 精度和更复杂的工具。这种问题已非本文讨论的范
Systems Engineer for Industrial Interface 畴,但是这里介绍的基础知识可帮助确定问题所属类
控制器局域网( CAN )标准不断发展,正用于车载
Introduction
和工业网络之外的许多新应用。支持它的微处理器变
别,以及进一步调试所需的其他工具。一个由
supply. If the investigation leads to detailed problems,TI 组
The controller area network (CAN) standard continues to higher accuracy and more complex
装的 CAN 演示系统以及 TI 的 SN65NVD255D 评估模块 tools may be required.
得普遍且价格低廉,并且开源协议栈让其非常容易访 Problems at that level are outside the scope of this article,
grow and is being adapted into many new applications ( EVM ) 1 ,用于演示硬件。另外,我们还使用了其
问,同时也容易添加至新系统。有许多
outside CANMicro-
of automotive and industrial networking. 板可用于 but the basics introduced here will help identify areas of
他一些东西,例如: CAN 连接器外接头电缆和芯片钩
concern and what additional tools will be required for fur-
BeagleBone (Capes) Stellaris® (BoosterPacks)
processors supporting it 、
have become prevalent at low 、
cost, and open-source protocol stacks make it very acces- ther debugging. A CAN demonstration system assembled
(抓住收发器引脚,让其连接至电缆,以更加容易地
Arduino (Shields) 和其他微处理器开发平台。当设计
sible and easy to add to new systems. There are CAN by Texas Instruments (TI)
连接示波器指针,如图 and TI’s SN65HVD255D evalua-
1 所示)。
人员的系统上电却不能工作时,应该怎么办呢?本文 tion module (EVM)1 are used for the demonstration hard-
boards for BeagleBone (Capes), Stellaris® (BoosterPacks),
为您介绍一种对
Arduino (Shields), CAN 物理层进行调试的较好工程方
and many other microprocessor devel- ware. A few other helpful items are also used, such as a
连接检查
op ment platforms. When a designer’s system is powered
法。我们将介绍基础调试步骤,并说明一个 CAN 物理 CAN connector breakout cable and chip hooks to grab the
up and doesn’t work, then what? This article presents a
开始调试对话时,使用 DMM
transceiver pins and bring them to a cable for easy PCB
确认印刷电路板( )
attach-
层应有的性能,以及找出问题的一些小技巧。
sound engineering approach to debugging the CAN physi- ment to an oscilloscope probe (Figure 1).
上连接如我们所预计的那样—系统未上电。这看似很
cal layer. Basic debugging steps are provided, along with
调试基础知识 Checking the connections
基础,但令人吃惊的是,这个简单的方法却解决了许
discussion of the expected behavior of a CAN physical To begin the debugging session, a DMM is used to make
多简单问题。所有人都会认为原理图、布局和制造工
ISO11898-2
layer and tips to ISO11898-5
和help 规范详细说明了高速
pinpoint the trouble. CAN sure the connections on the printed circuit board (PCB)
艺没有问题,但不幸的是,它们有时却并不如人愿。
are as expected—while the system is unpowered. This
物理层即收发器。掌握 CAN 物理层的基础知识以后,
Debugging basics 子seems
插件板 位basic,
very 置错误 but、it虚
is 焊 和错误
amazing 端接
how 或者
many 连 接prob-
simple 的电
利用简单的调试工具便可迅速地找出常见问题。所需
The ISO11898-2 and ISO11898-5 specifications provide lems have been solved with thisDMM
缆,都是一些常见问题。利用 technique. Everyone
电阻设置来确认所
的基本实验室工具为示波镜、数字万用表(
details for the high-speed CAN physical layer or trans-DMM ) assumes that the schematics, layout, and manufacturing
有线路和连接均正确。图 2 所示 CAN 应用的简易原理图
ceiver. With a fundamental knowledge of the CAN physical
和一个电源。如果想要深入了解问题,则需要更高 are correct, but unfortunately sometimes they aren’t.
layer, common problems can be found quickly by using 用作参考。
Improperly seated daughtercards, cold solder joints, and
simple debugging tools. The basic lab tools needed are an cables not terminated or connected properly are all com-
oscilloscope, a digital multimeter (DMM), and a power mon issues. The resistance setting of the DMM is used to

Figure
图1 CAN1. Basic tools for debugging the CAN physical layer
物理层调试基本工具

18

High-Performance Analog Products www.ti.com/aaj 3Q, 2013 Analog Applications Journal


Texas Instruments Incorporated Interface (Data Transmission)

make
表 sure all the traces PCB
1 列举了需要检查的 and connections
和网络连接。收发器引脚和are properly limiting series resistors, bus-termination
屏蔽层),其特性阻抗( resistors, or pull-
Z 0)为 120 Ω。应使用与线路
made. A simplified schematic for a CAN application is up or pull-down resistors on digital I/Os.
PCB 上其他相关连接之间的电阻应为 0 Ω,除非设计使
shown for reference in Figure 2.
特性阻抗相同的电阻器来端接电缆两端,以防止信号
Checking bus termination
用表注里介绍的一些选项。例如,限流串联电阻器、
The PCB and network connections to check are summa- 反射。端接可以为电缆上总线端的单 120 Ω电阻器,
Most CAN standards specify a single twisted-pair cable
rized in Table 1. The expected
总线端接电阻器或者数字 I/Oresistance
的上拉或下拉电阻器。 between the pins 如图 3 中 CAN
(shielded 总线左侧所示;或者,它也可以位于某
or unshielded) with 120-W characteristic imped-
on the transceiver and the relevant other connections on ance (ZO). Resistors equal
个端接节点内,如图 to the characteristic impedance
3 右侧所示。不得将端接电阻从
总线端接检查
the PCB is 0 W, unless the design uses some of the options of the line should be used
总线移除。如果 CAN 端接电阻负载不存在,则信号完 to terminate both ends of the
outlined in the table comments. Examples include current- cable to prevent signal reflections. Termination may be a
大多数 CAN 标准均规定使用一条单双绞线(有或者无 整性会受到影响,并且无法满足比特计时要求。如果
表1 PCB
Table 和CANof收发器连接总结
1. Summary PCB and CAN transceiver connections
CONNECTION COMMENTS
Ground The transceiver GND should be connected to the PCB ground plane .
The VCC on the transceiver should be connected to the voltage regulator’s output . One should be careful in multirail
Power Supply (VCC, VIO, VRXD) designs: The VCC of the transceiver may be 5 V or 3 .3 V, depending on the CAN transceiver family . Some 5-V CAN
transceivers have an I/O level-shifting pin (VIO or VRXD) .
If a current-limiting series resistor is used, that is the expected resistance value . The TXD may need a pull-up to
Transmit Data (TXD or D)
the VCC if an open-drain output on a microprocessor is used .
Receive Data (RXD or R) If a current-limiting series resistor is used, that is the expected resistance value .
RS, S, STB, EN, AB, or LBK may be available, depending on the specific CAN transceiver . RS provides three modes
of operation that need to be checked:
1 . High-speed mode. There should be a connection to ground or low from the microprocessor’s output pin .
2 . Slope-control mode. There should be a pull-down resistor to ground between 10 and 100 kW .
Mode
3 . Low-power mode. There should be a logic high via a pull-up resistor or via the output from the microproces-
sor’s output pin .
The other pins are digital inputs with logic-low and -high thresholds that may be either driven by a microprocessor
output or pulled high or low via a resistor . It should be verified that the device is in the proper mode .
Some transceivers may have a VCC/2 output reference . It may be floating, connected by a bypass capacitor to
VREF or SPLIT pin
ground, or used to actively drive split termination . The application use should be verified .
The transceiver’s CANH and CANL pins should be connected to the respective pins on the CAN bus . More informa-
CAN Bus (CANH, CANL)
tion is provided under “Checking bus termination” in this article .

图2 CAN
Figure 应用简易原理图
2. Simplified schematic for a CAN application

VIN

VIN VOUT
Bus Transceiver
Termination: Protection
5-V Voltage VCC Optional Function
Regulator on PCB
VCC 3 CANH
S 7
Port x 8

SN65HVD256
3-V MCU Optional
Pull-down CAN
VIN VOUT Transceiver
RXD
RXD 4
TXD CANL
3-V Voltage TXD 1 6
Regulator 5 2
VRXD GND
Optional
Pull-up

19

Analog Applications Journal 3Q, 2013 www.ti.com/aaj High-Performance Analog Products


Interface (Data Transmission) Texas Instruments Incorporated

总线共
single 模 电resistor
120-W 压 滤 波at和 稳end
the 压理
图3 典型
Figure CAN总线
3. Typical CAN bus
of the bus on the cable, as shown2
想,则使用分裂端接,如图
on the left side of the CAN bus
所示。在该图中,每个电阻器
in Figure 3; or it may be in a
均为60Ω,而分裂电容器范 Node n
terminating node, as shown on (with termination)
围为
the 1 nF
right 到of
side 100 nF ,具体取
Figure 3. The Node 1 Node 2 Node 3 MCU or DSP
termination
决于共模滤波器所需的频率。 resistance should
CAN
not
2 be removed
CANH 到 CANL from the bus. If
的测得电阻应
MCU or DSP MCU or DSP MCU or DSP
Controller
the resistive load of the CAN CAN CAN CAN
介于 45 Ω到 65 Ω之间,以达 Controller Controller Controller
termination is not present, signal CAN
到 C A N will
integrity 标准 be、compromised
两个端接电阻 Transceiver
CAN CAN CAN
and the bit timing will not be
器的并联阻抗以及并联节点输 Transceiver Transceiver Transceiver RTERM
met. If filtering
入电阻的容差。应根据可能碰 and stabilization
of the bus’s common-mode volt-
到的极端故障状态(通常为系
age is desired, split termination
统接地的电源电压)来确定端 RTERM
may be used as in Figure 2. In
this figure, each resistor is 60 W,
接电阻器的额定功率。
and the split capacitor may be
电源检查from 1 nF to 100 nF,
anywhere
depending on the frequency desired for the common-mode higher if one of the bus lines is shorted to a supply or
在系统上电以前,应首先检查 CAN 收发器的一个 CANground
物理层基础知识
when the transceiver is trying to drive the bus
filter.2 The measured resistance from CANH to CANL
或者多
should be个between
电 源 。45 根据 and所65使W用to的account
收 发 器for 类 the
型, VCC
toler- to a dominant state. If the voltage regulator cannot supply
一旦完成所有基础检查,就可以检查 CAN 物理层的核心
ances
应为 3.3V within 或者the 5VCAN standard, the parallel impedance of
。不管您相不相信,在一些情况 that amount of current, the voltage level may drop out of
the two termination resistors, and the input resistance of
CANthe 总线了。收发器的两个关键组件便是接收器和发射
transceiver’s specification range, or may even be low
下,丢失 VCC 确实为问题的根本原因。因此,我们
many nodes in parallel. The power rating of the termina- 器。发射器被称作
enough to trip an CAN 的驱动器。通过
undervoltage lockout V CC /2 共模点(约
condition on the
应确保 V CC 存在于收发器的
tion resistors V CC 引脚上。只需检查
should be sized according to the worst-case 2.5Vtransceiver.
)对CAN物理层偏置,见图4 。
DMM
fault ,便可确认有电源存在。必须注意电源短路
conditions they may encounter, usually the power-
supply voltage of the system to ground. CAN physical-layer basics
发收器将单端数字逻辑信号、 TXD (或者 D )和 RXD (或
接地(不幸的是,该引脚就在 VCC引脚的旁边)。
Once all the basics have
者 R )转换为差分 CAN 总线所要求的电平。当总线为显 been checked, the heart of the
Checking the power supply
显性状态( 60 is powered up, the60mA
Ω总线负载时约为 )和隐性状 CAN physical layer—the CAN bus—can be examined. The
Before the system power supply (or 性时,在接收节点,其 CAN 标准定义的差分电压( V diff
态( 10mA transceiver’s two key components are the receiver and the
supplies) to the CAN transceiver Ishould
)之间所需电流( CC )差约为 first be50mA
checked.。
1.2VThe
( D ) )大于
transmitter. ,并且处于逻辑低状态。当总线为隐性
transmitter is normally called the driver in
The VCC should be powered with 3.3 V or 5 V, depending
显性总线状态期间端接电阻差分电压的产生需要
on the transceiver type used. Believe it or not, there have
时 ,a在 CAN.
接收 The节点 CAN, physical
其CAN标 layer
准定is biased
义的差 with
分电 a common-
压 ( V d i ff
这 50mA 的电流差,并且其随总线负载变化而变 mode point of VCC /2, or approximately 2.5 V (Figure 4).
been several cases where a missing VCC was the root cause
化。
of theDMMproblem. 还可用在电流模式下,以验证预计
Therefore, it should be ensured that I CCthe

CC is present atCAN
V源电流。由于 the transceiver’s
的开关性质, VCCDMM
pin. A测得的电流
simple check Figure
图4 简易 4. Simplified
CAN总线收发器 CAN bus transceiver
with
伪平均读取值。a DMM will confirm that power supplies are present.
Care must be taken not to short the supply to ground, Driver (Transmitter)
which unfortunately is a pin next to
建议本地旁路电容器至少应为 4.7µF CC pin.
the V,以确保总线 VCC
There is approximately a 50-mA difference in current
状态转换期间有足够的电源缓冲。否则,收发器
(ICC) needed between the dominant state (~60 mA with a
的突入电流可能会引起明显的电压电源纹波。我
60-W bus load) and the recessive state (10 mA). This
们可以使用一个示波器来验证电源电压是稳定,
50-mA difference is needed to generate the differential
voltage across the termination resistance during the domi-
还是随着总线状态变化而变化。转换期间,最好 CANH
TXD
nant bus state
不要让收发器“饥饿”。收发器受到其限流的保and varies with bus loading. The DMM also CANL
may be used in current mode to verify the expected ICC
护,但是,当收发器试图驱动总线至显性状态
supply currents. Due to the switching nature of CAN, cur-
时,如果其中一条总线短路至电源或者接地,则
rent measured with a DMM is a pseudo-average reading.
A local bypass capacitor of at least 4.7 µF is recom-
电源电流极高。如果电压调节器无法提供这么多
mended to ensure adequate supply buffering during the
的电流,则电压电平降至收发器规格范围以下,
bus-state transitions. Otherwise, there may be significant Receiver with Common-Mode Bias
甚至可能会低至触发收发器的欠压锁定状态。
voltage-supply ripple caused by the inrush current of the CANH
transceiver. An oscilloscope can be used to verify whether
the supply voltage is stable or varying with the bus state. VCC /2 RXD
It would be undesirable to “starve” the transceiver during
the transitions. The transceiver will be protected by its CANL
current limiting, but the supply current will be significantly
20

High-Performance Analog Products www.ti.com/aaj 3Q, 2013 Analog Applications Journal


Texas Instruments Incorporated Interface (Data Transmission)

(R)The
)为 -120mV ≤translates
transceiver (V diff(R)) ≤ 12
the mV single-ended
,并且处于逻辑高状 digital logic
Figure
图5 CAN5. CAN bus states
总线状态
signals, TXD (or D)
态。两种总线状态均通过收发器内共模网络偏置。图 and RXD (or R), to the levels required
by the differential CAN bus. When the bus is dominant, it
5 显示了典型的总线层级。
has a differential voltage (Vdiff(D)) defined by the CAN
standard
对 总 线 进of行>1.2 调试 V时 at ,the最receiving
为有用的 nodes
工 具and 之一 is in
便a是logic-
示波 4

Typical Bus Voltage (V)


low state. When the bus is recessive, it has a differential CANH
器。尽管单通道示波器便可看到信号,但最好还是
voltage (Vdiff(R)) defined by the CAN standard of –120 mV
用 双diff(R)
≤ (V 或者 )四 通mV
≤ 12 道。 at理 the想receiving
情况下, 可 同and
nodes 时看 in Ta Xlogic-
is 到 D、 3

high state. Both of these


RXD 、 CANH 和 CANL ,以确保收发器和总线性能如 bus states are biased via the Vdiff(D)
common-mode network in the transceiver. The typical bus
预期。进行初次调试时,只需一个低带宽示波器,因 2
levels are shown in Figure 5. Vdiff(R)
为标准 CANthe
To debug bus, one1Mbps
被限定在 。(在不远的将来,在
of the most useful tools is an
CANL
1
引入拥有灵活数据速率的
oscilloscope. While a single-channel CAN 以后,这种情况将有所
scope allows the sig-
nals to be seen, a dual- or quad-channel scope is the best.
改变。)如果该节点正发送数据比特流,则可在 TXD
Ideally, TXD, RXD, CANH,
输入端看到输入数据。差分 CAN 总线引脚( CANH/ and CANL can be seen at the Time, t
Recessive Dominant Recessive
same time to ensure that the transceiver and bus are Logic H Logic L Logic H
CANL
behaving )存在传输延迟,同时还存在
as expected with respect to each RXD 输出传输延
other. For the
迟。在 CAN 中,这些延迟均为循环时间,或者说循环
initial debugging, a low-bandwidth scope is all that is
needed, since the CAN is limited to 1TXD
延迟。如果该节点正在接收,则 Mbps in the stan-
闲置;但是总线
dard. (In the
和RXD输出会显示 CAN 帧。 near future this may change, with the intro- Figure
图6 两个 6. Debugging
EVM的CANon a CAN bus of two EVMs
总线调试
duction of a CAN with flexible data rates.) If the node is
transmitting theCAN
为了演示基础 bitstream
总线工作情况,图 of data, the input data can be
6 显示了一个示
seen on the TXD input.
波器,它拥有两个模拟通道和两个数字通道,以及一 There is a propagation delay to
the differential CAN bus pins (CANH/CANL), followed by
个函数生成器。
another propagation CAN 总线由两个
delay to the RXD SN65HVD255D
output. These EVM
delays are the loop time, or loop delay, in 120
组成,每个在总线上的端接电阻均为 a CAN.Ω。示波器If the
node is receiving,
函数生成器连接至顶部EVM的TXD输入引脚。 then TXD will be idle; but the bus and 图7
RXD output will show
中,数字通道 1 显示了 CANH 信号(蓝色);模拟通道 the CAN frame.
To demonstrate basic CAN-bus operation, Figure 6
2 显示了
shows anCANL 信号(黄色);数字通道
oscilloscope with two analog channels 2 显示了and two RXD
信号(绿色)。尽管该示波器的精确度很低,但这个
digital channels, plus a function generator. The CAN bus is
made up of two SN65HVD255D
简单的测试表明,该 EVMs, each with 120-W
CAN 物理层的表现在总体上符合
termination
我们的预期。 set on the bus. The function generator from
the scope is connected to the TXD input pin of the top
EVM. In Figure 7, digital channel 1 shows the TXD input
(light purple); analog channel 1 shows the CANH signal
(blue); analog channel 2 shows the CANL signal (yellow);
and digital channel 2 shows the RXD signal (green). While

Figure
图7 TI7.CAN
TI CAN
EVMEVM
信号signals

21

Analog Applications Journal 3Q, 2013 www.ti.com/aaj High-Performance Analog Products


Interface (Data Transmission) Texas Instruments Incorporated

the
图 8accuracy
显示了该示波器和用于调试of this scope is very low, TI itCAN 演 Figure
图8 TI 8.
CANDebugging
演示系统调试 on the TI CAN demonstration system
appears from this
示系统的探针装置。该节点使用菊形链, simple test that in general
the CAN physical layer is behaving as expected.
并使用FigureCANopen® D-SUB 9 针连接器。一
8 shows the oscilloscope and probe
set up to debug on the TI位CAN
个 总 线 外 接 头 连 接 器 8左上方。利
于 图demonstration
system. The nodes are set up in a daisy chain
用它,我们可以轻松地连接模拟示波器探
that ® D-SUB 9-pin connectors.
针至 CANCANopen
uses 总线的 CANH 和 CANL 引脚以及
A bus breakout connector is in the upper left
GND 。由于探针过大,无法抓住中间
portion of Figure 8. It is used to easily connect CAN
节点的
the analogTXD 和 RXD
scope IC 引脚,因此可通过连
probes to the CANH and
CANL pins of the CAN bus and to GND.
接至探针的芯片钩和一小段电缆,将这些
Because the probes are too large to grab the
引脚连接至示波器的数字通道。另一种方
TXD and RXD IC pins of the middle CAN node,
法是,给每个收发器焊接一小段线,这样
these pins are connected to the digital channels
示波器探针便可更容易地连接。
of the scope with chip hooks and a short cable
going to the probes. Another option is to solder
图 9显示
a small 了示
wire to 波 器获
each 得 的 C A pin
transceiver N 信so号the详细情
况。尽
scope 管 这may
probe 些信 be号 的分
more 辨 率attached.
easily 和精度均不
Figure 9 shows
高,但它们可以帮助确定需要了解 the CAN signals in moreCAN 节
detail as captured by the scope. While these
点工作的那些信息。中间节点的 TXD 触发 Figure
图9 TI 9.
CANTI CAN demonstration system’s signals
演示系统的信号
signals are not high in resolution or accuracy,
了示波器;
they CANH 和
help determine CANL
what 信号差异符合预
needs to be known
about the
期;在 CANoperating CAN nodes. The scope
构架端可清楚地看到高差分电
was triggered on TXD
压的收到确认( ACKof)位。该高压为同时
the middle node; the
CANH and CANL signals are differential as
并行产生 ACK 位的多个 CAN 节点的结果。
expected; and the acknowledge (ACK) bit with
轻松找出
the higher ACK 位的另一个方法是其存在于
differential voltage is clearly visible
RXD
at the信号中而非
end of the CAN TXDframe. This higher volt-
信号中,这意味着它
age is the
由另一些节点产生。 result of multiple CAN nodes gener-
ating this ACK bit at the same time in parallel.
Another
CAN调试例子 way to easily identify the ACK bit is
that it is visible in the RXD signal but not in the
图 10signal,
TXD 显示了一个 which CANmeans演示系统,在
it was generated PCB
by右
the CANH 线路被损
other nodes as it should be.
边,连接至菊形链输出的
坏。出现这种情况的原因是,系统后面的
CAN debugging examples
一个固定螺栓摩擦
Figure 10 shows a CANPCB ,而在几年的时间
demonstration system
where the CANH trace leading to the daisy-
里该系统被运输至世界各地。当系统通过
chain output has been broken on
菊形链总线接口连接至其他 the 节点时,
CAN righthand
PCB. This occurred because a mounting bolt on Figure 10. CAN demonstration system with broken
便故障无法工作。 图10 带有损坏 CANH线路的CAN演示系统
the rear of this system had rubbed against the CANH trace
PCB while the system was being carried around
the world over a number of years. When this
system was connected to other CAN nodes via
this daisy-chain bus connection, it didn’t work.

22

High-Performance Analog Products www.ti.com/aaj 3Q, 2013 Analog Applications Journal


Texas Instruments Incorporated Interface (Data Transmission)

图 11 所示 CANH 信号表明了该损坏 PCB 线路的效果。另 符内保持显性,则其可能引起CAN误差帧。


The CANH signal in Figure 11 shows the result of this differential voltage resulting from two nodes transmitting
外,DMM
broken PCB连续性检查也可证实该开路。
trace. A DMM continuity check also confirmed an ACK bit concurrently. If these factors cause the ACK
CAN 总线调试的另一个例子是,在某个系统中,只有
the open circuit. bit (slot) to become too long and to remain dominant in
图 11 还突出详细显示了 CAN 帧的另一个重要部分,即 非常慢的 CAN 数据速率(比特计时)才会起作用。把
Figure 11 also highlights in detail another important the ACK delimiter, it may cause a CAN error frame.
ACKof
part 位。示波器使用单一模式,在某个单比特发现触发
the CAN frame, the ACK bit. The scope was used 一个示波器连接至
Another example of TXD
CAN 引脚,在 TXD 输入端显示出非
bus debugging was a system
in single mode and triggered
器时,其在右手节点的 TXDon the TXD pin of the right-
引脚上被触发。该单比特为 where only very slow CAN12
常慢的上升时间,如图 data
所示。rates1Mbps 的 CAN
(bit timings) would
数据
hand
这一节点产生的node until a ACK
trigger on a single bit was found. This
位,目的是确认接收到一个有效的 work. Connecting
速率下, 9.6µs an oscilloscope
计时延迟相当于 to the
10 TXD
比特。它的根本原pin showed
single bit is the ACK bit generated by this node to acknowl- very slow rise times on the TXD input (Figure 12). The
CAN 帧。所有接收节点确认收到发送节点的 CAN 帧。
edge that a valid CAN frame was received. All receiving
因是:我们正使用一个具有开路漏极的微处理器来驱
9.6-µs timing delay was equivalent to 10 bits at a CAN data
nodes TXD 上看到的发送
相比在acknowledge the CANACK 位,总线上所看到的
frame ACK
from the sending node. 动收发器的 TXD
rate of 1 Mbps. 引脚。在这种情况下,没有真正的逻
This discovery led to the root cause: A
The ACK bit seen on the bus has a slightly
位的位时间稍长。这是同时发送 longer bit time
ACK 位的多个节点的假 microprocessor with anCAN
辑高电平驱动。仅有 open收发器的弱内部上拉正驱动
drain was being used to drive
than the transmitted ACK bit seen on TXD. This is an arti-
象。影响这种长位时间的一些因素包括:通过线缆的 the transceiver’s TXD pin.
TXD 引脚高,因此它的 RC 时间常量非常长。通过在 In this case there was no real
fact of the multiple nodes transmitting ACK bits at the drive to the logic-high level. Only the weak internal pull-
5ns/m
same
延迟、三个 CAN 节点之间的时钟计时漂移以及同
time. Factors affecting this longer bit time are a TXD 引脚上添加一个上拉电阻器,便可轻松解决这个
up of the CAN transceiver was bringing the TXD pin high,
时发送一个
5-ns/m delayACK 位的两个节点所产生的高差分电压。如
through the cabling; clock timing drift 问题。
so it had a very long RC time constant. This problem was
between
果这些因素使 the three
ACKCAN nodes; and the higher bus ACK 分隔
位(空档)变得更长,并在 easily solved by adding a pull-up resistor on the TXD pin.

图11 PCB
Figure 上CANH
11. TI CAN signals
线路遭损坏的 TI CANCANH
with broken 信号 trace on PCB

Figure 12. Example


图12 TXD with slow rise time on TXD pin
引脚上慢上升时间例子

Slow rise time causes


9.6-µs timing delay

23

Analog Applications Journal 3Q, 2013 www.ti.com/aaj High-Performance Analog Products


Interface (Data Transmission) Texas Instruments Incorporated

Conclusion
结论 5. Steve
5 、《 CANCorrigan,
总线连接的关键间隔》“Critical spacing
,作者 of CAN bus Corrigan
: Steve connec- ,
The basics of the CAN physical layer and the debugging tions,” Application Report. Available: www.ti.com/
刊发于《应用报告》,
本文介绍的
examples CAN 物理层基础和调试举例,应该让
presented in this article should ease any fear of slla279-aaj
网址: www.ti.com/ slla279-aaj
jumping into the CANCAN
您不那么惧怕进入 世界了吧。利用本文提供
world. With the additional references 6. Sam Broyles, “A system evaluation of CAN transceivers,”
provided here and the appropriate datasheets, designers
的其他一些参考资料以及相应的数据表,设计人员 6、《 Application Report. Available: www.ti.com/slla109-aaj
CAN收发器的系统评估》,作者 : Sam Broyles,
should have their CAN systems up and running in no time.
应该可以马上让其 CAN 系统正常运行了。 Related Web sites
刊发于《应用报告》,
References Interface
网址:(Data Transmission):
www.ti.com/slla109-aaj
参考文献
1. SN65HVD255D Evaluation Module, Texas Instruments. www.ti.com/interface-aaj
相关网站
1、 TI SN65HVD255D
Available: 评估模块,
www.ti.com/sn65hvd255devm-aaj www.ti.com/can-aaj
2. Steve
网址: Corrigan, “Introduction to the controller area
www.ti.com/sn65hvd255devm-aaj www.ti.com/sn65hvd255-aaj
接口(数据传输):
network (CAN),” Application Report, Section 5.1.13. www.can-cia.org
www.ti.com/interface-aaj
2、“控制器局域网( CAN)介绍”作者: Steve Corrigan
Available: www.ti.com/sloa101-aaj ISO standards are available for purchase at www.iso.org
www.ti.com/can-aaj
见于《应用报告》
3. Steve 5.1.13
Corrigan, “Controller 小节,
area network physical layer Subscribe to the AAJ:
requirements,” Application
网址:www.ti.com/sloa101-aaj Report. Available: www.ti.com/sn65hvd255-aaj
www.ti.com/subscribe-aaj
www.ti.com/slla270-aaj www.can-cia.org
3、
4. Jason Blackman and Scott Monroe, “Overview: of
《控制器局域网物理层要求》,作者 Steve
3.3V 购买ISO 标准,网址:www.iso.org
CAN (controller
Corrigan area network) transceivers,”
,刊发于《应用报告》, 订阅《模拟应用杂志》:
Application Report. Available: www.ti.com/slla337-aaj
网址: www.ti.com/slla270-aaj www.ti.com/subscribe-aaj
4、《3.3V CAN (控制器局域网)收发器概述》,
作者 : Jason Blackman 和 Scott Monroe ,刊
发于《应用报告》,
网址:www.ti.com/slla337-aaj

24

High-Performance Analog Products www.ti.com/aaj 3Q, 2013 Analog Applications Journal


®
WEBENCH 设计中心: 易于使用且可提供定制结果的设计工具。 www.ti.com.cn/webench
PowerLab™参考设计库, 包含了近千个适用于所有应用的参考设计。 www.ti.com.cn/powerlab
电源在线培训课程 www.ti.com.cn/powertraining

WEBENCH® Designer WEBENCH® Designer

Power FPGA/μP Sensors LED Power FPGA/μP Sensors LED

Enter your power supply requirements: FPGA Power Processor Power


Min Max All All
Vin 14.0 V 22.0 V Actel Atmel
Vout Iout Altera Freescale
Output 3.3 V 2.0 A Lattice TI
30 Xilinx
Ambient Temp °C

Multiple Loads Single Output 开 始 设 计


Multiple Loads Multiple Loads
Power Architect Start Design FPGA Architect μP Architect

从通讯、计算机、消费类电子到汽车、工业,从能源、医疗到安防、航
空航天,TI推出一系列创新、完整、独特的制胜解决方案,给您带来前
所未有的技术支持体验。http://www.ti.com.cn/ww/more/ 扫二维码
了解更多!

德州仪器在线技术支持社区 www.deyisupport.com
中国产品信息中心 免费热线: 800-820-8682

TI新浪微博 e.weibo.com/tisemi

热门产品
TPS92075 具有自适应基准的非隔离式、相位可调光、降压 PFC LED 驱动器
BQ24195 具有 5.1V 1A/2.1A 同步升压运行的由 I2C 控制的 2.5A/4.5A 单电池 了解更多,请搜索以下产品型号:
LM3447 相位调光、初级侧电源调整的准谐振反激式控制器
TPS92075
LM34917 具有智能电流限制的超小型 33V、1.25A 恒准时降压开关稳压器
ADS1298 具有集成 ECG 前端的 8 通道 24 位模数转换器
SN65HVD82 针对要求严格的工业类应用的稳健耐用的驱动器和发送器
LM22670 具有同步或可调节开关频率的 3A SIMPLE SWITCHER、降压电压稳压器
ISO1050 电镀隔离的隔离式 CAN 收发器

ZHCT231
重要声明
德州仪器(TI) 及其下属子公司有权根据 JESD46 最新标准, 对所提供的产品和服务进行更正、修改、增强、改进或其它更改, 并有权根据
JESD48 最新标准中止提供任何产品和服务。客户在下订单前应获取最新的相关信息, 并验证这些信息是否完整且是最新的。所有产品的销售
都遵循在订单确认时所提供的TI 销售条款与条件。
TI 保证其所销售的组件的性能符合产品销售时 TI 半导体产品销售条件与条款的适用规范。仅在 TI 保证的范围内,且 TI 认为 有必要时才会使
用测试或其它质量控制技术。除非适用法律做出了硬性规定,否则没有必要对每种组件的所有参数进行测试。
TI 对应用帮助或客户产品设计不承担任何义务。客户应对其使用 TI 组件的产品和应用自行负责。为尽量减小与客户产品和应 用相关的风险,
客户应提供充分的设计与操作安全措施。
TI 不对任何 TI 专利权、版权、屏蔽作品权或其它与使用了 TI 组件或服务的组合设备、机器或流程相关的 TI 知识产权中授予 的直接或隐含权
限作出任何保证或解释。TI 所发布的与第三方产品或服务有关的信息,不能构成从 TI 获得使用这些产品或服 务的许可、授权、或认可。使用
此类信息可能需要获得第三方的专利权或其它知识产权方面的许可,或是 TI 的专利权或其它 知识产权方面的许可。
对于 TI 的产品手册或数据表中 TI 信息的重要部分,仅在没有对内容进行任何篡改且带有相关授权、条件、限制和声明的情况 下才允许进行
复制。TI 对此类篡改过的文件不承担任何责任或义务。复制第三方的信息可能需要服从额外的限制条件。
在转售 TI 组件或服务时,如果对该组件或服务参数的陈述与 TI 标明的参数相比存在差异或虚假成分,则会失去相关 TI 组件 或服务的所有明
示或暗示授权,且这是不正当的、欺诈性商业行为。TI 对任何此类虚假陈述均不承担任何责任或义务。
客户认可并同意,尽管任何应用相关信息或支持仍可能由 TI 提供,但他们将独力负责满足与其产品及在其应用中使用 TI 产品 相关的所有法
律、法规和安全相关要求。客户声明并同意,他们具备制定与实施安全措施所需的全部专业技术和知识,可预见 故障的危险后果、监测故障
及其后果、降低有可能造成人身伤害的故障的发生机率并采取适当的补救措施。客户将全额赔偿因 在此类安全关键应用中使用任何 TI 组件而
对 TI 及其代理造成的任何损失。
在某些场合中,为了推进安全相关应用有可能对 TI 组件进行特别的促销。TI 的目标是利用此类组件帮助客户设计和创立其特 有的可满足适用
的功能安全性标准和要求的终端产品解决方案。尽管如此,此类组件仍然服从这些条款。
TI 组件未获得用于 FDA Class III(或类似的生命攸关医疗设备)的授权许可,除非各方授权官员已经达成了专门管控此类使 用的特别协议。
只有那些 TI 特别注明属于军用等级或“增强型塑料”的 TI 组件才是设计或专门用于军事/航空应用或环境的。购买者认可并同 意,对并非指定面
向军事或航空航天用途的 TI 组件进行军事或航空航天方面的应用,其风险由客户单独承担,并且由客户独 力负责满足与此类使用相关的所有
法律和法规要求。
TI 已明确指定符合 ISO/TS16949 要求的产品,这些产品主要用于汽车。在任何情况下,因使用非指定产品而无法达到 ISO/TS16949 要
求,TI不承担任何责任。
产品 应用
数字音频 www.ti.com.cn/audio 通信与电信 www.ti.com.cn/telecom
放大器和线性器件 www.ti.com.cn/amplifiers 计算机及周边 www.ti.com.cn/computer
数据转换器 www.ti.com.cn/dataconverters 消费电子 www.ti.com/consumer-apps
DLP® 产品 www.dlp.com 能源 www.ti.com/energy
DSP - 数字信号处理器 www.ti.com.cn/dsp 工业应用 www.ti.com.cn/industrial
时钟和计时器 www.ti.com.cn/clockandtimers 医疗电子 www.ti.com.cn/medical
接口 www.ti.com.cn/interface 安防应用 www.ti.com.cn/security
逻辑 www.ti.com.cn/logic 汽车电子 www.ti.com.cn/automotive
电源管理 www.ti.com.cn/power 视频和影像 www.ti.com.cn/video
微控制器 (MCU) www.ti.com.cn/microcontrollers
RFID 系统 www.ti.com.cn/rfidsys
OMAP应用处理器 www.ti.com/omap
无线连通性 www.ti.com.cn/wirelessconnectivity 德州仪器在线技术支持社区 www.deyisupport.com

IMPORTANT NOTICE

邮寄地址: 上海市浦东新区世纪大道 1568 号,中建大厦 32 楼 邮政编码: 200122


Copyright © 2013 德州仪器 半导体技术(上海)有限公司

You might also like