You are on page 1of 9

Synchronization Options between VX1000 Interfaces in CANape

2019-09-26
Support Note SN-IMC-1-021_Synchronization_options_between_VX1000_interfaces_in_CANape

Author(s) Achim Mayer


Restrictions Public Document

Table of Contents
1 Overview .....................................................................................................................................2
2 Synchronization options...............................................................................................................2
2.1 No synchronization...............................................................................................................2
2.2 Software synchronization .....................................................................................................2
2.2.1 GET_DAQ_CLOCK ....................................................................................................2
2.2.2 GET_DAQ_CLOCK_MULTICAST ..............................................................................2
2.3 Hardware synchronization ....................................................................................................3
3 Step by step guide .......................................................................................................................3
3.1 Software synchronization .....................................................................................................3
3.1.1 Get_DAQ_CLOCK .....................................................................................................4
3.1.2 GET_DAQ_CLOCK_MULTICAST ..............................................................................4
3.2 Hardware synchronization ....................................................................................................5
4 VX1000 DAQ “Timestamp” ..........................................................................................................8
4.1 VX clock...............................................................................................................................8
4.2 ECU native...........................................................................................................................8
4.3 ECU synchronized ...............................................................................................................9
5 Contacts ......................................................................................................................................9
Synchronization Options between VX1000 Interfaces in CANape

1 Overview
All measurement and ECU interfaces use their own time stamps for the measured data.
Because of the nature of these clocks, the time stamps are - more or less - influenced by drift and
jitter.
Without synchronization, the time stamps of different clock sources tend to drift. This drift destroys the
time correlation between signals created by different clock sources/interfaces.
To precisely compare signals in long time measurements it is necessary to use a synchronization
mechanism to reduce or eliminate the drift effects. Jitter effects can’t be eliminated.

This document describes the different synchronization options for VX1000 interfaces, the advantages
and disadvantages of these options and which is most suitable in which use case.
In the second part, the synchronization options are explained step by step.
Furthermore this document explains which VX1000 DAQ “Timestamp” should be used and how it is
configured.

2 Synchronization options
In this chapter, the different synchronization options within CANape are explained.
The different synchronization options can be also mixed in one project.
You can find more detailed information about synchronization in chapter “9 Time synchronization” from
Accessories for Network Interfaces CAN/LIN/IO/ETHERNET/FlexRay.

2.1 No synchronization

Caution
In normal use cases it is higly recommended to use some sort of synchronization.
No synchronization is only advised for special use cases, e.g. verifying time stamps from
an XCP slave.

2.2 Software synchronization

Software synchronization is a synchronization option, where the XCP master synchronizes the
incoming time stamps from different XCP slaves and other devices via software.
This is the easiest way to synchronize XCP slaves with CANape.

Caution
Problems might occur with high data rates, especially with bursts, or when Ethernet buffers
on a computer are not frequently emptied. Computers with low performance can also
cause problems.

Workaround
Using Vector USB-to-Ethernet adapter (VX0312) can solve this problem.

2.2.1 GET_DAQ_CLOCK

“GET_DAQ_CLOCK” is an optional XCP command that allows the master to get the slaves time
stamp in cyclic intervals. It can be used to synchronize different XCP slaves.

2.2.2 GET_DAQ_CLOCK_MULTICAST

“GET_DAQ_CLOCK_MULTICAST” is an optional XCP command. It is sent out via broadcast to all


slaves in one network. It is available with XCP protocol version 1.3. For VX1000 interfaces it is
available since VXTools 3.7.
ECU must support the optional command GET_DAQ_CLOCK_MULTICAST.

Copyright © 2019 – Vector Informatik GmbH 2


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

It is more accurate than GET_DAQ_CLOCK.

Caution
Interface must support Broadcast commands. (Ethernet via VN8900 does not support it).

2.3 Hardware synchronization

Hardware synchronization is a synchronization option, where the master synchronizes the incoming
time stamps from different XCP slaves and other devices via sync lines.
One pulse master device sends a SYNC Pulse and all connected devices send their time stamp to
CANape.
If hardware synchronization is possible it is recommended to use it.

Note
Inside the VX1135 and VX1132 devices is an internal sync line, it can be used to
synchronize the CAN/FlexRay interfaces and the POD interface.
→ You should always synchronize the CAN/FR and POD (XCP-on-Ethernet) interfaces
inside one VX1000 device via hardware synchronization.

Note
Hardware synchronization is available for most VX1000, VN and CSM devices.

Caution
Hardware synchronization is only available when the time stamp is generated inside the
interface. E.g. CAN/FR monitoring or VX devices with VXclock or ECU synchronized time
stamp type.

3 Step by step guide

3.1 Software synchronization

Go to the Vector Hardware Config|Global Settings and set Software time synchronization to
YES.

Figure 1 - Vector Hardware Config

Note
Software time synchronization is set to YES by default. In case of no sync, CANape is
capable to disable this setting in the hardware config temporarily.

Go to the CANape Backstage area and select Options|Miscellaneous. Now select


[Software] as synchronization method.

Copyright © 2019 – Vector Informatik GmbH 3


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

Figure 2 - CANape synchronization settings: Software

→ Now CANape will use software synchronization to synchronize devices.

3.1.1 Get_DAQ_CLOCK
To use the “GET_DAQ_CLOCK” command, the software synchronization method should be enabled
as explained in 3.1 Software synchronization.
For a CANape version ≤ 14, you have to manually enable the checkbox [Cyclic time query], under
[Software].
Furthermore, “GET_DAQ_CLOCK” must be enabled in the XCP driver in the ECU and in the IF data
part of the A2L file.
→ CANape will send the GET_DAQ_CLOCK command every second to the XCP slave. This can be
observed in the Trace window.

