FlexRay - FlexRay synchronization with CANoe as gateway Version Application Note AN-IND-1-010

Similar documents
Quick Introduction to CANalyzer Version Application Note AN-AND-1-110

Introduction to J1939 Version Application Note AN-ION

Getting Started with CANopen Version Application Note AN-AON

CAN-based Protocols in Avionics Version Application Note AN-ION

CANape CCP Communication Version /06/03 Application Note AN-AMC-1-100

Solutions for MOST. Reliable Solutions for MOST25, MOST50 and MOST150 ENGLISH

How to Use C Code Functions in CANape Version Application Note AN-IMC-1-012

Plug and Play Solution for AUTOSAR Software Components

Introduction To The CANopen Protocol Version 1.1 Application Note AN-ION

Car2x From Research to Product Development

From Diagnostic Requirements to Communication

Introduction to the CAN Calibration Protocol Version Application Note AN-AMC-1-102

Standardized software components will help in mastering the. software should be developed for FlexRay were presented at

Model-Based Development of ECUs

Challenge of Ethernet Use in the Automobile

Convenient Charging of Electric Vehicles

The RT module VT6000 (VT6050 / VT6010) can be used to enhance the RT. performance of CANoe by distributing the real-time part of CANoe to a

Laboratory Course Industrial Automation. Experiment Nr. 6. Introduction to the FlexRay bus system. Brief User Guide CANoe

Simple and error-free startup of the communication cluster. as well as high system stability over long service life are

ISO11783 a Standardized Tractor Implement Interface

VECTOR. Consulting Services. How Hardware Development Wins with SPICE DEUTSCH

Automotive Ethernet Prototype and test development with CANoe/CANalyzer.Ethernet

Validating Diagnostics in Early Development Stages

Administration Manual. CANoe/CANalyzer MSI Setup. Version 1.4 English

FlexRay A Communications Network for Automotive Control Systems

From Signal Routing to complete AUTOSAR compliant CAN design with PREEvision (II)

MOST PCI Tool Kit. Overview. Ordering Information. Experience the Versatile MOST PC Interfaces.

MOST Training and Workshops

Time-Correlated Multi-domain RF Analysis with the MSO70000 Series Oscilloscope and SignalVu Software

Manual. CANcaseXL CANcaseXL log. Version 5.1 English

DDR Memory Overview, Development Cycle, and Challenges

One common language for domain experts and test engineers

Keysight Technologies N1918A Power Analysis Manager and U2000 Series USB Power Sensors. Demo Guide

Module 5. Broadcast Communication Networks. Version 2 CSE IIT, Kharagpur

EBERSPÄCHER ELECTRONICS automotive bus systems. solutions for network analysis

Introduction to Higher-Level Protocols Version 1.0 Application Note AN-AND-1-160

Synchronization in. Distributed Systems. Cooperation and Coordination in. Distributed Systems. Kinds of Synchronization.

Updating the QIAcube operating software

EB TechPaper. Test drive with the tablet. automotive.elektrobit.com

Introduction to Ethernet and IP in automotive vehicles

Laboratory Course Industrial Automation. Experiment Nr. 6. Introduction to the FlexRay bus system. Brief User Guide IAS Demonstrator Go-Cart

How to Define Cash Discounts

Comparison of FlexRay and CAN-bus for Real-Time Communication

Mediatrix Gateways and ISDN Clock Synchronization June 22, 2011

Software Development for Multiple OEMs Using Tool Configured Middleware for CAN Communication

Model-Based Development of Safety-Critical Software: Safe and Effi cient

PCI Express 1.0 (2.5 GT/s) Protocol Test

Remote Desktop Connection

Agilent U2000 Series USB Power Sensors

Agilent Automotive Power Window Regulator Testing. Application Note

relating to household s disposable income. A Gini Coefficient of zero indicates

Installation Guide E Dielectric Probe Kit 85071E Materials Measurement Software

Release Notes: PowerChute plus for Windows 95 and Windows 98

Clock Synchronization

Image Lab Software for the GS-900 Densitometer

Jabra LINK 220 Jabra LINK 220a

Manual. VN1600 Interface Family. VN1610 / VN1611 / VN1630A / VN1640A Version 2.2 English

