CAN总线白皮书

合集下载

(完整)CANFD协议介绍

(完整)CANFD协议介绍

CANFD协议介绍在汽车领域,随着人们对数据传输带宽要求的增加,传统的CAN总线由于带宽的限制难以满足这种增加的需求。

此外为了缩小CAN网络(max. 1MBit/s)与FlexRay(max.10MBit/s)网络的带宽差距,BOSCH公司推出了CAN FD 。

CAN FD(CAN with Flexible Data rate)继承了CAN总线的主要特性。

CAN总线采用双线串行通讯协议,基于非破坏性仲裁技术,分布式实时控制,可靠的错误处理和检测机制使CAN总线有很高的安全性,但CAN总线带宽和数据场长度却受到制约。

CAN FD总线弥补了CAN总线带宽和数据场长度的制约,CAN FD总线与CAN总线的区别主要在以下两个方面:可变速率CAN FD采用了两种位速率:从控制场中的BRS位到ACK场之前(含CRC分界符)为可变速率,其余部分为原CAN总线用的速率。

两种速率各有一套位时间定义寄存器,它们除了采用不同的位时间单位TQ外,位时间各段的分配比例也可不同。

新的数据场长度CAN FD对数据场的长度作了很大的扩充,DLC最大支持64个字节,在DLC小于等于8时与原CAN总线是一样的,大于8时有一个非线性的增长,所以最大的数据场长度可达64字节。

CAN FD介绍1.CAN FD 数据帧帧格式CAN FD 数据帧在控制场新添加EDL位、BRS位、ESI位,采用了新的DLC编码方式、新的CRC算法(CRC场扩展到21位)。

CAN FD数据帧格式如下图:2. 新添加位介绍EDL位:(Extended Data Length)原CAN数据帧中的保留位r,该位功能为:隐性:表示CAN FD 报文(采用新的DLC编码和CRC算法)显性:表示CAN报文BRS位:(Bit Rate Switch)该位功能为:隐性:表示转换可变速率显性:表示不转换速率ESI(Error State Indicator),该位的功能为:隐性:表示发送节点处于被动错误状态(Error Passive)显性:表示发送节点处于主动错误状态(Error Active)EDL位可以表示CAN报文还是CAN FD报文;BRS表示位速率转换,该位为隐性位时,从BRS位到CRC界定符使用转换速率传输,其他位场使用标准位速率,该位为显性时,以正常的CANFD总线速率传输;通过添加ESI位,可以很方便的知道当前发送节点所处的状态。

算力感知网络CAN技术白皮书

算力感知网络CAN技术白皮书

算力感知网络(CAN)技术白皮书(2021年版)目录1. 算网融合发展的背景 (1)1.1 面向算网融合的演进驱动力 (1)1.2 计算网络融合产业发展现状 (3)1.3 算力感知网络的价值 (5)2. 算力感知网络体系架构 (6)2.1算力感知网络的概念 (6)2.2算力感知网络体系架构 (7)3. 算力感知网络的关键技术 (8)3.1 算力度量与算力建模 (8)3.2 算力路由层关键技术 (11)3.3 算网管理层关键技术 (15)3.4 算力服务层关键技术 (17)4. 算力感知网络相关标准化工作 (18)4.1 国际标准化工作 (18)4.2 国内标准化工作 (19)5. 总结 (20)缩略语列表 (21)参考文献 (23)1.算网融合发展的背景1.1面向算网融合的演进驱动力在当前5G网络发展建设的关键时期,边缘计算和NFV等技术都要求网络与计算的协同发展。

同时,随着物理世界和数字世界的进一步融合,行业数字化转型获得了全方位地提升和改变,给运营商带来全新的市场和发展空间,也带来更多的需求挑战。

数字化转型需要泛在的连接和算力网络作为物理世界和数字世界的连接桥梁实现数据流动,是支撑数字化转型的基础和关键技术之一,将面临带宽、时延和安全等方面的更高需求。

数字化转型的持续推进促使数据规模的成倍增长,对传统网络和云计算提出了巨大挑战,驱动计算向边缘侧下移形成网络中分散的算力资源。

因此网络在实现分散节点互联的同时,更需要协同调度算力;另外,产业智能化升级带来设备的多样性,IoT 传感器、摄像头等设备的应用产生愈加多样化的数据,需要数字世界提供知识、智能和运算能力,实现数据价值化,并可反馈对数据的控制和策略。

所以整个行业的产业化智能升级对网络和计算都提出了更高的需求,要求基础设施IT,CT 逐渐走向融合,需要基础设施不仅提供泛在的连接,还需要提供算力的支持。

图1-1 物理世界和智能世界融合边缘计算驱动算力从中央走向边缘边缘计算在靠近数据源或用户的地方提供计算、存储等基础设施,为边缘应用提供云服务和IT环境服务,可以满足业务的低时延需求,并有效缓解网络带宽压力。

CAN总线简介(2024版)

