an introduction to canape - vector · calibration ram. memory image file in canape 0x0000 0x03ff...

35
V0.1 | 2016-02-22 An Introduction to CANape Measurement and Calibration

Upload: others

Post on 24-May-2020

90 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

V0.1 | 2016-02-22

An Introduction to CANape

Measurement and Calibration

Page 2: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

2

Contents

� Not just internal ECU parameters

� Bus Monitoring of networks

� Model based development

� IO logging

� GPS and Video logging

� Create virtual signals

� Calibration Protocol: An Introduction

� What is measurement and calibration?

� Implementation of the calibration protocols - CCP and XCP

Page 3: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

3

HistoryWhat is calibration?

� Setting a value to a defined level

� Modifying values inside the control unit

� Why do we need to calibrate?

> Same product - different requirements.

> Suspension Control

> Engine management

> New Legislation

> Airbag deployment

> Tire Pressure Monitoring

> Different modes

> Electrical Power Assisted Steering (EPAS)

Page 4: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

4

Challenges of Calibration and MeasurementWhat can we calibrate?

Page 5: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

5

HistoryWhat can we measure?

� External and Internal ECU Values

� Temperature > External and Internal

> Exhaust

> Engine

> Oil

� Pressure> Turbo pressure – input and output

> Air intake

� Frequency> Rotation of cam shaft

> PWM waveform for electric motor

� Strain> Vibration on engine mounts

� Voltage> Battery voltage

Page 6: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

6

CANalyzerCANape

CAN node 1e.g.

engine control

CAN node 2e.g.

air conditioning

CAN node je.g. gear box

control

CAN node ke.g. ABS

CAN msg

CAN msg

CAN msg CAN msg

HistoryProblem

FL speed

FR speed

FL Temp

FR Temp

Gear No

Clutch posn

100ms

50ms

250 ms

Eng SpeedVehicle Temp

500 ms

Page 7: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

7

What is CCP and XCP?

� CANape works on the official ASAM standards

� CAN Calibration Protocol CCP

� Universal Calibration Protocol XCP

� Why Standards?

ASAM: Association for Standardization of Automation and Measuring Systems

ECU

Measurement and calibration system

CCP / XCP

ASAM MCD 1MC

CCP / XCP

A2LASAM MCD 2MC

ECU description file

*.A2L

XCP-on-CAN

XCP-on-Flexray

XCP-on-Ethernet

XCP-on-Another

� Variable Name

� Memory Location

� Data Type

� Engineering Units

Bosch – Engine

Schraeder – Tire Pressure

ZF – Transmission

TRW – Power Steering

Valeo – Cruise Control

Page 8: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

8

CCP and XCP Protocol fundamentalsData acquisition

� Depending on the ECU implementation

� Asynchronous acquisition of measurement data

> Polling mode: request / response

� Synchronous acquisition of measurement data (optional)

> Cyclic mode: Periodic tasks control the data acquisition(e.g. every 10 ms)

� CAN Message Event

� Other Events

Page 9: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

9

CCP and XCP Protocol fundamentalsBasic concept

DAQCommand

Response Error

Event

� CCP and XCP use the master-slave principle

Master

CCP/XCP drivers

Slave

CCP/XCP drivers

DAQ

� DAQ=Data Acquisition

Page 10: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

10

Synchronous data acquisitionCyclic mode

time

x x

x xx

x

10ms

value

Measurement signal 1

Measurement signal 2

Writes an address table

Writes an address table

10m

s inte

rval

Master ECU

DAQ table complete

Start the measurementSend Data 600

Page 11: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

11

CCP and XCP Protocol fundamentalsOverview

Vector-HW

Interface

Channel 1 Channel 2

CAN

CANape

RAM

Application

CAN driver

0x5000 Temperature

0x5001

0x5002 Pressure

0x5003

0x5004 Time

EEPROM

CAN Controller

CAN Transceiver

ECU

CCP/XCPonCAN Diag

Page 12: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

12

CANape: Implementation of CCP and XCPOverview

Measurement configuration

CAN

LIN

FlexRay

Device: CAN / CCP / XCP on CAN

Device: KWP / UDS on

CAN

Device: LIN / XCP on

LIN

Device: FLX / XCP on

FLX