VAT Guidelines for Tooling. Volvo Group VAT guidelines for Vendor Tooling

PCI-SIG ENGINEERING CHANGE NOTICE

High-Speed Inter Connect (HSIC) Solution

Building a Global Internet Company: Driving Traffic to Your Site. Benjamin Edelman Harvard Business School

Norton Ghost How to copy partitions from an HDD to a Samsung SSD

5big Backup Server. Quick Start Guide. Backup Appliance. Gigabit Ethernet DESIGN BY NEIL POULTON

Mathatma Gandhi University

Logix5000 Clock Update Tool V /13/2005 Copyright 2005 Rockwell Automation Inc., All Rights Reserved. 1

QIAsymphony RGQ Protocol Sheet

TI GPS PPS Timing Application Note

The automotive industry is making great efforts to improve. Uniform standards in software development are an important

3300 IP Communications Platform Release 7.1 License Information

TI 313 (1.0 EN) d&b Remote network - Integration

Safety compliance. Energy management. System architecture advisory services. Diagnostics. Network topologies. Physical and functional partitioning

MERCER S COMPENSATION ANALYSIS AND REVIEW SYSTEM AN ONLINE TOOL DESIGNED TO TAKE THE WORK OUT OF YOUR COMPENSATION REVIEW PROCESS

NI USB-6008/6009 OEM USER GUIDE

EBERSPÄCHER ELECTRONICS automotive bus systems

Automatic Validation of Diagnostic Services

F9 Integration Manager

DME4 V1.23 ( ) V1.30 ( ) V1.31 ( ) V1.32 ( ) V1.33 ( ) V1.34 ( ) V1.35 ( ) V2.00 ( ) V2.

Frequency Hopping for GSM Base Station Tests with Signal Generators SME

International comparisons of obesity prevalence

Remote PC Guide for Standalone PC Implementation

SQL Server 2008 R2 Express Edition Installation Guide

How To Use An Hm804X Series Of Power Supplies

Agilent N5970A Interactive Functional Test Software: Installation and Getting Started

NASDAQ OMX Nordic Business Continuity Plan Description

Ethernet QoS Test Multi-stream Network Quality Evaluation

Manual. Vector XL log Config. CANcaseXL log Configuration Version 4.1 English

CISPR 17 Measurements

Configuring Simulator 3 for IP

How to set up Inbound Load Balance under Drop-in Mode

Keysight M9485A PXIe Multiport Vector Network Analyzer. Configuration Guide

ORGANISATION FOR ECONOMIC CO-OPERATION AND DEVELOPMENT

Cisco CCNP Optimizing Converged Cisco Networks (ONT)

Agilent BenchVue Software (34840B) Data capture simplified. Click, capture, done. Data Sheet

AN4108 Application note

Using Borland Deployment Op-Center to manage CaliberRM, StarTeam, and Mercury TestDirector server environments

Technology Note. PCI Express

How To Install A Gel Doc Xr+ Camera On A Computer Or Mouse Or Tv (For A Powerbook) With A Zoom Lens (For An Ipa) With An Iphone Or Ipa (For Mac) With The Zoom Lens

Installing and Configuring Microsoft SQL Server 2012 Express PI AF

PXI and AXIe Modular Instrumentation

1.5 GHz Active Probe TAP1500 Datasheet

Transcription:

Version 1.0 2009-03-09 Author Restrictions Abstract Carsten Böke Public Document Time synchronization is central for FlexRay systems. This document describes how to achieve synchronism for two FlexRay buses via a FlexRay - FlexRay gateway. Table of Contents 1.0 Overview...1 1.1 Use Case / Motivation...1 1.2 Problem that is Handled in this Application Note...2 2.0 Synchronizing two FlexRay Buses...2 2.1 Solutions...2 2.1.1 Hardware Controlled Synchronization...3 2.1.2 Software Controlled Synchronization...3 2.2 Benefits vs. Restrictions...4 3.0 Demonstrator...5 3.1 Goal...5 3.2 Hardware/Software Setup of the Demo...5 3.3 Observation / Result...7 4.0 Additional Resources...7 5.0 Contact...7 1.0 Overview One FlexRay bus provides a global system time on which all s can synchronize. When two FlexRay buses are required, they run normally independently of each other. Even if both buses implement the same schedule, they have an offset to each other and they possibly drift. The synchronous FlexRay time for s on the different buses gets lost. Moreover, when data must be transferred from one bus to the other, a so-called FlexRay FlexRay gateway creates a non-negligible delay in terms of multiples of the cluster s period (in any of the directions), because of the time-triggered bus access. For event-triggered buses (like CAN) the delay only depends (on low bus loads) nearly on the reaction delay (which is much smaller than the message s cycle period) of the gateway application. Additionally, due to a normally non-existing synchronization between both FlexRay clusters, they will drift to each other. Therefore, the routing delay may vary during run-time and is in-deterministically. 1.1 Use Case / Motivation A FlexRay FlexRay gateway can be used to separate one FlexRay bus into two segments in order to manipulate the frames payload while forwarding them. This allows the modification of FlexRay signals of real existing s. These data manipulations might be necessary, because responses of a specific real existing under test should be checked while stimulated with dedicated and manipulated input frames from the remaining real s. In this case the original FlexRay cluster is split into two real existing FlexRay buses that are interconnected by a FlexRay FlexRay gateway, while the application assumes only one bus and no gateway. This FlexRay FlexRay gateway normally forwards any message unchanged from one bus to the other. Thereby specific messages can be Copyright 2009 - Vector Informatik GmbH Contact Information: www.vector-informatik.com or ++49-711-80 670-0 1

manipulated / adapted or even substituted / deleted by the gateway application. Such a gateway can be implemented by DENoe.FlexRay using for both buses the same database description (FIBEX file). Another application scenario might be the integration of a new version of a FlexRay (with new TDMA parameters) into an already existing (old) cluster. The FlexRay FlexRay gateway will then logically interconnect both different clusters. 1.2 Problem that is Handled in this Application Note Both real existing clusters that are connected via the FlexRay FlexRay gateway build only one virtual cluster. Both real clusters should run synchronously and the gateway s forwarding delay should be minimized. This application note presents two possible solutions (one in hardware and one in software) in order to run both FlexRay buses synchronous to each other. That means the offset and drift will nearly be set to 0. This allows minimizing the propagation delay of the FlexRay FlexRay gateway (in either one or both directions). 2.0 Synchronizing two FlexRay Buses All FlexRay controllers that are connected to a FlexRay bus support a distributed clock synchronization. This is achieved by sending specific reference messages. The measured deviation of the local observed reception time to the globally defined expected send time can be used to correct the local clock. Under well-defined assertions this assures a minimal but limited maximum deviation of all local clocks. The average time of all local clocks is known as the virtual global time base. In order to synchronize two FlexRay buses their local synchronization mechanism must be combined (via hardware) or a higher-level protocol in software must take influence on the clock control of both buses. 2.1 Solutions A FlexRay controller can handle two FlexRay channels (A/B) for one bus. The clock synchronization can work with either one or both channels. If the application requires only one channel, then the second channel can be used for synchronization with the other bus (see Hardware Controlled Synchronization). Each FlexRay controller allows the to add/subtract values from the local clock correction vector via the CHI (Controller Host Interface). In normal application scenarios this is not required. This feature allows synchronizing the cluster (under certain circumstances) to a super ordinate master clock. This master clock might be the FlexRay clock of another bus. 2

