Analog Devices, Inc. Protocol 6 Flash/Ee Programming Via Lin Downloading Software With Canoe - Lin
Analog Devices, Inc. Protocol 6 Flash/Ee Programming Via Lin Downloading Software With Canoe - Lin
th
Date: 14 June 2007
Version: 3.0
Table of Contents
Table of Contents .......................................................................................................................................... 2
Purpose ......................................................................................................................................................... 3
Overview ....................................................................................................................................................... 3
Introduction.................................................................................................................................................... 4
Setup ............................................................................................................................................................. 4
Vector CANcaseXL.................................................................................................................................... 4
ADuC703X Microcontroller ........................................................................................................................ 5
Procedure...................................................................................................................................................... 6
How to… .................................................................................................................................................... 6
1. Open the CANoe configuration file: “Protocol6FlashEEProgramming.cfg” ................................. 6
2. Specify the file to be Flash/EE programmed via LIN ................................................................... 7
3. Enter download mode of the ADuC703X microconverter............................................................ 9
4. Start the simulation ...................................................................................................................... 9
5. Observe the ‘ADuC703X Flash/EE Programming via LIN’ sequence ....................................... 10
6. Request adhoc LIN diagnostic commands ................................................................................ 11
7. Reset the ADuC703X node ....................................................................................................... 13
Known Issues/Assumptions/Omissions ...................................................................................................... 14
Issue 1: User reset request.................................................................................................................. 14
Issue 2: Configuration LDF file must be specific to part ...................................................................... 14
References .................................................................................................................................................. 16
Purpose
This document describes an application which demonstrates programming the ADuC703X series device’s
integrated Flash/EE using CANoe.LIN from Vector (http://www.vector-informatik.de).
It is assumed that the user is familiar with Vector CANoe and with the LIN 2.0 specification.
Overview
The ADuC703X series of microconverters from Analog Devices Inc. support the programming of the
device’s integrated Flash/EE via LIN [1]. This feature is targeted towards automotive applications where
the ADuC703X can be integrated into a LIN network cluster as a LIN slave node, thereby enabling the
device to be programmed as required without the need to physically dismount the electronic control unit
(ECU) that houses the ADuC703X device.
This document describes a demo application that enables the programming of an ADuC703X device via
LIN. The application uses Vector’s CANoe with the LIN bus option (referred to as CANoe.LIN) and the
CANcaseXL hardware with a single LIN channel.
The LIN downloader application adheres to the LIN Flash/EE programming requirements specification [1].
Introduction
This document provides the user with a simple step-by-step procedure on how to program the ADuC703X
using the CANoe.LIN-based LIN downloader application.
Setup
The first step is the connection and configuration of the physical hardware involved. This section
describes the setup of the hardware components used in the application. The ADuC703X device, acting
as a LIN slave, should be connected via the LIN bus to the LIN Master, which in this case is emulated by
the Vector CANcaseXL hardware. As LIN messages are transmitted on the bus by the LIN Master
according to a predefined schedule, all LIN traffic will be traced and can be observed on the PC using
CANoe.LIN. The hardware interconnection is illustrated in figure 1.
Vector CANcaseXL
The Vector CANcaseXL hardware with LIN channel is connected to the PC via USB. The CANcaseXL, or
equivalent Vector hardware, is configured via the ‘Vector Hardware Config’ window, which is accessed by
going to:
Figure 2 shows the CANcaseXL configuration for the CANoe application. The LIN bus, named LIN 1, is
active on Channel 2 (via the LINpiggy 6259opto).
Note: Interconnecting Pin3 and Pin4 of the D-Sub connector on the XL Interface causes the internal
voltage supply of the LINpiggy to be disconnected. Since the recessive level on the bus depends on the
supply voltage of the Master it is advisable to operate the LINpiggy with an external supply voltage that is
also used by the other bus nodes. Only then cross currents can be prevented between the individual
nodes on the LIN bus.
ADuC703X Microcontroller
The ADuC703X series microcontrollers contain a kernel which implements the LIN Flash/EE
Programming protocol as described in [1].
Procedure
The step-by-step procedure of programming the Flash/EE on the ADuC703X device via LIN using
CANoe.LIN is described in this section.
How to…
1. Open the CANoe configuration file: “Protocol6FlashEEProgramming.cfg”
This application is configured for two nodes: FlashEEProgrammer (LIN Master) and ADuC703X (LIN
Slave).
The CANcaseXL is setup to simulate the LIN Master and the ‘ADuC703X’ is implemented by a real
ADuC703X node.
Note: the state of the node is indicated by the color of the bus line
to which the node is connected:
Simulated
Real
Note: The generated ‘.blf’ file should be saved to the same directory as that of the CANoe
application’s configuration (.cfg) file.
The user must then manually code the filename of this ‘.blf’ file into the CAPL program block that
represents the LIN Master. The file that implements the LIN Master CAPL program block is
‘Protocol6FlashEEr.can’. In order to open ‘Protocol6FlashEEr.can’:
• Left-click the pencil icon on the ’FlashEEProgrammer’ node in the ‘Simulation Setup’ window of
CANoe.LIN as shown in figure 4.
The location where the ‘.blf’ filename is to be coded into ‘Protocol6FlashEEr.can’ is shown in figure 5.
This depicts the ‘Variables’ window and the ‘char caAppCode[32]’ variable that is to be edited.
i. Ensure location 0x14 in Flash/EE memory is set to the 32 bit value: 0xFFFFFFFF
ii. Hold the nTRST pin low (e.g. connect Pin 11 on the ADuC703X to ground)
After a reset the kernel checks the nTRST pin to see which state it is in. If it is held low the kernel
monitors location 0x14. If the 32 bit contents at that location equal 0xFFFFFFFF the kernel download
mode is entered.
i. When the CANoe application is started a tab called ‘Flash/EE Programming’ is added to the write
window. Information about the progress of the download is output here, including:
When all pages have been programmed, the checksum across all pages is calculated
and output to this tab
Error information
ii. The user can observe all LIN messages transmitted and received over the entire Flash/EE
programming sequence in the ‘Trace’ window.
Figure 6 – CANoe Interactive Generator for Protocol 6 Flash/EE Programming via LIN
Note: If the ‘AssignNAD’ command is requested, whereby a new NAD is assigned, the NAD byte (which
is the first byte in all LIN diagnostic frames) of each subsequent LIN diagnostic command request must
be changed individually to match the new NAD value.
With the CANoe application running and Flash/EE programming of the specified file completed (and prior
to an ‘ECU Reset’ request), the user may request LIN diagnostic commands by pressing keys as shown
in table 1. The values that are transmitted are specified in the ‘Data Field’ is illustrated down the right
hand side of figure 6.
Known Issues/Assumptions/Omissions
• Protocol6FlashEEProgramming7032.ldf
Alternatively, if the parts being programmed are ADuC7033’s then the following LDF must be used:
• Protocol6FlashEEProgramming7033.ldf
The existing LDF must first be removed before the new LDF can be added. This action is performed in
the right-hand-side pane of the ‘Simulation Setup’ window on the ‘Setup’ tab of the ‘Protocol 6 Flash/EE
Programming’ configuration.
Step 1:
Step 2:
References
[1] Analog Devices, Inc., ADuC703X Flash/EE Programming via LIN – Protocol 6’, Rev. 1.0, June 2007.
[2] Analog Devices, Inc., ‘Hex-to-Binary LIN-downloadable File Generator - Command Line Version’,
Version 3.0, May 2007.
[3] Analog Devices, Inc., ‘Hex-to-Binary LIN Data Generator – GUI Application Version’, Version 1.3,
June 2007.