3.1.2 GET_DAQ_CLOCK_MULTICAST
To use the “GET_DAQ_CLOCK_MULTICAST” command, the software synchronization method
should be enabled as explained in 3.1 Software synchronization.
Furthermore, “GET_DAQ_CLOCK_ MULTICAST” must be enabled in the XCP driver in the ECU and
in the IF Data part off the A2L file.
Your XCP slave must support XCP protocol version 1.3 or higher, you can check the XCP protocol
version in the CANape Device Configuration|Device|Protocol

Copyright © 2019 – Vector Informatik GmbH 4


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

Figure 3 - CANape settings protocol layer version

→ When more than one XCP slave is available on the same network CANape will send the
“GET_DAQ_CLOCK_ MULTICAST” command every second.

3.2 Hardware synchronization

To use hardware synchronization, connect all VN/VX devices to the sync line.
More information about connecting the different VN/VX devices can be found here: Timestamp
Synchronization with Multiple VX1135 or Other VX1000 interfaces

Go to the CANape Backstage area and select Options|Miscellaneous. Now select


[Hardware] as synchronization method.

Figure 4 - CANape synchronization settings: Hardware

Note
Hardware synchronization for VX1000 devices in CANape is only possible, when a VX
device was set to VX mode once. (Figure 5 - CANape settings: Enabling VX Mode)

Furthermore the configured VX time stamp has to be VX clock or ECU synchronized (see
chapter 4 VX1000 DAQ “Timestamp”).

Copyright © 2019 – Vector Informatik GmbH 5


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

Figure 5 - CANape settings: Enabling VX Mode

If hardware synchronization is successfully enabled, CANape will automatically select a pulse master.
In the Write window, you can see which device is selected and if hardware synchronization was set up
successfully.

Figure 6 - Write Window: Hardware synchronization prints

If you want to select one explicit device as pulse master, you can assign pulse master to a special
device.

Copyright © 2019 – Vector Informatik GmbH 6


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

Figure 7 - CANape settings: Assigning Pulse master

Note
For devices without sync line software synchronization will be used.

Copyright © 2019 – Vector Informatik GmbH 7


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

4 VX1000 DAQ “Timestamp”


There are three different VX1000 DAQ time stamp types.
> VX clock
> ECU native
> ECU synchronized
If possible ECU synchronized should be used.

4.1 VX clock

VX clock time stamp is taken from an internal clock inside the VX device.
VX clock can be selected in VXconfig under Base Module|Target|General|”DAQ Timestamp Type”.

Figure 8 - VXconfig Settings: VX clock

Use case:
VX clock is useful for the first implementation, because there is no need to configure a timer in the
VX1000 application driver. Furthermore, it is usefull if there is no timer available in the ECU or if the
timer is not accurate enough.

4.2 ECU native

ECU native time stamp is taken directly from an ECU timer.


ECU native can be selected in VXconfig under Base Module|Target|General|”DAQ Timestamp
Type”.
To receive correct time stamps you should also define the timer “Timestamp Unit” and the number off
Ticks per Unit in VXconfig.

Figure 9 - VXconfig Settings: ECU native

You need to configure VX1000_CLOCK() in form of a cyclically incremented free-running 32-bit


counter in the VX1000 application driver configuration file: VX1000_cfg.h

Example
#define VX1000_CLOCK() utiSysClk()

You must define the time resolution of the counter using VX1000_CLOCK_TICKS_PER_US.

Example
For a counter that is incremented at 20 MHz you would need to define the following:
#define VX1000_CLOCK_TICKS_PER_US 20

Copyright © 2019 – Vector Informatik GmbH 8


Contact Information: www.vector.com or +49-711-80 670-0
Synchronization Options between VX1000 Interfaces in CANape

Use case:
It can be used, if software synchronization is used and the “original” ECU time stamp should be used.

Note
When using Infineon TriCore Aurix Targets the System Timer STM0 is used by default, so
only the resolution needs to be defined.

Caution
If measurement over reset is used, declining time stamps may occur.

4.3 ECU synchronized

ECU synchronized time stamp is a mixture between VX clock and ECU native clock.
Both clocks are synchronized, through that ECU synchronized clock is very accurate to ECU clock, but
can be also synchronized with clocks from other devices.
ECU synchronized can be selected in VXconfig under Base Module|Target|General|”DAQ
Timestamp Type”.

Figure 10 - VXconfig Settings: ECU synchronized

You need to configure the VX1000_CLOCK() and resolution off VX1000_CLOCK in the VX1000
Application Driver Configuration File: VX1000_cfg.h (4.2 ECU native).
Additionally you need to to configure the ECU-timer address and resolution in VX1000_cfg.h.

Example
#define VX1000_CLOCK_TIMER_ADDR 0xFC068004UL
#define VX1000_CLOCK_TIMER_SIZE 32U

Use case:
ECU synchronized time stamp type should always be used, because it is the most precise time stamp
type. It can be used for every synchronization method and for measurement over Reset. Since
VXTools version 4.0 it can also be used for Hssl pods.

Note
When using Infineon TriCore Aurix Targets, by default, the System Timer STM0 is used, so
only the resolution need to be defined.

5 Contacts
Please find the contacts of Vector Informatik GmbH and all subsidiaries worldwide via:
https://www.vector.com/int/en/company/contacts/

Copyright © 2019 – Vector Informatik GmbH 9


Contact Information: www.vector.com or +49-711-80 670-0

You might also like