2.1.1 Hardware Controlled Synchronization This solution is applicable to one channel clusters. A pre-requisite is that the FlexRay TDMA parameters of both FlexRay clusters must be absolutely equal. The FlexRay FlexRay gateway extends the FlexRay cluster to a two channel cluster. But only the gateway s FlexRay interfaces use the second channel in order to run both segments synchronously. The topology is depicted in Figure 1. A B C Gateway IF 1 IF 2 D Channel A Segment 1 Channel A Segment 2 Figure 1 Hardware Synchronization via Channel B Channel B This topology is not fully supported by the FlexRay specification. The FlexRay specification does not allow the splitting of channel A into two segments while the second channel B is not split (IF1 and IF 2 of the gateway use the same line for channel B but different ones for channel A). For this reason additional assumptions must be made: 1. On segment 2 of channel A exactly one extra (except the gateway s second interface) that is sending a startup and/or sync frame must be connected (additional non-sync nodes are allowed). This Sync Node may be the cold start helper of the gateway s second interface itself. 2. On segment 1 of channel A at least one startup and/or sync node (in addition to the gateway s first interface) must exist. This Sync Node may be the cold start helper of the gateway s first interface itself. 3. The s on the different segments of channel A and the gateway must be started in a well defined order. It must be assured that either segment 1 or segment 2 is already synchronous before the other segment will be started. 4. It must be possible to send two additional startup/sync frames on channel A (one for segment 1 and the other for segment 2). These startup/sync frames must be sent by the gateway (one per interface) on both channels (A and B). 5. For both segments the same FlexRay schedule (including the same TDMA parameters) must be implemented. 6. The gateway s FlexRay TDMA parameter pchannels for both interfaces must be set to 3 in order to operate with both channels. 7. First segment 1 with IF 1 must be started and then segment 2 with IF 2 must be started. If these requirements are fulfilled, then both segments will run absolutely synchronously (no offset and no drift). In fact the common channel B connects both segments of channel A to ONE FlexRay cluster. Nevertheless, all frames that have to be routed from one segment to the other by the gateway will have a routing delay of at least one cycle length of the FlexRay bus. The received frame of one segment can be sent soonest at the next possible cycle according to the frame s scheduling on the other segment. This is valid for both directions. Because of the synchronous execution of both segments the minimal routing delay will be equal for both directions. 2.1.2 Software Controlled Synchronization The software controlled synchronization is applicable also to two channel clusters. Both clusters must not necessarily implement the same TDMA cluster parameters (nevertheless, the parameters must be compatible in 3

order to find common synchronization points, e.g. the cluster cycle period must be a multiple of the other cluster s cycle period). The hardware topology is depicted in Figure 2. A B C Gateway influence clock correction D IF 1 IF 2 Channel A Cluster 1 Channel A Cluster 2 Channel B Cluster 1 Channel B Cluster 2 Figure 2 Software Synchronization of two Clusters via the External Clock Correction of Interface 2. Also for this solution some restrictions must be fulfilled in order to work properly: 1. On cluster 2 exactly one extra (except the gateway s second interface) that is sending a startup and/or sync frame must be connected (additional non-sync nodes are allowed). This Sync Node may be the cold start helper of the gateway s second interface itself (when D is a non-sync node). 2. The cycle period of cluster 1 must be a multiple of the cycle period of cluster 2 (or vice versa). 3. A special program on the gateway must periodically compare the cycle periods of both FlexRay clusters. According to this deviation it must influence the clock synchronization of interface 2 in order to explicitly prolong or shorten the cluster s cycle period by manipulating the external clock correction values. This solution cannot guarantee absolutely synchronously running clusters. Their drift can be eliminated, but a minimal offset may remain. Additionally the offset (+/- a specific minimal delta) can deliberately be chosen, e.g. it is not required to be 0. This allows minimizing the routing delay for one direction (while the routing delay for the other direction increases). 2.2 Benefits vs. Restrictions The following table summarizes the main benefits and restrictions of both solutions: Measure Hardware Solution Software Solution TDMA Parameters of Cluster 1 compared to Cluster 2 equal Number of separated Sync Nodes 1 1 compatible Usable Application Channels only A A, A and B Time required for Synchronization approx. none 5 min Achievable Precision 100% ± 50 us Table 1 Benefits and Restrictions of the Hardware and Software Controlled Synchronization Solution 4

3.0 Demonstrator A sample configuration is delivered with DENoe.FlexRay version 7.1 SP3. See start menu CANoe Demos DENoe.FlexRay 2 Cluster Gateway. In this demo refer especially to the desktop FRFR Synchronization. 3.1 Goal Synchronize two FlexRay clusters by software. The time difference between the cycle starts of both clusters can be set to a desired offset value. After the requested offset is achieved the clusters will be synchronized within a given deviation interval in order to prevent drifting of the clusters. 3.2 Hardware/Software Setup of the Demo The configuration of CANoe uses 2 FlexRay measurement channels, resp. clusters. Both clusters are assigned the same FIBEX database that describes the PowerTrain example of the DENoe.FlexRay s system demo. All s are simulated and are distributed onto both FlexRay networks. Additionally a gateway is simulated by CANoe that forwards all FlexRay messages from the first to the second cluster and vice versa. For the time synchronization of both FlexRay clusters the gateway s CAPL program includes the CAPL program FRFRSynchronize.cin. Additionally the database EnvVar_FRFRSync.dbc with the definitions of some required environment variables is attached to the second cluster. 5