CAN总线简介(2024版)
目前汽车上的网络连接方式主要采用2条CAN, 一条用于驱动系统的高速CAN,速率达到500kb/s; 另一条用于车身系统的低速CAN,速率是100kb/s。
驱动系统的高速CAN
• 驱动系统CAN主要连接对象是发动机控制器 (ECU)、ABS控制器、安全气囊控制器、 组合仪表等等,它们的基本特征相同,都是 控制与汽车行驶直接相关的系统。
倍。这种传统布线方法不能适应汽车的发展。CAN总线可有效减少线束,节省空间。
例如某车门-后视镜、摇窗机、门锁控制等的传统布线需要20-30 根,应用总线 CAN 则
只需要 2 根。(3)关联控制在一定事故下,需要对各ECU进行关联控制,而这是传统
汽车控制方法难以完成的表1 汽车部分电控单元数据发送、接受情况
• (5)直接通信距离最远可达10km(速率5Kbps以下)。
• (6)通信速率最高可达1MB/s(此时距离最长40m)。
• (7)节点数实际可达110个。
• (8)采用短帧结构,每一帧的有效字节数为8个。
• (9)每帧信息都有CRC校验及其他检错措施,数据出错 率极低。
• (10)通信介质可采用双绞线,同轴电缆和光导纤维,一 般采用廉价的双绞线即可,无特殊要求。
可靠性高:传输故障(不论是由内部还是外部引起 的)应能准确识别出来 使用方便:如果某一控制单元出现故障,其余系统 应尽可能保持原有功能,以便进行信息交换 数据密度大:所有控制单元在任一瞬时的信息状态 均相同,这样就使得两控制单元之间不会有数据偏 差。如果系统的某一处有故障,那么总线上所有连 接的元件都会得到通知。 数据传输快:连成网络的各元件之间的数据交换速 率必须很快,这样才能满足实时要求。
• (2)网络上的节点(信息)可分成不同的优先级,可以满 足不同的实时要求。

CAN总线介绍范文

CAN总线介绍范文

CAN总线介绍范文CAN总线,即控制器局域网络(Controller Area Network),是一种广泛应用于车辆、工业自动化和嵌入式领域的通信协议和总线系统。

CAN总线最早由汽车制造商Bosch于1986年开发,旨在解决车辆电子系统中的通信需求。

由于其高可靠性、优异的抗干扰能力和灵活的拓扑结构,CAN总线在汽车技术和工业控制领域得到了广泛的应用。

1.高可靠性:CAN总线采用了差分信号传输、信号线电平反转、CRC校验等技术,可以有效抵御电磁干扰和噪声,提高通信的可靠性和稳定性。

2.抗干扰能力强:CAN总线采用了差分传输方式,信号传输两根线,其中一根是正常逻辑信号,另一根是相反的逻辑信号,利用差分电压来表示信号的高低电平,从而减少了电磁干扰的影响。

3.灵活的拓扑结构:CAN总线可以采用总线拓扑或星形拓扑结构,适应不同的通信需求。

总线拓扑结构可以连接多个节点,而星形拓扑结构可以提供更稳定的通信环境。

4. 高速通信能力:CAN总线支持较高的通信速率,最高可达1Mbps,可以满足实时性要求较高的应用场景。

5.灵活的数据帧格式:CAN总线的数据帧格式包括标准帧和扩展帧,可以适应不同的数据通信需求。

标准帧有11位的标识符,扩展帧有29位的标识符,可以提供更多的地址空间和更灵活的数据传输方式。

6.支持多主机通信:CAN总线支持多主机通信,多个节点可以同时发送数据而不会发生冲突,提高了总线的利用率和通信效率。

CAN总线的应用广泛,特别是在车辆领域。

在汽车中,CAN总线连接了各个电子控制单元,如发动机控制单元、制动系统控制单元、空调控制单元等。

通过CAN总线,这些控制单元可以相互通信,实现车辆的集中控制和数据交换。

另外,为了满足不同的通信需求,CAN总线还衍生出了一些变种,如CAN FD(Flexible Data-Rate),它支持更高的数据传输速率,提高了通信的效率和带宽。

除了车辆领域,CAN总线还在工业自动化领域得到广泛应用。

2018汽车电子网络安全标准化白皮书

2018汽车电子网络安全标准化白皮书
汽车电子网络安全标准化白皮书
(2018)
全国信息安全标准化技术委员会 信息安全评估标准工作组
2018年4月
汽车电子网络安全标准化白皮书 (2018)
汽车电子网络安全标准化白皮书
(2018)
全国信息安全标准化技术委员会 信息安全评估标准工作组
2018年4月
1
汽车电子网络安全标准化白皮书 (2018)
3
汽车电子网络安全标准化白皮书 (2018)
汽车电子网络安全标准化白皮书(2018)
编写单位 (排名不分先后) 中国电子技术标准化研究院 电子科技大学 中国汽车技术研究中心 东软集团股份有限公司 北京奇虎360科技有限公司 上海银基信息安全技术股份有限公司 中国汽车工程学会 北京航空航天大学 武汉大学 浙江吉利汽车研究院有限公司 北京新能源汽车股份有限公司 重庆长安汽车股份有限公司 国家信息技术安全研究中心 腾讯安全科恩实验室 广东为辰信息科技有限公司 惠州华阳通用电子有限公司 威马汽车技术有限公司 公安部第三研究所 全国汽车标准化技术委员会 全国智能运输系统标准化技术委员会 车载信息服务产业应用联盟 烽台科技(北京)有限公司 上海巍擎信息技术有限责任公司 北京工业大学
4
汽车电子网络安全标准化白皮书 (2018)
汽车电子网络安全标准化白皮书(2018)
编写人员 (排名不分先后) 杨建军 刘贤刚 范科峰 龚洁中 罗 蕾 王 兆 陈丽蓉 刘健皓 李京春 仇兆峰 刘经南(院士) 秦洪懋 刘建行 孙 航 王 建 董 威 陈静相 路 娜 何 பைடு நூலகம் 汪向阳 雷 霆 郭 迟 崔竞松 刘金硕 王丽娜 唐 迪 王琪琳 李 允 罗建超 赵焕宇 姚相振 李 琳 周睿康 王秉政 朱新新 聂 森 张 屹 张颖奇 赵兴华 张军响 苗澎锋 庞春霖 龚亮华 魏钦志 陈家林 彭智俊 杨 震

