JTAG-optimisation for CANoe Anton Karlsson Department of Automatic Control
List of Figures6.1 Schematics for the light version test rig. . . . . . . . . . . . . . . . . 346.2 Syntax of the file to be loaded in the application.
AbbreviationsAPI Application Programming InterfaceAWD All-wheel DriveCAN Controller Area NetworkCAPL CAN Access Programming LanguageCPU Central Proces
1Introduction1.1 BorgWarner and the productBorgWarner TorqTransfer Systems (TTS) in Landskrona is a part of the Americanautomotive industry components
1.2 Testingwith a lot of information about the status of the car such as steering angle, throttleposition, wheel speed, acceleration, etc. via CAN-bus
Chapter 1. IntroductionFurthermore a number of non-functional tests are performed on areas such asperformance and stability.1.3 Problem formulationIn
1.4 Related work1.4 Related workSimilar work do not seem to have been published in the past. It is possible thatcompanies using similar tools and equi
2Background2.1 CAN-busThe CAN protocol is an ISO standard for serial data communication which was de-veloped by Roberth Bosch GmbH [3] during the ’80s
2.1 CAN-busFigure 2.1 The standard identifier CAN frame with one byte of data.• the Remote Frame, and• the Error FrameThe Data frame carries, as the na
Chapter 2. Backgroundwith the lower ID will succeed. The node trying to transmit the message with thehigher ID will wait and try again.2.2 Software Te
2.2 Software Test RigFigure 2.2 The VT-system with its modules mounted in a 19” rack cabinet. Real-time module to the far left. Power supply below the
Msc Thesis ISRN LUTFD2/TFRT--5945--SE ISSN 0280-5316 Department of Automatic Control Lund University Box 118 SE-221 00 LUND Sweden © 2014
Chapter 2. Backgroundeither of the mentioned Vector hardware devices fulfil the requirements. The majordifference is that it is possible to expand the
2.4 JTAG and Trace32Figure 2.4 Simulation Setup in CANoe.CANoe APIVector provides an API written in C with CANoe that, when used, has to be builtas a
Chapter 2. BackgroundFigure 2.5 Several TAPs connected through daisy-chain, TRST not shown. Thismight illustrate separate devices/chips or different m
2.5 The ECU and ECU softwareFigure 2.6 A standard and a JTAG-modified ECU.In order to get Trace32 to work with the specific project on the target CPU on
Chapter 2. BackgroundThe software on the ECU consists of basically two parts, base softwareand control software. The control part is relatively simila
2.5 The ECU and ECU softwareFigure 2.7 Example debug cases (241, 244 and 250) showing what case couldcontain what variable.25
3EquipmentThe equipment used was a PC, an ECU - connected to the JTAG debugger, a JTAGdebugger - connected to the PC via USB and a Vector real-time sy
4PerformanceBorgWarner has implemented tests to measure the performance of the ECU in termsof cycle time, CPU-load, execution time of certain threads
Chapter 4. Performancedata extraction were run in order to have a reference and also to evaluate what dif-ference the ioDebug part - the part of the s
4.2 ResultFigure 4.2 Accumulated time by the operating schedule for different software andJTAG data extraction loads. The blue bars represent how much
AbstractThis master thesis investigates the possibilities to perform software validation testson ECUs with customer-identical software. Instead of usi
5Solution approachIn order to analyse data extracted from the ECU via the JTAG debugger in the regu-lar testing environment, CANoe, the data has to be
5.2 Integrated approachFigure 5.1 Overview of the ”RS-232 approach”5.2 Integrated approachThis approach is based on writing a C++ application using th
Chapter 5. Solution approachVector Real-time deviceReal-time CANoedll / C++ applicationCANoe APITrace32 APITrace32EthernetCANoeFigure 5.2 Software ove
6ImplementationThe following chapter will describe how the suggested solution to the challengesdescribed in Chapter 1.3 was implemented. Firstly the h
Chapter 6. ImplementationFigure 6.1 Schematics for the light version test rig.the VN8970 unit are used since the standard outputs cannot supply enough
6.2 User applicationFigure 6.2 Syntax of the file to be loaded in the application.to Trace32 which specifies the code and variables available on the CPU
Chapter 6. ImplementationFigure 6.3 The user interface of the application with variable-file loaded and allavailable variables shown.As seen in Figure
6.2 User applicationFigure 6.4 Syntax of the file created by the application.The second and third columns are the address and size of the variable resp
Chapter 6. Implementationbelow.In order to activate a function when i.e. a button is pressed one have to link it in amacro function , see below.The ab
6.3 Data extraction/integration dllWhen loading the first file, the one revealing name and dependencies of thedifferent variables, the is filled with the
Chapter 6. ImplementationBesides the above mentioned functions there are also timers available throughthe API as well as functions to trigger when cer
6.3 Data extraction/integration dllINITKL15/30Debug caseRead/WriteSTOPFigure 6.5 The flow of the data extraction/integration application. The dashed li
Chapter 6. ImplementationFigure 6.6 Overview similar to Figure 6.5 where functions called in each block isshown in red.in CANoe which specifies the deb
6.3 Data extraction/integration dllWhat the function does is essentially telling what functions to run just before themeasurement starts, when it actu
Chapter 6. Implementationthese three tell the dll that something has happened in CANoe during the mea-surement) are fetched in through the use of the
6.3 Data extraction/integration dllIf the files were read successfully and the connection to Trace32 was establishedreturns and the rest of the program
Chapter 6. ImplementationWhen it is detected that an update in debug case has occurred the timer governingthe read/write functions is halted and the n
6.3 Data extraction/integration dllThe essential feature of the function above is the flag which is a globalvariable passed to the function responsible
Chapter 6. ImplementationIf the initialisation was done successfully is called and the timer re-sets itself with the time determined by what debug cas
6.3 Data extraction/integration dllProcess and Calculate After all the data has been read from the target CPU someprocessing and calculation has to be
AcknowledgementsIndividuals whom I would like to thank include - but are not limited to - my su-pervisor at BorgWarner TTT, Mattias Wozniak whom have
Chapter 6. ImplementationWrite After the processing and calculation contains all the valuesthat are to be sent to CANoe. This is done as the final part
6.4 CANoe configuration modifications6.4 CANoe configuration modificationsA few additions have to be made to the CANoe configuration in order to get thesol
Chapter 6. ImplementationThere are four different frames and the above function is called whenthe specific frame is received. To replace the above ment
7Result and discussionThis chapter will present and discuss the result of the thesis. First a section ex-plaining how the concept of integrating data
Chapter 7. Result and discussion• Add a function to the test code in whichthe created system variables are updated and also assign the feedback vari-a
7.2 The test0.1 ms - for the better. However, halting the ECU during a measurement is not afeasible option since this will have a too great effect on
Chapter 7. Result and discussionFigure 7.1 A part of the Control Software Test shown where some of the QualitySignal Test Cases have failed.56
7.2 The test• used elsewhere in code, for example assigned to adebug frame.• Repeat.As long as there is no fault the variable is read as at all times;
8Conclusion and FurtherWorkIn retrospect we can conclude that the concept is proven; it is possible to use anexternal device, such as a Lauterbach deb
Chapter 8. Conclusion and Further Worka period of 10 or 20 ms, it is of essence that the extraction of data during thisperiod when it is okay to read
Bibliography[1] API for Remote Control and JTAG Access. URL:(visited on 05/19/2014).[2] J. Barlage, D. Bruder, V. Jones, E. Nielsen, T. Perttola, and
Bibliography[14] VN8900 - Modular FlexRay/CAN/LIN/J1708/K-Line Network Interface withup to 8 Channels. URL:(visited on 05/16/2014).61
AEssentials of Visual StudioMFC projectA Win32 project is created and in ’Application settings’, ’Empty project’ is chosen.To use the MFC library in a
Appendix A. Essentials of Visual Studio MFC project63
Appendix A. Essentials of Visual Studio MFC project64
BSelection fromcalculations.h65
Appendix B. Selection from calculations.h66
Lund UniversityDepartment of Automatic ControlBox 118SE-221 00 Lund SwedenDocument nameMASTER´S THESISDate of issueJune 2014Document NumberISRN LUTFD2
ContentsList of Figures 91. Introduction 121.1 BorgWarner and the product . . . . . . . . . . . . . . . . . . . . 121.2 Testing . . . . . . . . . . .
Contents6.2 User application . . . . . . . . . . . . . . . . . . . . . . . . . . 34Background . . . . . . . . . . . . . . . . . . . . . . . . . . . .
List of Figures1.1 The clutch visualised in a car that is front wheel drive during normalcircumstances. . . . . . . . . . . . . . . . . . . . . . . .
Komentáře k této Příručce