Figure 3 Screenshot of the Demo Application The panel FRFR Sync Control that is shown in Figure 3 controls the synchronization (resp. the CAPL include). With the sliders you can request a particular difference of the cycle starts of both clusters. The shifting of the 2 nd cluster will be started when the 'Automatic Adjust' is enabled. The shifting is performed by shortening or prolonging the 2 nd cluster's cycle time. This is achieved by manipulating the external offset and rate correction of the FlexRay controller. Note: If you run this demo in 'Real bus' mode, then you must pay attention to the following requirements: 2 VN interfaces have to be connected to DENoe and must be mapped to channel FlexRay 1 and FlexRay 2. Do NOT connect any nodes to the interfaces! All nodes are currently simulated. Do NOT interconnect the FlexRay channels between the interfaces! You must connect the hardware synchronization line between both interfaces by a 'Sync cable'! You must enable the hardware synchronization in the hardware configuration settings of DENoe. Pay attention to the Write window that the hardware time synchronization works properly during run-time. 6

3.3 Observation / Result The panel FRFR Sync Control shows you the requested and the current time difference between both clusters ( Cluster Offset, resp. Cycle Offset ). The Graphics window FRFR Start Of Cycle 0 shows you the positions of the cluster s cycle starts only for cycle 0 as a peak for both clusters. This allows you to estimate the total time difference between both clusters ( Cluster Offset = value of environment variable envdiff_soc0_fr1fr2 ) in the range from [0, 64 * gdcycle [. The Graphics window FRFR Cluster Start of All Cycles shows you the positions of the cluster s cycle starts for all cycles. This allows you to estimate the time difference within one cycle ( Cycle Offset = value of environment variable envdiff_soc_fr1fr2 ): [0, gdcycle [ ). Observe that the shifting takes considerable time until the requested offset is reached. 4.0 Additional Resources VECTOR APPLICATION NOTE AN-IND-1-003 Time Synchronization in Multibus Environments 5.0 Contact Germany and all countries not named below: Vector Informatik GmbH Ingersheimer Str. 24 70499 Stuttgart GERMANY Phone: +49 711-80670-0 Fax: +49 711-80670-111 Email: info@vector-informatik.de France, Belgium, Luxemburg: Vector France SAS 168 Boulevard Camélinat 92240 Malakoff FRANCE Phone: +33 1 42 31 40 00 Fax: +33 1 42 31 40 09 Email: information@vector-france.fr Sweden, Denmark, Norway, Finland, Iceland: VecScan AB Theres Svenssons Gata 9 41755 Göteborg SWEDEN Phone: +46 31 764 76 00 Fax: +46 31 764 76 19 Email: info@vecscan.com United Kingdom: Vector GB Ltd. Rhodium Central Boulevard Blythe Valley Park Solihull, Birmingham West Midlands B90 8AS UNITED KINGDOM Phone: +44 754 9001197 Email: info@vector-gb.co.uk USA, Canada, Mexico: Vector CANtech, Inc. 39500 Orchard Hill Pl., Ste 550 Novi, MI 48375 USA Phone: +1 248 449 9290 Fax: +1 248 449 9704 Email: info@vector-cantech.com Japan: Vector Japan Co. Ltd. Seafort Square Center Bld. 18F 2-3-12, Higashi-shinagawa, Shinagawa-ku Tokyo 140-0002 JAPAN Phone: +81 3 5769 7800 Fax: +81 3 5769 6975 Email: info@vector-japan.co.jp Korea: Vector Korea IT Inc. Daerung Post Tower III, 508 182-4 Guro-dong, Guro-gu Seoul, 152-790 REPUBLIC OF KOREA Phone: +82 2 2028 0600 Fax: +82 2 2028 0604 Email: info@vector-korea.com 7