Graphic window

Diagnostic console

CANape display pages

Calibration window

Device: GPS , analog measurement

modules

..Recorder 1: Recorder n:

Device configuration

<F4>

CAN

CDD

DBC

LDF

Fibex

A2LCCP XCP

LIN

FR

CAN

Page 13: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

13

Measuring via CCP/XCPMeasurement configuration

� Displays the ECU resources and bus load needed by the measurement configuration

� Number of signals, bytes and DAQ list utilization per event

� Bus load

Page 14: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

14

Measuring via CCP/XCPInsert Measurement Signals in Display Window

D&D

Page 15: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

15

Calibrating via CCP/XCPCalibration Window Overview

Page 16: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

16

ECU Measurement and Calibration XCP-on-Ethernet

MC Tool

� Two principle measurement concepts:

> RAM data copy up to 3 MByte/sec with µC load

> Data Trace up to 45 MByte/sec without µC load

> ECU „Cold Start“ measurement possible with both concepts

JTAG = Joint Test Action Group DAP=Device Access Port

VX1000 Modular Measurement & Bypass Concept

Standard Debug / Data-Trace Ports:

- JTAG / DAP(2) / DigRF- NEXUS / AURORA

ECU

Standard ASAM Interface:- XCP on Ethernet

MeasurementTool

Bypass Execution Unit

XCP-on-EthernetPlugOnDevicemax.

10 cm

BaseModule

max. 7,5 m

Automotive qualified:- High Speed Cable

Page 17: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

17

Bus Monitoring

� Device Wizard allows network monitoring

� Supply dbc, LDF, Fibex, XML database

� Interface hardware is required

Network Monitoring

Digital/Analog Measurement - Log the Environment

Page 18: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

18

Log the Vehicle Environment - GPS

� CAN-2-GPS or USB-2-GPS

� Device with *.db or *.dbc

12.937408 V 52.3768916666667 36.81 Seconds 22 Minutes 52 Degrees-1.78675277777778 12.31 Seconds 47 Minutes-1 DegreesLongitudeD

LongitudeM

LongitudeS

Function_Longitude

LatitudeD

LatitudeM

LatitudeS

Function_Lattitude

AIN0

Page 19: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

19

Log the Vehicle Environment - CANape Option GPS

� Use On-line or off-line maps

� Use OpenStreet Map

Page 20: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

20

Functions

� Functions are applied to signals to create virtual functions

� Created in the Function Editor, or selected from a set of functions

� Selected from the Symbol Explorer

� Applied in the display windows

Page 21: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

21

Panel Editor

Page 22: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

22

Common Concept

Calibration Concept

� Initialization values are copied from the Flash to the RAM and applied there.

� Requirement: The Calibration RAM is large enough for copying all calibration parameters.

� In CANape you can create a copy of the Calibration RAM.

Memory image file

in CANape

0x0000

0x03FF

0x0400

0x63FF

programming code, non-modifiable

characteristic curves and maps

Calibration parameters,

characteristic curves and maps

Flash

ROM

0x6400

0x87FF

0x83FF

RAM for program-internal purposes and measurement values

Calibration RAM

RAM

0x6400

0x63FF

0x2400

0x23FF

0x0400

0x8400

0x87FF

Page 23: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

23

Memory Image File / Cache

Calibration Concept

� Multiple partial sectors can be defined

� Offline calibration possible

� Mirror memory must be supported by the ECU –> checksum

� Hex file will be generated during the first connect process

� Alternatively Hex file from software development can be inserted as a memory image file

Page 24: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

24

Calibration Concept

Memory Page Switching in CANape

� Page switching function must be implemented into the ECU from the software engineer.

� Switch device to FLASH

� Switch device to calibration RAM

Program code, Non-modifiable

parameters, curves and maps

Variable parameters, curves and maps

Flash memory

0x83FF

Calibration RAM

RAM

0x6400

0x23FF

0x0400

ECU accessXCP access

ECU accessXCP access

Page 25: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

25

Overview

Calibrating

Cache(Memory image file) Calibration RAM

CANape ECU

Parametercurves

maps

Parametercurves

maps

Online-/Offline Mode

Direct-/ Indirect Calibration Mode

Page 26: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

26

Hex Calibration Window

