配色: 字号:
TI CAN硬件基础知识
2024-04-27 | 阅:  转:  |  分享 
  
Interface (Data Transmission) Texas Instruments Incorporated
控制器局域网( )物理层调试基础知识
Basics of debugging the controller area CAN
作者: ,德州仪器 工业接口系统工程师
Scott Monroe (TI)
network (CAN) physical layer
引言 精度和更复杂的工具。这种问题已非本文讨论的范
By Scott Monroe
Systems Engineer for Industrial Interface 畴,但是这里介绍的基础知识可帮助确定问题所属类
控制器局域网( )标准不断发展,正用于车载
CAN
别,以及进一步调试所需的其他工具。一个由 组
supply. If the investigation leads to detailed problems, TI
Introduction
和工业网络之外的许多新应用。支持它的微处理器变
higher accuracy and more complex tools may be required.
装的 演示系统以及 的 评估模块
The controller area network (CAN) standard continues to CAN TI SN65NVD255D
得普遍且价格低廉,并且开源协议栈让其非常容易访
Problems at that level are outside the scope of this article,
1
grow and is being adapted into many new applications
( ) ,用于演示硬件。另外,我们还使用了其
EVM
问,同时也容易添加至新系统。有许多 板可用于
CAN but the basics introduced here will help identify areas of
outside of automotive and industrial networking. Micro-
他一些东西,例如: 连接器外接头电缆和芯片钩
CAN
concern and what additional tools will be required for fur-
、 、
processors supporting it have become prevalent at low BeagleBone (Capes) Stellaris? (BoosterPacks)
(抓住收发器引脚,让其连接至电缆,以更加容易地 ther debugging. A CAN demonstration system assembled
cost, and open-source protocol stacks make it very acces-
和其他微处理器开发平台。当设计
Arduino (Shields)
by Texas Instruments (TI) and TI’s SN65HVD255D evalua-
连接示波器指针,如图 所示)。
sible and easy to add to new systems. There are CAN 1
人员的系统上电却不能工作时,应该怎么办呢?本文 1
tion module (EVM) are used for the demonstration hard-
?
boards for BeagleBone (Capes), Stellaris (BoosterPacks),
为您介绍一种对 物理层进行调试的较好工程方 连接检查 ware. A few other helpful items are also used, such as a
CAN
Arduino (Shields), and many other microprocessor devel-
CAN connector breakout cable and chip hooks to grab the
op 法。我们将介绍基础调试步骤,并说明一个 ment platforms. When a designer’s system is powered 物理
CAN
开始调试对话时,使用 确认印刷电路板( )
DMM PCB
transceiver pins and bring them to a cable for easy attach-
up and doesn’t work, then what? This article presents a
层应有的性能,以及找出问题的一些小技巧。
上连接如我们所预计的那样—系统未上电。这看似很 ment to an oscilloscope probe (Figure 1).
sound engineering approach to debugging the CAN physi-
cal layer. Basic debugging steps are provided, along with Checking the connections
调试基础知识 基础,但令人吃惊的是,这个简单的方法却解决了许
To begin the debugging session, a DMM is used to make
discussion of the expected behavior of a CAN physical
多简单问题。所有人都会认为原理图、布局和制造工
和 规范详细说明了高速
ISO11898-2 ISO11898-5 CAN
layer and tips to help pinpoint the trouble. sure the connections on the printed circuit board (PCB)
艺没有问题,但不幸的是,它们有时却并不如人愿。
are as expected—while the system is unpowered. This
物理层即收发器。掌握 物理层的基础知识以后,
CAN
Debugging basics
子插件板位置错误、虚焊和错误端接或者连接的电
seems very basic, but it is amazing how many simple prob-
利用简单的调试工具便可迅速地找出常见问题。所需
The ISO11898-2 and ISO11898-5 specifications provide
lems have been solved with this technique. Everyone
缆,都是一些常见问题。利用 电阻设置来确认所
DMM
的基本实验室工具为示波镜、数字万用表( )
DMM
details for the high-speed CAN physical layer or trans-
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. Basic tools for debugging the CAN physical layer 图 物理层调试基本工具
1 CAN
18
Analog Applications Journal
High-Performance Analog Products www.ti.com/aaj 3Q, 2013Texas Instruments Incorporated Interface (Data Transmission)
make sure all the traces and connections are properly limiting series resistors, bus-termination resistors, or pull-
表 列举了需要检查的 和网络连接。收发器引脚和 屏蔽层),其特性阻抗( )为 Ω。应使用与线路
1 PCB Z 120
0
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
用表注里介绍的一些选项。例如,限流串联电阻器、 反射。端接可以为电缆上总线端的单 Ω电阻器,
120
The PCB and network connections to check are summa-
Most CAN standards specify a single twisted-pair cable
总线端接电阻器或者数字 rized in Table 1. The expected resistance between the pins 的上拉或下拉电阻器。 如图 中 总线左侧所示;或者,它也可以位于某
I/O 3 CAN
(shielded or unshielded) with 120- W characteristic imped-
on the transceiver and the relevant other connections on
个端接节点内,如图 ance (Z ). Resistors equal to the characteristic impedance 右侧所示。不得将端接电阻从
3
O
总线端接检查
the PCB is 0 W, unless the design uses some of the options
of the line should be used to terminate both ends of the
总线移除。如果 端接电阻负载不存在,则信号完
CAN
outlined in the table comments. Examples include current-
cable to prevent signal reflections. Termination may be a
大多数 标准均规定使用一条单双绞线(有或者无
CAN
整性会受到影响,并且无法满足比特计时要求。如果
表 和 收发器连接总结
1 PCB CAN
Table 1. Summary of PCB and CAN transceiver connections
CONNECTION COMMENTS
Ground The transceiver GND should be connected to the PCB ground plane .
The V on the transceiver should be connected to the voltage regulator’s output . One should be careful in multirail
CC
Power Supply (V , V , V ) designs: The V of the transceiver may be 5 V or 3 .3 V, depending on the CAN transceiver family . Some 5-V CAN
CC IO RXD CC
transceivers have an I/O level-shifting pin (V or V ) .
IO RXD
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 V if an open-drain output on a microprocessor is used .
CC
Receive Data (RXD or R) If a current-limiting series resistor is used, that is the expected resistance value .
R , S, STB, EN, AB, or LBK may be available, depending on the specific CAN transceiver . R provides three modes
S S
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 V /2 output reference . It may be floating, connected by a bypass capacitor to
CC
V or SPLIT pin
REF
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
V
IN
V
V
OUT
IN
Bus Transceiver
Termination: Protection
5-V Voltage
V Function
Optional
CC
Regulator
on PCB
CANH
V 3
CC
S 7
Port x
8
SN65HVD256
Optional
3-V MCU
CAN
Pull-down
Transceiver
V
V
OUT
IN RXD
4
RXD
TXD CANL
6
3-V Voltage 1
TXD
5 2
Regulator
V
RXD GND
Optional
Pull-up
19
Analog Applications Journal
3Q, 2013 www.ti.com/aaj High-Performance Analog ProductsInterface (Data Transmission) Texas Instruments Incorporated
总线共模电压滤波和稳压理
single 120-W resistor at the end
图 典型 总线
Figure 3. T 3 CAN ypical 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
Node n
均为 Ω,而分裂电容器范
60
)
terminating node, as shown on (with termination
围为 到 ,具体取
1 nF 100 nF
the right side of Figure 3. The
Node 1 Node 2 Node 3 MCU or DSP
termination resist 决于共模滤波器所需的频率。 anc e should
CAN
MCU or DSP MCU or DSP MCU or DSP
2
not be removed from the bus. If
到 的测得电阻应 Controller
CANH CANL
the resistive load of the CAN CAN CAN CAN
介于 Ω到 Ω之间,以达
45 65 Controller Controller Controller
termination is not present, signal
CAN
到 标准、两个端接电阻
CAN Transceiver
integrity will be compromised
CAN CAN CAN
and the bit timing will not be R
器的并联阻抗以及并联节点输
TERM
Transceiver Transceiver Transceiver
met. If filtering and stabilization
入电阻的容差。应根据可能碰
of the bus’s common-mode volt-
到的极端故障状态(通常为系
age is desired, split termination
R
TERM
统接地的电源电压)来确定端
may be used as in Figure 2. In
this figure, each resistor is 60 W,
接电阻器的额定功率。
and the split capacitor may be
电源检查
anywhere from 1 nF to 100 nF,
higher if one of the bus lines is shorted to a supply or
depending on the frequency desired for the common-mode
在系统上电以前,应首先检查 收发器的一个 物理层基础知识
CAN CAN
2
filter. The measured resistanc e from CANH to CANL ground when the transceiver is trying to drive the bus
或者多个电源。根据所使用的收发器类型,
V
should be between 45 and 65 W to account for the toler CC - to a dominant state. If the voltage regulator cannot supply
一旦完成所有基础检查,就可以检查 物理层的核心
CAN
ances within the CAN standard, the parallel impedance of 应为 或者 。不管您相不相信,在一些情况 that amount of current, the voltage level may drop out of
3.3V 5V
总线了。收发器的两个关键组件便是接收器和发射
CAN
the two termination resistors, and the input resistanc e of the transceiver’s specification range, or may even be low
下,丢失 确实为问题的根本原因。因此,我们
V
CC
器。发射器被称作 的驱动器。通过 共模点(约
CAN V /2
enough to trip an undervoltage lockout condition on the CC
many nodes in parallel. The power rating of the termina-
应确保 存在于收发器的 引脚上。只需检查
V V
CC CC
tion resistors should be sized according to the worst-case transceiver )对 . 物理层偏置,见图 。
2.5V CAN 4
,便可确认有电源存在。必须注意电源短路
DMM
fault conditions they may encounter, usually the power-
CAN physical-layer basics
发收器将单端数字逻辑信号、 (或者 )和 (或
TXD D RXD
supply voltage of the system to ground.
接地(不幸的是,该引脚就在 引脚的旁边)。
V
CC
Once all the basics have been checked, the heart of the
者 )转换为差分 总线所要求的电平。当总线为显
R CAN
Checking the power supply
显性状态( Ω总线负载时约为 )和隐性状 CAN physical layer—the CAN bus—can be examined. The
60 60mA
Before the system is powered up, the power supply (or 性时,在接收节点,其 标准定义的差分电压(
CAN V
diff
transceiver’s two key components are the receiver and the
态( )之间所需电流( )差约为 。
supplies) to the CAN transceiver should first be checked. 10mA I 50mA
CC
)大于 ,并且处于逻辑低状态。当总线为隐性
1.2V
( )
D transmitter. The transmitter is normally called the driver in
The V should be powered with 3.3 V or 5 V, depending
显性总线状态期间端接电阻差分电压的产生需要
CC
时,在 a CAN. The CAN physical layer is biased with a common- 接收节点,其 标准定义的差分电压(
CAN V
diff
on the transceiver type used. Believe it or not, there have
这 的电流差,并且其随总线负载变化而变
50mA mode point of V /2, or approximately 2.5 V (Figure 4).
CC
been several cases where a missing V was the root cause
CC
化。 还可用在电流模式下,以验证预计 电
DMM I
CC
of the problem. Therefore, it should be ensured that the
V 源电流 is present at the transceiver’ 。由于 的开关性质 s V , pin. A simple check 测得的电流 Figure 4. Simplified CAN bus transceiver 图 简易 总线收发器
CAN DMM 4 CAN
CC CC
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 the V 建议本地旁路电容器至少应为 ,以确保总线 pin.
4.7μF
CC
V
CC
There is approximately a 50-mA difference in current
状态转换期间有足够的电源缓冲。否则,收发器
(I ) needed between the dominant state (~60 mA with a
CC
的突入电流可能会引起明显的电压电源纹波。我
60-W bus load) and the recessive state (10 mA). This
们可以使用一个示波器来验证电源电压是稳定,
50-mA difference is needed to generate the differential
CANH
voltage across the termination resistance during the domi-
还是随着总线状态变化而变化。转换期间,最好
TXD
CANL
nant bus state and varies with bus loading. The DMM also
不要让收发器“饥饿”。收发器受到其限流的保
may be used in current mode to verify the expected I
CC
护,但是,当收发器试图驱动总线至显性状态
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.
V /2
RXD
CC
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 JournalTexas Instruments Incorporated Interface (Data Transmission)
The transceiver translates the single-ended digital logic )为 ,并且处于逻辑高状
-120mV ≤(V ) ≤ 12 mV
( )
R diff(R)
Figure 5. CAN bus states 图 总线状态
5 CAN
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 (V ) defined by the CAN
diff(D)
standard of >1.2 V at the receiving nodes and is in a logic-
对总线进行调试时,最为有用的工具之一便是示波 4
low state. When the bus is recessive, it has a differential
CANH
器。尽管单通道示波器便可看到信号,但最好还是
voltage (V ) defined by the CAN standard of –120 mV
diff(R)
3
用双或者四通道。理想情况下,可同时看到 、
TXD
≤ (V ) ≤ 12 mV at the receiving nodes and is in a logic-
diff(R)
V
diff(D)
high state. Both of these bus states are biased via the
、 和 ,以确保收发器和总线性能如
RXD CANH CANL
common-mode network in the transceiver. The typical bus 2
预期。进行初次调试时,只需一个低带宽示波器,因
V
( )
levels are shown in Figure 5. diff R
CANL
为标准 被限定在 。(在不远的将来,在
CAN 1Mbps
To debug the bus, one of the most useful tools is an
1
引入拥有灵活数据速率的 以后,这种情况将有所
CAN
oscilloscope. While a single-channel scope allows the sig-
nals to be seen, a dual- or quad-channel scope is the best.
改变。)如果该节点正发送数据比特流,则可在
TXD
Time, t
Ideally, TXD, RXD, CANH, and CANL can be seen at the
输入端看到输入数据。差分 总线引脚(
CAN CANH/
Recessive Dominant Recessive
same time to ensure that the transceiver and bus are
Logic H Logic L Logic H
)存在传输延迟,同时还存在 输出传输延
CANL RXD
behaving as expected with respect to each other. For the
迟。在 中,这些延迟均为循环时间,或者说循环
CAN
initial debugging, a low-bandwidth scope is all that is
needed, since the CAN is limited to 1 Mbps in the stan-
延迟。如果该节点正在接收,则 闲置;但是总线
TXD
dard. (In the near future this may change, with the intro-
和 输出会显示 帧。 Figure 6. Debugging on a CAN bus of two EVMs 图 两个 的 总线调试
RXD CAN 6 EVM CAN
duction of a CAN with flexible data rates.) If the node is
transmitting the bitstream of data, the input data can be
为了演示基础 总线工作情况,图 显示了一个示
CAN 6
seen on the TXD input. There is a propagation delay to
波器,它拥有两个模拟通道和两个数字通道,以及一
the differential CAN bus pins (CANH/CANL), followed by
个函数生成器。 总线由两个
CAN SN65HVD255D EVM
another propagation delay to the RXD output. These
组成,每个在总线上的端接电阻均为 Ω。示波器
delays are the loop time, or loop delay, in a CAN. If the 120
node is receiving, then TXD will be idle; but the bus and
函数生成器连接至顶部 的 输入引脚。图
EVM TXD 7
RXD output will show the CAN frame.
中,数字通道 显示了 信号(蓝色);模拟通道
1 CANH
To demonstrate basic CAN-bus operation, Figure 6
显示了 信号(黄色);数字通道 显示了
2 CANL 2 RXD
shows an oscilloscope with two analog channels and two
信号(绿色)。尽管该示波器的精确度很低,但这个
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. TI CAN EVM signals 图 信号
7 TI CAN EVM
21
Analog Applications Journal
3Q, 2013 www.ti.com/aaj High-Performance Analog Products
( )
Typical Bus Voltage VInterface (Data Transmission) Texas Instruments Incorporated
the accuracy of this scope is very low 图 显示了该示波器和用于调试 , it 演
8 TI CAN
Figure 8. Debugging on the TI CAN demonstration system 图 演示系统调试
8 TI CAN
appears from this simple test that in general
示系统的探针装置。该节点使用菊形链,
the CAN physical layer is behaving as expected.
并使用 针连接器。一
CANopen? D-SUB 9
Figure 8 shows the oscilloscope and probe
个总线外接头连接器位于图 左上方。利
8
set up to debug on the TI CAN demonstration
system. The nodes are set up in a daisy chain
用它,我们可以轻松地连接模拟示波器探
?
that uses CANopen D-SUB 9-pin connectors.
针至 总线的 和 引脚以及
CAN CANH CANL
A bus breakout connector is in the upper left
。由于探针过大,无法抓住中间
GND CAN
portion of Figure 8. It is used to easily connect
节点的 和 引脚,因此可通过连
the analog scope probes to the CANH and TXD RXD IC
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 CAN
a small wire to each transceiver pin so the
况。尽管这些信号的分辨率和精度均不
scope probe may be more easily attached.
Figure 9 shows the CAN signals in more
高,但它们可以帮助确定需要了解 节
CAN
detail as captured by the scope. While these
点工作的那些信息。中间节点的 触发 Figure 9. TI CAN demonstration system’ 图 演示系统的信号 s signals
TXD 9 TI CAN
signals are not high in resolution or accuracy,
了示波器; 和 信号差异符合预
CANH CANL
they help determine what needs to be known
about the operating CAN nodes. The scope 期;在 构架端可清楚地看到高差分电
CAN
was triggered on TXD of the middle node; the
压的收到确认( )位。该高压为同时
ACK
CANH and CANL signals are differential as
并行产生 位的多个 节点的结果。
ACK CAN
expected; and the acknowledge (ACK) bit with
轻松找出 位的另一个方法是其存在于
ACK
the higher differential voltage is clearly visible
at the end of the CAN frame. This higher volt 信号中而非 信号中,这意味着它 -
RXD TXD
age is the result of multiple CAN nodes gener-
由另一些节点产生。
ating this ACK bit at the same time in parallel.
调试例子
Another way to easily identify the ACK bit is CAN
that it is visible in the RXD signal but not in the
图 显示了一个 演示系统,在 右
10 CAN PCB
TXD signal, which means it was generated by
the other nodes as it should be. 边,连接至菊形链输出的 线路被损
CANH
坏。出现这种情况的原因是,系统后面的
CAN debugging examples
一个固定螺栓摩擦 ,而在几年的时间
PCB
Figure 10 shows a CAN demonstration system
里该系统被运输至世界各地。当系统通过
where the CANH trace leading to the daisy-
chain output has been broken on the righthand
菊形链总线接口连接至其他 节点时,
CAN
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 JournalTexas 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.
位。示波器使用单一模式,在某个单比特发现触发 一个示波器连接至 引脚,在 输入端显示出非
ACK TXD TXD
part of the CAN frame, the ACK bit. The scope was used Another example of CAN bus debugging was a system
in single mode and triggered on the TXD pin of the right 器时,其在右手节点的 引脚上被触发。该单比特为 - 常慢的上升时间,如图 所示。 的 数据
TXD where only very slow CAN data rates (bit timings) would 12 1Mbps CAN
hand node until a trigger on a single bit was found. This work. Connecting an oscilloscope to the TXD pin showed
这一节点产生的 位,目的是确认接收到一个有效的 速率下, 计时延迟相当于 比特。它的根本原
ACK 9.6μs 10
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
相比在 上看到的发送 位,总线上所看到的 动收发器的 引脚。在这种情况下,没有真正的逻
TXD ACK ACK TXD
nodes acknowledge the CAN frame from the sending node. 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 位的位时间稍长。这是同时发送 位的多个节点的假 辑高电平驱动。仅有 microprocessor with an open drain was being used to drive 收发器的弱内部上拉正驱动
ACK CAN
than the transmitted ACK bit seen on TXD. This is an arti- the transceiver’s TXD pin. In this case there was no real
象。影响这种长位时间的一些因素包括:通过线缆的 引脚高,因此它的 时间常量非常长。通过在
TXD RC
fact of the multiple nodes transmitting ACK bits at the drive to the logic-high level. Only the weak inter nal pull-
延迟、三个 节点之间的时钟计时漂移以及同 引脚上添加一个上拉电阻器,便可轻松解决这个
5ns/m CAN TXD
same time. Factors affecting this longer bit time are a up of the CAN transceiver was bringing the TXD pin high,
时发送一个 位的两个节点所产生的高差分电压。如 问题。
ACK
5-ns/m delay through the cabling; clock timing drift so it had a very long RC time constant. This problem was
between the three CAN nodes; and the higher bus 果这些因素使 位(空档)变得更长,并在 分隔 easily solved by adding a pull-up resistor on the TXD pin.
ACK ACK
Figure 11. TI CAN signals with broken CANH trace on PCB 图 上 线路遭损坏的 信号
11 PCB CANH TI CAN
Figure 12. Example with slow rise time on TXD pin 图 引脚上慢上升时间例子
12 TXD
Slow rise time causes
9.6-μs timing delay
23
Analog Applications Journal 3Q, 2013 www.ti.com/aaj High-Performance Analog ProductsInterface (Data Transmission) Texas Instruments Incorporated
5. Steve Corrigan, “Critical spacing of CAN bus connec-
Conclusion 、《 总线连接的关键间隔》 , 作者 ,
结论 5 CAN : Steve Corrigan
tions,” Application Report. Available: www.ti.com/
The basics of the CAN physical layer and the debugging
刊发于《应用报告》,
本文介绍的 物理层基础和调试举例,应该让 slla279-aaj
CAN
examples presented in this article should ease any fear of
网址:
www.ti.com/ slla279-aaj
您不那么惧怕进入 世界了吧。利用本文提供 6. Sam Broyles, “A system evaluation of CAN transceivers,”
CAN
jumping into the CAN world. With the additional references
Application Report. Available: www.ti.com/slla109-aaj
provided here and the appropriate datasheets, designers
的其他一些参考资料以及相应的数据表,设计人员 、《 收发器的系统评估》,作者 ,
6 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
参考文献
www.ti.com/interface-aaj
1. SN65HVD255D Evaluation Module, Texas Instruments.
相关网站
、 评估模块, www.ti.com/can-aaj
1 Available: www TI SN65HVD255D .ti.com/sn65hvd255devm-aaj
www.ti.com/sn65hvd255-aaj
2. Steve Corrigan, “Introduction to the controller area 网址: 接口(数据传输):
www.ti.com/sn65hvd255devm-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 Corrigan, “Controller area network physical layer 5.1.13
Subscribe to the AAJ:
www.ti.com/sn65hvd255-aaj
requirements,” Application Report. Available:
网址:
www.ti.com/sloa101-aaj
www.ti.com/subscribe-aaj
www.ti.com/slla270-aaj www.can-cia.org
、 《控制器局域网物理层要求》,作者
3 : Steve
4. Jason Blackman and Scott Monroe, “Overview of 3.3V 购买 标准,网址:
ISO
www.iso.org
CAN (controller area network) transceivers,” ,刊发于《应用 报 告 》 ,
Corrigan
订阅《模拟应用杂志》:
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
14.0 22.0
Vin V V
Actel Atmel
Altera Freescale
Vout Iout
3.3 2.0 Lattice TI
Output V A
Xilinx
30
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
新浪微博 e.weibo.com/tisemi
TI
热门产品
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
back cover-20130401.indd 1 2013-4-9 14:32:30重 重 要 要 声 声 明 明
德州仪器(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 德州仪器 半导体技术(上海)有限公司
献花(0)
+1
(本文系李清龙1023首藏)