CAN总线白皮书

CAN总线白皮书

Industrial Automation using the CAN Bus PlatformWhite PaperMay 2, 2003tiCopyright © 2003, Texas Instrument IncorporatedContents Introduction (3)CAN Bus Overview (3)System Design (4)System Requirements Overview (4)Communication across the Bus (6)3.3V and 5V Interoperability (7)Features to Assist Demonstration and Evaluation (7)Bus Loading and Corruption (8)Bus Loading (8)Bus Corruption (9)Performance Measurements (10)Product Support (12)Conclusions (16)References (17)IntroductionThis white paper describes the design of a demonstration system that shows the operation of several subsystems emulating automotive and industrial applications across the CAN bus. The platform shows these subsystems operation as the bus loading is varied, demonstrating the robustness of the multi-master CAN bus. The platform highlights:•Interoperability of 5V and 3.3V CAN bus transceivers•Multi-master operation of the CAN bus•Bus arbitration operation•Performance with injected error conditions.This paper describes the features and design of the platform that allow these items to be highlighted.CAN Bus OverviewThe Controller Area Network (CAN) bus is a multi-master message broadcast system that is suitable for systems where data contained in short messages are needed to be received at multiple locations simultaneously. Because messages are sent to all the nodes in a system, CAN is especially suited to systems where consistency in the received messages at all the receiving nodes is needed. Provisions are included in the protocol to reject messages if any destination node detects an error. In this case, all nodes are notified of the rejection, ensuring the data consistency across the network.Messages are sent to all nodes, but their “message identifiers” indicate whether each node should act on the message. However, all nodes participate in indicating whether the message was sent correctly, increasing the reliability of the bus.Reference 1 describes the CAN bus and protocol in detail.System DesignSystem Requirements OverviewThe demonstration platform was meant to show how several subsystems, chosen to resemble typical industrial or automotive subsystems, could be controlled via a CAN bus. The subsystems were spread across three electronics boards.Since many DSPs and microprocessors are migrating to 3.3V operation, we wanted to incorporate TI’s 3.3V CAN transceivers into the platform, showing how they interoperate with standard 5V CAN transceivers. Because of this, this platform includes both 3.3V and 5V CAN transceivers.There are many processors that include integrated CAN controllers. For this demonstration, we have chosen three processors that span the low-end control (TMS320LF2406A), high-end control (TMS320F2810), and general microprocessor (TMS470R1VF338 – an ARM7 processor) markets.Figure 1. CAN Platform BoardsWe also wanted to show the bus arbitration behavior of the bus (that is, how it reacts when more than one node needs to transmit to the bus at a time), leading us to add traffic generators to stress the bus.These subsystems were included in the demonstration.•Fan/temperature control.This system was meant to model an industrial control application, where thetemperature set point would be communicated to a temperature control system thatwould use a fan to control to a target temperature. This might emulate, say, an HVAC system or, in general, any subsystem where the control would happen locally at a node based on a commanded set-point from another node on the CAN bus.•Motor controlThis system is meant to emulate the popular industrial application of motor control.Here the motor speed and/or position is commanded from a remote node on the CANbus while the actual motor control is performed locally at one of the nodes.•CAN bus corrupterThis subsystem allows various impairments to be injected onto the CAN bus to showhow the bus detects errors and also how the bus can recover from the errors with nofailures as the errors are removed.•Bus loading factor controlThis subsystem generates additional CAN bus traffic. There are two traffic generators.The first is additional traffic with rate determined by the speed of the motor. Thesecond is a traffic generator that is purely micro-controller based. The intent is to load the bus with additional traffic that would cause bus arbitration to occur and show therobustness of the CAN bus to heavy bus loading. Under heavy bus loading, lowerpriority packets are delayed as higher priority packets use the bus. We have configured the platform to give an audible indication when a low priority packet has been delayed. Figure 2 shows the various sub-systems and how they’re distributed across the three nodes.Communication across the BusCommunication between the processors along the CAN bus is handled by specialized CAN controllers included as part of each of the processor devices. These controllers support version 2.0B of the CAN protocol. While the hardware is similar between the three processors, there are differences between the controllers available, summarized in Table 1.Processor Type(s) of CAN controller(s) Number of mailboxesTMS320F2810 eCAN 32TMS320LF2406A SCC 6TMS470R1VF338 SCC/HECC 16(SCC)/32(HECC) Notes. SCC=standard CAN controller; HECC=high-end CAN controller; eCAN=enhanced CAN controllerMessages are passed from processor to processor through “mailboxes.” These mailboxes are configured to either receive or transmit messages containing certain message identifiers. When a message is sent, each processor’s controller participates in validating that the message has been sent correctly. Then, if the message identifier matches a mailbox’s message identifier, the message is stored for processing. If there is no match, the message is discarded. Specific message identifiers and mailbox assignments are detailed in the “Industrial Automation using CAN Bus Software Architecture” manual. Detailed information on theimplementation of the CAN controller software on the C24x and C28x platforms can be found in References 4 and 5.3.3V and 5V InteroperabilityThe CAN physical layer described in ISO 11898 is fundamentally a 5-volt system (Reference 2) that biases the signal lines to 2.5V. It would seem natural to use a 5-volt part for a CAN transceiver, and this is what has traditionally been done.Most electronics systems, though, are migrating to 3.3V or lower operation. An ideal CAN transceiver would allow operation using a 3.3V power supply. TI has a family of CAN transceivers (SN65HVD23x) that allow operation on a traditional 5-volt CAN bus that themselves run on 3.3V. Reference 3 describes testing that was done showing the compatibility of the SN65HVD230 with a standard 5V CAN bus.This platform uses a mix of 5-volt and 3.3-volt CAN transceivers to show the interoperability of these two types of devices.Features to Assist Demonstration and EvaluationSome features that have been added to the demonstration platform to assist in the evaluation of the CAN bus function. These features are described here.The F2810 contains an SCI interface that can be easily tied to a PC’s UART through a level translator (e.g., the SN75LV4737A). A command interface has been developed that allows the bus operation to be monitored and controlled from a program on the host PC. Using this program, control messages to other nodes can be sent, and the status of the CAN bus can be monitored.Several LED’s have been placed on the board to indicate when the CAN bus is active, when commands are being received from the PC, and so forth. These LED’s are described in the “Industrial Automation using CAN Bus Platform Getting Started Guide.”Bus Loading and CorruptionThis section of the paper describes the circuitry used to load the bus with traffic and the circuitry used to inject error conditions onto the bus.Bus LoadingThere are two mechanisms available to load the CAN bus with traffic. The first mechanism is a “flood packet” generator on the sensor node. The rate of packets flooding the bus is controlled through a pull-down menu item on the GUI interface on the laptop/PC. The appropriate flood rate depends on the bus data rate (1 Mbps, 500 kbps, 250 kbps, 125 kbps), selected by the DIP switches as described in the “Industrial Automation using CAN Bus Platform Getting Started Guide.” The following table shows the theoretical maximum packet loading on the bus for each data rate as well as a recommended rate available on the GUI that loads the bus near its maximum capacity. The message length in bits is given by the formula: STUFF IFS EOF ACK CRC MSGLENGTH CTRL RTR MSGID SOF L +++++•++++=)8(where:• SOF is the start of frame length, 1 bit • MSGID is the message identifier length, 11 bits • RTR is the remote transmission request bit length, 1 bit • CTRL is the control field length, 6 bits, that includes the IDE (identifier extension bit), r0 (reserved bit), and DLC (data length) fields.• MSGLENGTH is the length of the message in bytes. Most of our messages are 6 bytes long, with one that is 8 bytes long. The calculations assume 6 bytes. • CRC is the length of the cyclic redundancy code, 16 bits • ACK is the length of the acknowledge bits (2 of these) • EOF is the end of frame indicator length, 7 bits • IFS is the minimum bus inter-frame space time between messages, 7 bits • STUFF is the additional time in the message due to stuff bits. Transitions are forced on the bus after long strings of zeroes, and assuming the maximum number of stuff bits in the message and message identifier, (11+48)/5 bits.Baud Rate (Mbps) Data Field Length (Bytes) Message Length (bits) Message Time (µs) Maximum messages per secondRecommended Rate on GUI1 6 111 110 9090 7000 0.5 6 111 220 4545 3500 0.25 6 111 440 2272 1500 0.125 6 111 880 1136 500The second mechanism can be used to push the bus loading over capacity. The rate that the motor spins determines the rate at which motor speed packets are loaded onto the bus. As themotor speed is increased from zero, the bus becomes more heavily loaded. At some point, the low priority packets from the “flood packet” generator on the sensor node and the motor packets from the motor node are delayed to allow higher priority traffic onto the bus. The system monitor node checks for delayed messages and indicates a delayed message by clicking the speaker. So, a speaker click indicates that the bus arbitration is working, causing lower priority flood and motor position packets to be deferred in favor of higher priority packets. Bus CorruptionThe capability to inject error conditions on the bus is incorporated on the system monitor node, under control of the GUI interface. The bus corrupter is able to perform the following actions to the bus:•Open the CAN_high line between the bus connectors and the CAN transceiver on the system monitor board•Open the CAN_low line between the bus connectors and the CAN transceiver on the system monitor board•Short the CAN_high line to 5V•Short the CAN_low line to 5V•Short the CAN_high line to ground•Short the CAN_low line to ground•Short the CAN_high and CAN_low lines together•Remove termination between the CAN lines•Install excessive termination between the CAN linesAnother error that can be created is:•Unpower a CAN node (by unplugging one of the boards from power)For most of these errors, the bus will cease to function (see the Performance Measurement section below). Some of these error conditions cause the bus error rate to be degraded. The effect of the error condition can be viewed using the statistics available on the GUI interface. The requirement is that the CAN transceivers withstand these error conditions and return to the same error rate performance when the fault is removed. The data in the next section shows that TI’s CAN transceivers meet this requirement.Performance MeasurementsThis section provides a summary of the performance evaluation of the platform. Performance was measured by observing how communications between nodes was effected in each bus corruption mode for two different cable lengths. To test the effect of powered down node on the bus, the Motor Node was turned off. These tests were repeated for different baud rates on the CAN bus. Finally, a Philips PCA82C251 replaced the TI SN65HVD251 5V CAN transceiver and the tests run again. In no case did the TI CAN transceivers get damaged or show degraded performance after the corruption mode was removed. Also, TI’s CAN transceivers performed equivalent to the Philips PCA82C251 CAN transceiver. The following tables show the results of those tests.40 Meter CableMessaging(TI SN65HVD251)Baud Rate Corruption Mode SM to SN SM to MN SN to MNNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send not rcvd can send & rcvd can rcvd not sendCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 1MbpsCanL to Gnd can send & rcvd can send not rcvd can send not rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 500kbpsCanL to Gnd can send & rcvd can send not rcvd can send struggles to rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 250kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 125kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvd6 Meter CableMessaging (TI SN65HVD251)Baud Rate Corruption Mode SM to SN SM to MN SN to MNNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 1MbpsCanL to Gnd can send & rcvd can send not rcvd can send not rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 500kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 250kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 125kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvd40 Meter CableMessaging (Philips PCA82C251)Baud Rate Corruption Mode SM to SN SM to MN SN to MNNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send not rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 1MbpsCanL to Gnd can send & rcvd can send not rcvd can send not rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send not rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 500kbpsCanL to Gnd can send & rcvd can send struggles to rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 250kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 125kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvd6 Meter CableMessaging (Phillips PCA82C251)Baud Rate Corruption Mode SM to SN SM to MN SN to MNNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 1MbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 500kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 250kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdNo termination can send & rcvd can send & rcvd can send & rcvdExtra termination can send & rcvd can send & rcvd can send & rcvdCanH to Vcc can send & rcvd can send & rcvd can send & rcvdCanL to Vcc no messaging no messaging no messagingCanH to Gnd no messaging no messaging no messaging 125kbpsCanL to Gnd can send & rcvd can send & rcvd can send & rcvdCanH to CanH no messaging no messaging no messagingCanH open no messaging no messaging can send & rcvdCanL open no messaging no messaging can send & rcvdProduct SupportSupport for the individual components in this design is provided through the product support structure of TI. Here are some sources for additional information that may be of interest. Technical support contact information may be found at/corp/technical_support.htm, including telephone numbers and e-mail addresses for additional information on TI products. This page also has links to the DSP and analog knowledge bases.There are also DSP discussion groups that may be helpful. See/docs/catalog/general/general.jhtml?templateId=5121&path=templateda ta/cm/vilorphan/data/vil_discgroups.ConclusionsThis platform demonstrates these four key attributes of the CAN bus and CAN bus electronics available from TI.•Interoperability of 5V and 3.3V CAN bus transceivers.By using a mix of 5V and 3.3V CAN bus transceivers, the interoperability in a standard 5V CAN bus system is shown.•Multi-master operation of the CAN busMessages are sourced from each of the three nodes and passed to any one of the tworemaining nodes. No one node dominates the bus. Instead, bus operation isdetermined by the priority of the messages.•Bus arbitration operationBy loading the bus heavily with low priority packets, it is possible for higher prioritypackets to interfere with the timely delivery of the low priority packets. This platform shows this through an audio indication when a low priority packet is delayed due tohigher priority traffic. This demonstrates that the bus arbitration works correctly,granting the bus to the higher priority packets.•Performance with injected error conditions.The bus corrupter allows various error conditions to be injected onto the bus. In most cases, the bus was unable to operate with the injected error conditions. Most important is that the bus was able to recover from the injected error conditions when they wereremoved, and the bus operation was restored to its previous condition.References1.Texas Instruments, “Introduction to the Controller Area Network (CAN),” ApplicationReport SLOA101, August 2002.2. D. Marsh, “CANBus Networks Break into Mainstream Use,” EDN, Aug. 22, 2002, pp.53-60.3.Texas Instruments, “A System Evaluation of CAN Transceivers,” Application ReportSLLA109, March 2002.4.Texas Instruments, “Programming Examples for the 24x/240xA CAN,” ApplicationReport SPRA890, January 2003.5.Texas Instruments, “Programming Examples for the TMS320F281x ECAN,”Application Report SPRA876, January 2003.IMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. T esting and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. T o minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:Products ApplicationsAmplifiers Audio /audioData Converters Automotive /automotiveDSP Broadband /broadbandInterface Digital Control /digitalcontrolLogic Military /militaryPower Mgmt Optical Networking /opticalnetwork Microcontrollers Security /securityTelephony /telephonyVideo & Imaging /videoWireless /wirelessMailing Address:Texas InstrumentsPost Office Box 655303 Dallas, Texas 75265Copyright 2004, Texas Instruments Incorporated。

CANFD协议介绍

CANFD协议介绍

CANFD协议介绍在汽车领域,随着人们对数据传输带宽要求的增加,传统的CAN总线由于带宽的限制难以满足这种增加的需求。

此外为了缩小CAN网络(max. 1MBit/s)与FlexRay(max.10MBit/s)网络的带宽差距,BOSCH公司推出了CAN FD 。

CAN FD(CAN with Flexible Data rate)继承了CAN总线的主要特性。

CAN总线采用双线串行通讯协议,基于非破坏性仲裁技术,分布式实时控制,可靠的错误处理和检测机制使CAN总线有很高的安全性,但CAN总线带宽和数据场长度却受到制约。

CAN FD总线弥补了CAN总线带宽和数据场长度的制约,CAN FD总线与CAN总线的区别主要在以下两个方面:可变速率CAN FD采用了两种位速率:从控制场中的BRS位到ACK场之前(含CRC分界符)为可变速率,其余部分为原CAN总线用的速率。

两种速率各有一套位时间定义寄存器,它们除了采用不同的位时间单位TQ外,位时间各段的分配比例也可不同。

新的数据场长度CAN FD对数据场的长度作了很大的扩充,DLC最大支持64个字节,在DLC小于等于8时与原CAN总线是一样的,大于8时有一个非线性的增长,所以最大的数据场长度可达64字节。

CAN FD介绍1.CAN FD 数据帧帧格式CAN FD 数据帧在控制场新添加EDL位、BRS位、ESI位,采用了新的DLC编码方式、新的CRC算法(CRC场扩展到21位)。

CAN FD数据帧格式如下图:2. 新添加位介绍EDL位:(Extended Data Length)原CAN数据帧中的保留位r,该位功能为:隐性:表示CAN FD 报文(采用新的DLC编码和CRC算法)显性:表示CAN报文BRS位:(Bit Rate Switch)该位功能为:隐性:表示转换可变速率显性:表示不转换速率ESI(Error State Indicator),该位的功能为:隐性:表示发送节点处于被动错误状态(Error Passive)显性:表示发送节点处于主动错误状态(Error Active)EDL位可以表示CAN报文还是CAN FD报文;BRS表示位速率转换,该位为隐性位时,从BRS位到CRC界定符使用转换速率传输,其他位场使用标准位速率,该位为显性时,以正常的CANFD总线速率传输;通过添加ESI位,可以很方便的知道当前发送节点所处的状态。

ADAS高级驾驶辅助系统ACC检测CANBUS线束白皮书

ADAS高级驾驶辅助系统ACC检测CANBUS线束白皮书

ADAS⾼级驾驶辅助系统ACC检测CANBUS线束⽩⽪书EST560-mini6ADAS(⾼级驾驶辅助系统)ACC检测CANBUS线束⽩⽪书ADAS(Advanced Driver Assistance Systems)ACC detectionharness CANBUS White PaperRev.1.0—14March2016Product data sheet 1.ADAS(⾼级驾驶辅助系统)⾏业背景ADAS(Advanced Driver Assistance Systems)industry background汽车防撞预警系统(ADAS),当驾驶员精⼒分散、疲劳驾驶,汽车出现⽆意识的偏道或存在追尾可能时,给予驾驶员主动预警。

1:提醒驾驶员⾏驶在当前车道,当车辆偏离车道时能够及时提醒纠正⽅向。

2:提醒司机始终保持本车与前车安全车距,当两车车距过近时及时驾驶员刹车或减速,避免车辆碰撞。

3:提醒驾驶员始终保持合理车速,当超速时及时提醒,避免交通违章及事故发⽣。

4:提醒司机朋友与前车保持安全合理车距,当前车起动或超过安全车距时能够提前给予预警。

5:⾏驶过程中有潜在撞车及各种碰撞险情时,最多可提前2.5秒预警,给与⾜够时间以便采取合理措施规避危险。

通过以上这些功能,我们将有效避免绝⼤多数交通危险.⽽这些正是⽬前汽车领域各⼤车商所竭⼒推⼴的主动安全技术,实际研究中证明,只要能提前1.5秒以上对潜在危险进⾏预警,我们将能规避90%以上的交通事故。

Automotive Collision Warning System(ADAS),when the driver distractions,fatigue driving,the car appeared unconscious bias exists or rear-end road when possible,take the initiative to give the driver a warning.1:to remind the driver of the current driving lane when the vehicle deviates from the lane can be a timely reminder to correct direction.2:always remind drivers to keep the vehicle and the vehicle in front safe distance between vehicles, when two trucks from too close in time the driver brakes or slow down to avoid a vehicle collision.3:Always alert the driver to maintain a reasonable speed,a timely reminder when speeding, avoiding traffic violations and accidents.4:Friends remind drivers to keep the vehicle in front reasonably safe distance between vehicles,or more than the current car starting from when the safety car can give advance warning.5:The process of moving a potential crash and a variety of collision danger,up to2.5seconds advance warning,to give sufficient time to take reasonable measures to avoid danger.Through these features,we will effectively prevent the vast majority of traffic hazards.Which is what is currently the automotive sector's major car makers are trying to promote active safety technology,the actual study proves that as long as morethan1.5seconds ahead of early warning of potential danger we will be able to avoid more than90percent of traffic accidents.2.CANBUS总线采⽤OBD接⼝插⼊连接⽅式CANBUS bus with OBD connector into the connection1、结合原车CANBUS总线设计。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CAN 总线技术白皮书目录1. 概述 (1)1.1 技术优点 (1)2. CAN 总线介绍 (2)2.1 CAN 总线协议 (2)2.2 CAN 总线物理特性 (3)2.3 CAN 总线帧格式及帧类型 (4)2.3.1 CAN 总线帧格式 (4)2.3.2 CAN 总线帧类型 (4)2.4 相关术语 (7)2.4.1 CAN 总线仲裁机制 (7)2.4.2 DLC (8)2.4.3 帧间空间 (8)2.4.4 位定时 (9)2.4.5 同步 (10)2.4.6 CAN 总线错误 (11)3.参考文献 (14)1. 概述CAN 是Control er Area Network(控制器局域网络)的简称,最初是由德国Bosch 公司设计的,应用于汽车的监测和控制。

CAN 总线作为一种技术先进、可靠性高、功能完善、成本合理的远程网络通讯控制方式,逐步被广泛应用到各种控制领域。

1991 年9 月,Philips 制定并发布CAN 技术规范:CAN 2.0A 和CAN2.0B。

1993 年11 月,ISO 组织正式颁布CAN 国际标准ISO11898。

CAN 总线是唯一成为国际标准的现场总线。

1.1技术优点多主结构依据优先权进行总线访问;非破坏性的基于优先权的逐位仲裁,对于优先级最高的节点来说“发送时间”就是无损的;借助验收滤波器的多地址帧传递;远程数据请求;全系统数据相容性;错误检测和出错信令;很远的数据传输距离(长达10KM);高速的数据传输速率(高达1Mbps);高度实时性:每帧报文允许传输最高8 个字节的数据;发送期间丢失仲裁或出错而遭到破坏的帧可自动重发;暂时错误和永久性故障节点的判别以及故障节点的自动脱离;脱离总线的节点不影响总线的正常工作2. CAN总线介绍标准报文格式标准报文格式和扩展报文格式①定义数据链路层协议在周围各层中所发挥的作用2.2 CAN总线物理特性(1)CAN 总线电平信号图 1 CAN 总线电平信号CAN 总线上是差分信号,一个差分信号是用一个数值来表示两个物理量之间的差异:逻辑0—显性—CAN_H 对应是 3.5V,CAN_L 对应是 1.5V逻辑1—隐性—CAN_H 对应是 2.5V,CAN_L 对应是 2.5V正常情况下:CAN_H 标准电压:隐性为2.6V 左右;显性为3.8V 左右CAN_L 标准电压:隐性为2.4V 左右;显性为1.2V 左右(2)CAN 总线信号编码方式图 2 CAN 总线编码CAN 总线采用NRZ(单极性不归零码)编码,相比曼彻斯特码具有更好的EMC 性能。

当发送器检测到位流里有连续 5 个相同极性的位就会插入一个填充位,接收器会删除这个填充位,然而在固定的位场中不使用位填充。

CAN2.0B 协议引入第二种帧格式,它支持标准帧和扩展帧。

具有11 位标识符的CAN 帧称为标准帧;具有29 位标识符的CAN 帧称为扩展帧。

两种帧格式可出现在同一总线上。

2.3.2 CAN总线帧类型CAN 总线报文传送主要有四种类型的帧:数据帧、远程帧、错误帧以及过载帧。

(1)数据帧由7 个不同的位场组成,分别是帧起始、仲裁场、控制场、数据场、CRC 场、应答场以及帧结束。

数据帧用于从发送节点向其他节点发送数据。

①帧起始(SOF):表示数据帧和远程帧的起始,仅由 1 位显性位(0)组成②帧结束(EOF):表示数据帧和远程帧的结束,由7 位隐性位(1)组成。

③仲裁场:用于实现总线仲裁功能和设置冲突发生时的优先级。

11 位标识符的是标准数据帧;29 位标识符的是扩展数据帧。

远程发送请求位RTR 用于区分数据帧和远程帧,在数据帧中RTR 必须为显性电平(0);远程帧中该位为隐性电平(1)。

不管在数据帧中还是远程帧中,标准帧的RTR 位被扩展帧的SRR 位替代,SRR 位在扩展帧中必须为隐性位,扩展帧的RTR 位被置于保留位r1 前。

④控制场:控制场中的IDE 位用于区分标准帧和扩展帧。

在标准帧中该位为显性电平(0);扩展帧中该位为隐性电平(1),接收器检测位流序列的IDE 位以识别接收的是标准帧还是扩展帧。

数据长度代码(DLC),指示数据场的字节数目,共 4 个位DLC0—DLC3。

DLC 可以设置0—8 的数字表示数据字节数(超过8 的数字则认为是8,这种情况并不视为出错)。

两位保留位r0 和r1,用于扩展。

保留位必须全部以显性电平发送,但接收方可以接收显性、隐性及其任意组合的电平。

⑤数据场:数据场可以为0—8 个字节,首先发送MSB(最高位),一般情况下都是8 个字节,每个字节可以存储任意的数。

⑥CRC 场:CRC 校验仅仅是CAN 通讯的一种错误检测,用于对帧起始、仲裁场、控制场、数据场上的位进行校验。

CRC 码最适合于短帧报文,CRC 界定符为 1 位隐性位。

⑦应答场:应答场长度为 2 位,包含应答间隙和应答界定符。

在应答域里,发送站发送两个“隐性”位。

当接收器正确地接收到有效的报文,接收器就会在应答间隙期间发送ACK 信号,向发送器发送一个“显性”的位以示应答。

图 4 标准数据帧结构示意图图 5 扩展数据帧结构示意图(2)远程帧远程帧也有二种格式,标准远程帧和扩展远程帧,而且都由 6 个不同的位场组成:帧起始、仲裁场、控制场、CRC 场、应答场、帧结束。

远程帧除了没有数据场,以及RTR 位是隐形位(1)以外,与数据帧完全一样。

远程帧中的数据长度代码表示的是所请求数据帧的数据长度代码。

图 6 标准远程帧结构示意图图7 扩展远程帧结构示意图(3)错误帧错误帧用于在接收和发送消息检测到错误时向总线通知错误,该帧由错误标志和错误界定符构成。

错误标志包括主动错误标志和被动错误标志两种:主动错误标志为 6 位显性位构成,被动错误标志为 6 位隐性位构成。

错误界定符由8 位隐性位构成。

为了能正确地终止错误帧,“错误认可”的节点要求总线至少有长度为 3 位的总线空闲。

图8 错误帧结构示意(4)过载帧过载帧用于接收方通知发送方尚未准备好接收数据,过载帧在先行和后续的数据帧(或远程帧)之间提供一个附加的延时。

过载帧由过载标志和过载界定符构成。

过载标志由 6 位显性位构成;过载界定符由8 位隐性位构成。

有三种过载的情况,这三种情况都会引发过载标志的传送:①接收方的内部情况(接收方尚未准备好接收数据,对于下一个数据帧或远程帧需要有一个延时);②在帧间空间间歇场的第一和第二字节检测到一个“显性”位;③如果CAN 节点在错误界定符或过载界定符的第8 位(最后一位)采样到一个显性位,节点会发送一个过载帧(不是错误帧)。

错误计数器不会增加。

图9 过载帧结构示意图2.4 相关术语2.4.1 CAN总线仲裁机制①总线上显性电平支配隐性电平。

逻辑“0”为显性电平;逻辑“1”为隐性电平;②总线空闲时,任何节点可以开始发送报文;③总线上每条报文都具有唯一的一个11 位或29 位标识符;④报文标识符的值越小,报文具有越高的优先权;⑤多个节点同时发送时,总线在“仲裁场”进行“逐位仲裁”;⑥传送高优先级报文的节点赢得仲裁,并继续传输报文;⑦失去仲裁的节点在总线空闲时重新传送当一个扩展帧和一个标准帧同时出现在网络并且扩展帧的高11 位与标准帧相同时:若该标准帧为数据帧,则RTR 为显性而对应的扩展帧中SSR 位为隐性,于是标准帧竞争总线成功继续发送而扩展帧对应节点竞争失败转为接收节点。

若该标准帧为远程帧,RTR 位与SRR 位同为隐性,不存在冲突两帧继续发送IDE 位,标准帧中IDE 位为显性而扩展帧中IDE 位为隐性,同样标准帧竞争成功继续享用总线而扩展帧对应的节点竞争总线失败转为接收器。

这也就是标准帧的优先级总高于扩展帧的原因。

图10 CAN 总线仲裁示意图2.4.2 DLC数据长度代码指示了数据场里的字节数量,共4 个位DLC0—DLC3。

DLC 可以设置0—8 的数字表示数据字节数(超过8 的数字则认为是8,这种情况并不视为出错)。

2.4.3 帧间空间数据帧或远程帧与先行帧的隔离是通过帧间空间实现的,无论此先行帧类型如何(数据帧、远程帧、错误帧、过载帧)。

不同的是,过载帧与错误帧之前没有帧间空间,多个过载帧之间不用帧间空间进行分隔。

帧间空间包括间歇、总线空闲的位场。

间歇场由3 个隐性位组成,间歇场期间不允许启动发送数据帧或远程帧。

总线空闲位场为隐性位,长度不限。

此时,总线是开放的,任何站可随时发送。

如果"被动错误状态"的节点已作为前一报文的发送器,则其帧间空间除了间歇、总线空闲外,还包括称做"挂起传送"(暂停发送,由8 个隐性位组成)的位场。

图11 帧间空间示意图2.4.4 位定时位定时相关名词有:①标称位速率(Nominal Bit Rate):一理想发送器在没有重新同步的情况下每秒发送的位数量;②标称位时间(Nominal Bit Time):1/标称位速率。

标称位时间可分成几个不重叠的片段,分别是同步段、传输延时段、相位缓冲段1、相位缓冲段2;③采样点(Sample Point):读总线电平并解释各位的值的一个时间点。

采样点位于相位缓冲段 1 之后;④时间份额(Time Quanta,以下简称Tq):时间份额是派生于振荡器周期的固定时间单元,它是实现CAN 协议的基准时钟;⑤信息处理时间(Information Processing Time):信息处理时间是以一个采样点作为起始的时间段。

采样点用于计算后续位的位电平。

图12 位时间示意图2.4.5 同步CAN 协议采用的是不归零码(NRZ)通讯方式。

在各位的起始处与结尾处不附加同步信号。

发送单元与位时间同步开始发送数据。

而接收单元按总线上的电平变化加以同步的同时,完成接收动作。

但是,由于时钟的误差及传输线路(电缆、驱动器等)的相位延迟,发送单元与接收单元之间有时可能出现同步偏离,因此接收单元要进行硬同步或者是重同步,以对准时间进行接收。

(1)硬同步硬同步一般用于帧的开始,即总线上的各个节点的内部位时间的起始位置(同步段)是由来自总线的一个报文帧的帧起始的前沿决定的,也就是说在总线空闲期间,有一个“隐性”到一个“显性”的跳变沿时,则硬同步就会被执行。

(2)重同步在接受报文过程中,检测到总线上的电平跳变时,所进行的同步。

每当检测到下降跳变沿时,则根据SJW(同步跳转宽度)的值按误差加宽相位缓冲段1,或者压缩相位缓冲段2。

但是,在误差大于SJW 值时,则只能调整SJW 的最大值。

在帧的位流发送期间,节点内部的一个位时间内,如果检测到一个下降跳变沿,若此跳变沿在同步段内,则不需要重同步;若在传输延时段或相位缓冲段 1 内,则需要延长相位缓冲段 1 来重同步;若在相位缓冲段 2 内,则需要缩短相位缓冲段 2 来重同步。

相关文档
最新文档