Calibrating

� Calibration without the support of critical borderlines

� RAM addresses highlighted in yellow are defined in the database

� Tooltip for edited memory address

Page 27: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

27

Overview

Parameter Set Files

CANape *.PARASAM - CDF20 *.cdfxBosch/Siemens *.CSV

Bosch *.DCMBosch - PaCo-Datei *.xml

MatrixX *.MSCANape *.C

Matlab file *.M

Binary filesIntel-HEX *.HEX

Motorola S files *.MOTMotorola S files *.S*

Renault *.ulp

CANape *.PARASAM - CDF20 *.cdfxBosch/Siemens *.CSV

Bosch *.DCMBosch - PaCo-Datei *.xml

Binary filesMotorola S file *.S*

Motorola S file *.MOTIntel-HEX *.HEX

Renault *.ulp

Save as…Load parameter set from..

ECU

Calibration Ram

Flash storage

CCP/XCP

CANape or

CDM studio

ASAP2 *.a2l

Page 28: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

28

Saving & Loading Parameter Set Files

Parameter Set Files

� Parameter files can be saved partially or completely

� Parameter files can be loaded partially or completely

� Parameter files can be viewed and edited with vCDMStudio

� Calibration History can be saved and reviewed as snapshots

Page 29: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

29

Save Parameter Set File - Overview

Parameter Set Files

� All

� All calibration objects from one selected device are saved ( *.par, *.dcm, ...) (see next slide).

� All calibration windows

� Saves the current values of the calibration objects in all calibration windows.

� Parameter set file could include values from different devices.

� In Binary format

� Saves the current values of all calibration objects from one selected device in a binary file (Flash- or RAM addresses are possible).

Page 30: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

30

Scripts and Calibration

Scripts

� Load or Save parameter set

� CCPsim.LoadParameterset("NAME.PAR");

� CCPsim.SaveParameterset("NAME.PAR");//.HEX, .S, .TXT, ..

� Measurement and Calibration

� x = CCPsim.channel1;

// x = DeviceName.ObjectName

� CCPsim.ampl=5;

� CCPsim.KL2[2]=0;

� CCPsim.KF3[0][0]=0; // Column 0 and Row 0

� CCPsim.KF3[1][5]=0; // Column 1 and Row 5

Popup menu of the function editor

Page 31: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

31

Overview

Flash

A new dataset can be flashed with the XCP driver directly.

Alternatively the flashing process could be carried out via the Vector vFlashprogram. The HEX file will be generated from CANape then.

Page 32: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

32

[Save and flash parameter set…]

Flash

e.g. programming code, non-modifiable characteristic curves

and maps

Calibration parameters,

characteristic curves and maps

Flash storage

0x83FF

RAM for program-internal purposes and measurement values

Calibration RAM

RAM

0x6400

0x63FF

0x2400

0x23FF

0x0400

0x8400

0x87FF

Step 1

Step 2

(period)

(ampl)

*.par

period = 5

ampl = 99Step 3

Upload from RAM

Upload from flash

Mixing a new

HEX file

Step 4: Download to flash

*.hex

0x0420 = 115

0x0421 = 80

0x0420 = 5

0x0421 = 99

*.hex

Page 33: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

33

CANape in the V CycleCANape

Develop, Test, Calibrate and Verify Systems and Vehicles

Architecture Design & Requirements Management

PREEVision

CANdelaStudio/ODXStudio

Diagnostic System Specification

CANape

Develop, Calibrate and TestModels

CANape

Develop, Calibrate and TestComponents and ECUs

Page 34: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

34

Summary

� Measurement and Calibration of internal parameters

� CCP and XCP protocols

� Interface to external hardware, Cameras, GPS etc

� Monitor all major network types

� Log from many different sources and replay data synchronously

� Functions for searching for events and analysing data

� RAM can be calibrated

� Parameters can be permanently saved via Flashing

Page 35: An Introduction to CANape - Vector · Calibration RAM. Memory image file in CANape 0x0000 0x03FF 0x0400 0x63FF programming code, non-modifiable characteristic curves and maps Calibration

35 © 2016. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.1 | 2016-02-22

Author:Newton, PeterVector GB

For more information about Vectorand our products please visit

www.vector.com