FlexRay
来源:互联网 发布:Java接口技术 编辑:程序博客网 时间:2024/05/02 00:49
FlexRay是FlexRay联盟开发的一种汽车网络通信协议。其用来提供一种比CAN和TTP更为快速和可靠的协议,不过更为昂贵。
Contents
- 1 特性
- 2联盟
- 3应用范围
- 3.1 汽车
- 4 详细说明
- 4.1 时钟
- 4.2 总线上的位
- 4.3 采样位
- 4.4 帧
- 4.5 时钟同步
- 5 开发工具
- 6 参考文献
- 7 其他资源
- 8 外部链接
特性
FlexRay有以下显著特性:
- 高速率(高达20Mbit/s)
- 时间和时间触发行为
- 冗余
- 容错
- 确定性
联盟
FlexRay联盟有以下成员组成:
- BMW
- Volkswagen
- Daimler AG
- General Motors
- Robert Bosch GmbH
- NXP Semiconductors
- Freescale
此外,还有FlexRay高级会员和普通会员。截止到2009年,有28个高级会员,以及60多个普通会员。在2009年底时,该联盟解散了。
应用范围
2006年底,BMW X5是第一系列采用了FlexRay的汽车,实现了新的、高速适应的组你系统。在2008年,BMW 7 Series (F01)完全使用了FlexRay,也是全球第一个完全使用FlexRay系统的产品。
汽车
- Audi A8[1]
- Bentley Mulsanne
- BMW X5
- BMW 7-Series
- BMW 5 Series Gran Turismo
- BMW 5-Series
- Rolls-Royce Ghost
详细说明
时钟
FlexRay是有一个总线和处理器(电子控制单元,ECUs)组成。每隔ECU有一个独立的时钟,与参考时钟相比,该时钟的飘逸程度不能超过0.15%,因此,系统中最慢的时钟和最快的时钟偏差不能超过30%。
这就意味着,如果ECU-s是发送者、ECU-r是接收者,发送者的300个周期对于接收者来说是299~301个周期之间。因此,会进经常进行时钟同步,来保证不会发生这样的问题。
总线上的位
在某个时间点,进能有一个ECU向总线写数据。要发送的每个位在总线上为8个采样时钟周期。接收方有个缓冲区,来存放最后5次采样,并使用最后5次采样中的多数结果作为输入信号。
单周期传输错误可能对位的边界附近产生影响,但不会影响8个周期的中间区域。
在没有错误时. 信号进延迟了两个周期。
在8周期区域的中间区域发生了错误被取消了。
在8周期区域的边界区域发生了错误,可能会影响到边界位。
采样位
帧
所有的通信以帧的形式发送。由字节组成的消息以下面的方式进行打包:
- 传输开始信号(TSS)-位0
- 帧开始信号(FSS) - 位1
- m个:
- 字节开始信号0(BSS0) - 位1
- 字节结束信号1(BSS1) - 位0
- 字节中的第0位
- 字节中的第1位
- ...
- 字节中的第7位
- 帧结束信号(FES) - 位0
- 传输结束信号(TES) - 位1
如果没有通信,总线章台为1(高电平),因此接收者根据电平掉到了0来知道通信开始了。
接收者通过检查是否收到了BSS0 (1)或FES (0)来判断是否完成接收。
需要注意的是,每个位需要8个周期同字节没有关系。每个字节的传输需要80个周期,BSS0和BSS1需要16个周期,其他位需要64个周期[译者注:假设传输一个字节0x5A,即8位,二进制为:01011010,传输的帧格式为: 0 1 1 0 0 1 0 1 1 0 1 0 0 1,其中每一位分别为TSS、FSS、BSS0、BSS1、8位要传输的数据、FES、TES。每个位的传输时间是8个周期,呢么一个字节的传输周期是8 *(1位TSS + 1位FSS + 1位BSS0 + 1位BSS1 + 8位数据 + 1位FES + 1位TES)=80个周期,其中BSS0和BSS1总共需要16个周期,其他的位需要64个周期]。此外,还需要注意的是BSS0为1,BSS1为0。
时钟同步
Clocks are resynchronized when the voted signal changes from 1 to 0, if the receiver was in either idle state or expecting BSS1.
So the clock is synchronized when the transmission starts and between BSS0 and BSS1. As synchronization is done on the voted signal, small transmission errors during synchronization that affect the boundary bits may skew the synchronization no more than 1 cycle. As there are at most 88 cycles between synchronization (BSS1, 8 bits of the last byte, FES and TES - 11 bits of 8 cycles each), and the clock drift is no larger than 1 per 300 cycles, the drift may skew the clock no more than 1 cycle. Small transmission errors during the receiving may affect only the boundary bits. So in the worst case the two middle bits are correct, and thus the sampled value is correct.
Here's an example of a particularly bad case - error during synchronization, a lost cycle due to clock drift and error in transmission.
Errors that happened in the example
- Because of a single-bit error during synchronization, the synchronization was delayed by 1 cycle
- Receiver clock was slower than sender clock, so receiver missed one cycle (marked X). This will not happen again before the next synchronization due to limits on maximum allowable clock drift.
- Because of a single-bit error during transmission, a bit was voted wrongly near the result.
尽管有这么多错误,通信接收仍然是正确的。
All except the first are synchronized by the 1->0 edge in the transmission fragment shown.
开发工具
在开发FlexRay总想和/或解决FlexRay总线问题时,检查硬件的信号非常重要。逻辑分析仪和总线分析仪可以收集、分析、解码、存储信号,可以查看高速波形。
参考文献
- ^ "2011 Audi A8 4.2 FSI First Drive".http://www.insideline.com/audi/a8/2011/2011-audi-a8-4-2-fsi-first-drive.html. Retrieved 18 February 2010.
其他资源
- Controller Area Network (CAN)
- Local Interconnect Network (LIN) - 比CAN的开销小,带宽也小
外部链接
- FlexRay FlexRay联盟
- FlexRay Starter Kit Low cost FlexRay Starter Kit with the BOSCH E-Ray controller from DuxSolutions
- FlexRay Overview Technical Overview of FlexRay by National Instruments
- Flexray Products Samtec FlexRay product
【原文出处】http://write.blog.csdn.net/postedit/6725706
- FlexRay
- flexray
- FlexRay车载网络标准
- Multiplexed Networks for Embedded Systems: CAN, LIN, FlexRay, Safe-by-Wire
- 基于μC/OS-Ⅱ的线控转向FlexRay通信控制
- 赤手空拳如何成就百万富翁?——网络营销之一(序言)
- 一个著名的bug -- 1999 年“火星气候卫星” 因导航错误而坠入火星大气层
- TUP第十三期:客户端性能优化实战经验分享
- 链表实现
- 关于NTP的配置
- FlexRay
- PostgreSQL与Innodb并发控制大比拼
- 你有机会建立起属于自己的王国,属于自己的传说吗?
- POJ1087 A Plug for UNIX 二分图最大匹配
- Boost下载安装编译配置使用指南(含Windows和Linux)
- python greenlet 轻量级并行处理
- 赤手空拳如何成就百万富翁?——网络营销之二(第一招:百度推广)
- 很简单的内核模块A+B
- 5个jQuery常用代码片段