Indart One Programer Manual
Indart One Programer Manual
Copyright © SofTec Microsystems®. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
Designed by
inDART-One
User’s Manual
Revision 2.0
Our policy at SofTec Microsystems is to comply with all applicable worldwide safety and EMC/EMI
regulations. Our products are certified to comply to the European New Approach Directives and the CE
mark is applied on all our products.
This product as shipped from the factory has been verified to meet with requirements FCC as a CLASS
A product.
This product is designed and intended for use as a development platform for hardware or software in an
educational or professional laboratory.
In a domestic environment, this product may cause radio interference in which case the user may be
required to take adequate prevention measures.
Attaching additional wiring to this product or modifying the product operation from the factory default as
shipped may effect its performance and cause interference with other apparatus in the immediate
vicinity. If such interference is detected, suitable mitigating measures should be taken.
SofTec Microsystems
E-mail (general information): info@softecmicro.com
E-mail (marketing department): marketing@softecmicro.com
E-mail (technical support): support@softecmicro.com
Web: http://www.softecmicro.com
Important
SofTec Microsystems reserves the right to make improvements to the inDART-One In-Circuit Programmer/Debugger, its
documentation and software routines, without notice. Information in this manual is intended to be accurate and reliable.
However, SofTec Microsystems assumes no responsibility for its use; nor for any infringements of rights of third parties which
may result from its use.
SOFTEC MICROSYSTEMS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF
PRODUCTS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
Trademarks
SofTec Microsystems is a registered trademark of SofTec Microsystems, Spa.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
Microsoft and Windows are trademarks or registered trademarks of Microsoft Corporation.
PC is a registered trademark of International Business Machines Corporation.
Other products and company names listed are trademarks or trade names of their respective companies.
Contents
0 Before Starting 13
0.1 Important Notice to Users 13
0.2 Required Skills 13
1 Overview 15
1.1 What is inDART-One? 15
1.1.1 In-Circuit Debugger 15
1.1.2 Single Programmer 16
1.1.3 Multiple Programmer 16
1.1.4 inDART Programming Library 16
1.2 Package Contents 16
1.3 Optional HC08 Fast Programming Algorithms 17
1.4 Hardware Overview 17
1.4.1 USB Connector 18
1.4.2 MON08 Connector 18
1.4.3 BDM Connector 21
1.4.4 Target Power Connectors 22
1.4.5 Status LEDs 22
1.4.6 “START” Push-Button 23
1.5 Software Overview 24
1.5.1 CodeWarrior Development Studio Special Edition 24
1.5.2 DataBlaze Programming Utility 24
1.5.3 MultiBlaze Programming Utility 25
1.5.4 inDART-One Control Panel 25
1.5.5 Software Upgrades 25
1.6 Recommended Reading 26
1.7 Getting Technical Support 26
2 Setup 27
2.1 Software Setup 27
2.1.1 Host System Requirements 27
2.1.2 CodeWarrior Setup 27
Contents
4 Programming 43
4.1 DataBlaze Programming Utility 43
4.1.1 Overview 43
4.1.2 Using DataBlaze 43
4.1.3 Using HC08 Fast Algorithms 45
4.2 MultiBlaze Gang Programming Utility 46
4.2.1 Overview 46
4.2.2 Starting MultiBlaze 46
4.2.3 Creating a Project 47
4.2.4 Programming 51
4.2.5 Using HC08 Fast Algorithms 53
inDART-One User's Manual
10 Troubleshooting 129
10.1 Common Problems and Solutions 129
10.1.1 USB Driver Problems 129
10.1.2 Communication Can’t Be Established with inDART-One 129
10.1.3 CodeWarrior-Specific: Stepping Execution is Slow 130
10.1.4 HC08-Specific: Peripheral Speed is Low 130
10.1.5 HCS08-Specific: Communication Lost During Debugging 131
10.1.6 HCS08-Specific: STOP Assembly Instruction Causes a
Microcontroller Reset 131
10.2 Diagnostic Test 131
10.3 Getting Technical Support 132
11 Technical Specifications 133
inDART-One User's Manual
Index of Figures
Index of Tables
0 Before Starting 0
Microcontroller systems;
HC08, HCS08, RS08, S12 or S12X architecture knowledge;
Programming knowledge (Assembly and C).
13
inDART-One User's Manual
1 Overview
1
1.1 What is inDART-One?
The inDART-One In-Circuit Programmer/Debugger is a powerful
programming and debugging tool for Freescale HC08-, HCS08-, RS08-,
S12- and S12X-based systems.
15
Overview
16
inDART-One User's Manual
17
Overview
18
inDART-One User's Manual
target microcontroller to free some lines after entering the monitor mode at
reset.
For more information about how to provide the appropriate MON08
connector on your target board, see “MON08 Target Connections” on page
63. 1
1 2
NC GND
NC RST
NC IRQ
NC MON4
NC MON5
NC MON6
OSC MON7
VDD MON8
15 16
MON08 Connector
(Standard Mode)
19
Overview
1 6 IRQ#
microcontroller) out of reset. No other target-system logic
should be tied to this signal.
MCU interrupt; held at VTST.
8, 10, 12, MON4 ... MON8 I/O pins connected to target microcontroller.
14, 16
13 OSC This signal can be used as an auxiliary clock source, and
is particularly useful when the target microcontroller
requires an external clock which is not available on the
target board.
15 VDD The target VDD line needs to be driven correctly at reset.
When using the MON08 connector in standard mode,
inDART-One can automatically generate this signal.
1, 3, 5, 7, NC Not connected.
9, 11
\
1 2
RST_OUT GND
RST_IN RST
TGT_IRQ IRQ
TGT_MON4 MON4
TGT_MON5 MON5
TGT_MON6 MON6
TGT_MON7 MON7
TGT_MON8 MON8
15 16
MON08 Connector
(Enhanced Mode)
20
inDART-One User's Manual
2
3
GND
RST_IN#
signals.
System ground.
Reset signal from target system: GND to VDD input to
1
control the state of the MCU RST# and RST_OUT#
signals.
4 RST# MCU reset; held at VTST (or VDD, depending on the target
microcontroller) out of reset. No other target-system logic
should be tied to this signal.
5 TGT_IRQ# Interrupt signal from target system: GND to VDD input to
control the state of the MCU IRQ# signal.
6 IRQ# MCU interrupt; held at VTST when the TGT_IRQ# signal is
not asserted.
7, 9, 11, TGT_MON4 ... I/O pins connected to target application.
13, 15 TGT_MON8
8, 10, 12, MON4 ... MON8 I/O pins connected to target microcontroller.
14, 16
21
Overview
1 2
BKGD GND
1
NC RST/VPP
NC VDD
5 6
BDM Connector
22
inDART-One User's Manual
23
Overview
24
inDART-One User's Manual
Memory editing;
Blank check/erase/program/verify/read operations;
Project handling;
One-button, multiple-operations programming (“Auto” feature);
1
Serial numbering.
25
Overview
26
inDART-One User's Manual
2 Setup
27
Setup
2.2.1 PC Connection
inDART-One connects to the host PC through a USB port. When connecting
more than one inDART-One to a host PC, USB hubs can be used.
inDART-One is USB 2.0 compliant and uses a high speed connection, but
can be connected to USB 1.1 systems as well.
inDART-One is powered by the USB bus voltage, and requires a USB port
capable of supplying 350 mA.
28
inDART-One User's Manual
The first time inDART-One is connected to the PC, Windows recognizes the
instrument and starts the “Found New Hardware Wizard” procedure,
asking you to specify the driver to use for the instrument.
1. On Windows XP (SP2) the following dialog box will appear, asking you
to search for a suitable driver on the web.
Select the “No, not this time” option and click the “Next >” button.
2. The following dialog box will appear.
29
Setup
30
inDART-One User's Manual
Note: this warning is related to the fact that the USB driver
i used by inDART-One is not digitally signed by Microsoft, and
Windows considers it to be potentially malfunctioning or
dangerous for the system. However, you can safely ignore
the warning, since every kind of compatibility/security test
has been carried out by SofTec Microsystems.
Click the “Finish” button to exit from the “Found New Hardware
Wizard” procedure.
5. The Starter Kit’s USB driver is now installed on your system.
31
Setup
connectors and how to use them in conjunction with your target board,
please refer to the following chapters:
32
inDART-One User's Manual
1. Open the inDART-One Control Panel. Select “Start > Programs >
SofTec Microsystems > inDART-One > Control Panel”. The
following dialog box will appear.
33
inDART-One User's Manual
3 Debugging
35
Debugging
3 3. Follow the Project Wizard steps, making sure you select the correct
microcontroller derivative you are working with and that the “SofTec”
target connection is used.
36
inDART-One User's Manual
37
Debugging
38
inDART-One User's Manual
39
Debugging
40
inDART-One User's Manual
available for RAM locations). For example, it is possible to set the periodical
refresh of the “Memory” window contents by choosing “Mode > Periodical”
from the pop-up menu which appears by right-clicking on the “Memory”
window.
41
inDART-One User's Manual
4 Programming
4.1.1 Overview
DataBlaze is a full-featured programming utility. DataBlaze offers the
following advanced features:
Memory editing;
Blank check/erase/program/verify/read operations;
Project handling;
4
One-button, multiple-operations programming (“Auto” feature);
Serial numbering.
43
Programming
First, select the target device you are working with. To do so, select
“Operations > Select Device” from the DataBlaze main menu. The
following dialog box will appear.
44
inDART-One User's Manual
4
Figure 4.2: Device Selection
If you have more than one inDART-One instrument connected to the USB
hub, you can specify which one to use with DataBlaze.
Select the device you are working with in the “Device Code” device list and
click the “OK” button.
Next, open the “Communication Settings” dialog box (“Operations >
Communication Settings”), and specify target device-specific settings. For
more information, please refer to the “Communication Settings” section in
the chapter relative to the target family you are working with, later in this
manual.
The “Communication Settings” dialog box can be recalled at any time by
selecting “Operations > Communication Settings” from the DataBlaze
main menu.
For more information about the DataBlaze user interface, please refer to the
DataBlaze online help (“Help > Contents”).
45
Programming
4.2.1 Overview
MultiBlaze is an easy-to-use multiple programming utility suitable for
production environments. MultiBlaze offers the following features:
MultiBlaze requires you to log in, either as supervisor or operator, with your
username and password. Logging in as supervisor allows you to set up a
46
inDART-One User's Manual
After you log in, the MultiBlaze main window will appear.
47
Programming
On the first wizard step, you must specify a name for the project and the
path where the project file will be saved. You must also specify the target
device you are going to program, and you must specify the communication
settings with your target board by clicking the “Communication Settings”
button, which will open the “Communication Settings” dialog box.
The “Communication Settings” dialog box is specific for the target device you
selected. For more information, please refer to the “Communication Settings”
section in the chapter relative to the target family you are working with, later
in this manual.
On the second wizard step, you must specify the filename to be programmed
into the target device, its format, and the file and buffer offsets, if different
than zero.
48
inDART-One User's Manual
49
Programming
Finally, on the fourth wizard step, you can assign each inDART-One
instrument to a “programming node”. Different inDART-One instruments are
identified by their serial numbers: you can manually associate their serial
numbers to the programming node of choice.
The “Autofill” button can be used to automatically detect each inDART-One
instrument connected to the USB bus and assign it to a programming node.
Only inDART-One instruments specified in this wizard step will be used
during programming sessions.
50
inDART-One User's Manual
4.2.4 Programming
Once a project is loaded (via the “Open Project” button) or after a project
has been created (via the “New Project” button) programming sessions can
be performed.
To start a programming session, click the “Program” button. The following
dialog box will appear.
51
Programming
4
Figure 4.9: MultiBlaze Programming Window
52
inDART-One User's Manual
53
Programming
54
inDART-One User's Manual
55
Working with HC08 Devices
56
inDART-One User's Manual
57
Working with HC08 Devices
58
inDART-One User's Manual
“Power down time”. The time it takes for the power voltage to drop
below 100 mV.
“Power up time”. The time it takes for target microcontroller to get
ready to communicate after the VDD voltage becomes high.
i
Note: when “Mode B” is selected, only the central pin of the
“TARGET POWER OUT” connector is used, while the outer
5
sleeve is not connected. The GND reference is taken from
the “MON08” cable.
59
Working with HC08 Devices
5.2.3 Programming
Programming parameters mainly determine the speed at which programming
operations are performed.
60
inDART-One User's Manual
The “Target Baud Rate” parameter specifies the MON08 serial line’s baud
rate used to enter the monitor mode. inDART-One can automatically
determine the correct target baud rate in the most common situations; the
“Automatic Detection” is the default option. However, if for some reasons
the automatic detection doesn’t work, you still have the possibility to select
the baud rate manually.
61
Working with HC08 Devices
5.2.4 Trimming
inDART-One allows you to enable the target microcontroller’s internal
oscillator calibration (trimming).
62
inDART-One User's Manual
The trimming parameters are specific for the selected device. If the selected
device incorporates the OSC module, then you are allowed to select the
OSC frequency to be calibrated, through the “Internal Bus Frequency”
parameter (if more than one internal bus clock frequency is available on that
device).
If, instead, the selected device incorporates the ICG module, then you are
allowed to select the ICG frequency to be calibrated (“ICG Frequency”
parameter), with the corresponding multiplier.
In both cases, it is possible to specify whether to save the calculated
trimmed value in the default location (the location suggested either by
Freescale or SofTec Microsystems, restorable at any moment via the
“Restore” button) or into a different location (“Flash Trimming Location”
parameter).
63
Working with HC08 Devices
1 2
VDD
NC
NC RST
NC IRQ
NC MON4
NC MON5
NC MON6 Target
Microcontroller
OSC
MON7
VDD
MON8
15 16
OSC1
Standard
MON08 Connector 4K7 Typical
OSC2
VSS
5
User Application
64
inDART-One User's Manual
1 2
VDD
RST_OUT
RST_IN
RST
TGT_IRQ
TGT_MON4
IRQ
MON4
5
TGT_MON5
MON5
TGT_MON6
User Application MON6 Target
Microcontroller
TGT_MON7
MON7
TGT_MON8
MON8
15 16
OSC1
Enhanced
MON08
Connector
OSC2
VSS
65
Working with HC08 Devices
1 2 1 2
5
15 16 15 16
Alternatively, PCB tracks can be routed as shown on the right. In the target
board you use for debugging, cut the tracks as indicated.
66
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
67
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
68
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
69
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
VDD MON8 = NC
15 16
Standard
MON08 Connector
70
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
71
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
NC MON5 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
72
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
73
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
74
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
75
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
VDD MON8 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
76
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
77
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
NC MON5 = NC
15 16
Standard
MON08 Connector
78
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
NC MON5 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
15 16
Standard
MON08 Connector
79
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
80
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
81
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
OSC MON7 = NC
VDD MON8 = NC
15 16
Standard
MON08 Connector
82
inDART-One User's Manual
1 2
NC GND
NC RST
NC IRQ
VDD MON8 = NC
15 16
Standard
MON08 Connector
1 2
NC GND
NC RST
NC IRQ
VDD MON8 = NC
15 16
Standard
MON08 Connector
83
Working with HC08 Devices
1 2
NC GND
NC RST
NC IRQ
NC MON4 = NC
15 16
Standard
MON08 Connector
84
inDART-One User's Manual
6
Figure 6.1: The BDM Communication Settings Dialog Box for HCS08 Devices
85
Working with HCS08 Devices
low clock frequency will result in slow BDM communication (and therefore
slow debugging and slow programming), while a clock frequency which
changes frequently (as in the case of the user application modifying the FLL
peripheral) may result in loss of BDM communication.
6.1.3 Trimming
Some devices can have their internal oscillator calibrated (trimmed) through
the “VCO Bus Frequency” parameter (please note that other devices may
present different calibration parameters).
86
inDART-One User's Manual
Figure 7.1: The BDM Communication Settings Dialog Box for RS08 Devices
7
Note: this chapter describes communication settings with
i the only RS08 device so far released by Freescale
(MC9RS08KA2). Other devices may present different
configuration parameters.
87
Working with RS08 Devices
7.1.2 Trimming
The target device’s internal oscillator can be calibrated (trimmed) through the
“DCO Output Frequency” parameter (please note that other devices may
present different calibration parameters).
88
inDART-One User's Manual
Figure 8.1: The BDM Communication Settings Dialog Box for S12(X) Devices 8
The first parameter, “BDM Clock Frequency Detection”, specifies how to
detect the target microcontroller’s BDM clock frequency. There are two
options:
89
Working with S12(X) Devices
Another parameter, “BDM Clock Source”, specifies the link between the
microcontroller’s bus frequency and the BDM clock frequency during
debugging. The BDM clock source can be selected by the CLKSW bit in the
BDM Status register.
Which CLKSW setting to use depends on the target system and on the user
application. The idea is to set the CLKSW bit so that the highest (and less
subject to changes) clock frequency is used for the BDM communication. A
low clock frequency will result in slow BDM communication (and therefore
8 slow debugging), while a clock frequency which changes frequently (as in
the case of the user application modifying the PLL peripheral) may result in
loss of BDM communication.
The “Enable Fast Programming” parameter, if selected, speeds up
programming by driving the microcontroller’s internal PLL circuitry to the
maximum settings. In order for this feature to work, an appropriate loop filter
circuitry must be provided to the device’s XFC pin.
The “TARGET POWER OUT Voltage” parameter specifies the voltage
provided by inDART-One on the “TARGET POWER OUT” connector, which
can be used to power up your target board.
90
inDART-One User's Manual
91
inDART-One User's Manual
9.1 Introduction
This documentation deals with low-level interfacing between user written PC
applications and the inDART-One In-Circuit Programmer/Debugger. This
section assumes you have already read the previous sections of this user’s
manual and got acquainted with the instrument. All of the examples provided
in this documentation are written in C, unless otherwise reported.
9.3 Installation
9
Before to start working with the inDART Programming Library, you must set
up your system with all the required files and drivers. The files to be installed
are:
93
inDART Programming Library
IPL_GetDeviceList()
IPL_SetDevice()
IPL_SetCommunicationSettings()
IPL_LoadFileIntoBuffer()
9 3. Program.
Once the instrument(s) has/have been set up, you can begin
programming, with the IPL_StartProgramming() function.
4. Close the communication with the instrument(s).
This is done by the IPL_EndSession() function. Closing the
94
inDART-One User's Manual
95
inDART Programming Library
Optional IPL_StartSession()
Instrument Network
Configuration IPL_GetInstrumentsConnected()
IPL_SetInstrumentsConfiguration()
IPL_SetCallBack()
Target Device
Selection IPL_GetDeviceList()
and Configuration
IPL_SetDevice()
IPL_SetCommunicationSettings()
Programming Steps
Definition IPL_GetDefaultProgrammingSteps()
IPL_SetProgrammingSteps()
Programming Buffer
Definition
IPL_WriteDataToBuffer() IPL_LoadFileIntoBuffer()
Programming
IPL_StartProgramming()
9 IPL_GetInstrumentStatus()
IPL_EndSession()
96
inDART-One User's Manual
97
inDART Programming Library
IPL_ReadDeviceMemoryIntoBuffer()
IPL_StartProgramming()
IPL_ReadDeviceMemoryIntoBuffer()
IPL_ReadDeviceMemoryIntoBuffer()
IPL_StartProgramming()
typedef enum {
IPL_FORMAT_BINARY = 0,
9 IPL_FORMAT_IHEX
IPL_FORMAT_S19
= 1,
= 2,
} IPL_FILE_FORMAT;
98
inDART-One User's Manual
typedef enum {
IPL_STEP_CODE_BLANK = 0,
IPL_STEP_CODE_ERASE = 1,
IPL_STEP_CODE_PROGRAM = 2,
IPL_STEP_CODE_VERIFY = 3,
IPL_STEP_DATA_BLANK = 4,
IPL_STEP_DATA_ERASE = 5,
IPL_STEP_DATA_PROGRAM = 6,
IPL_STEP_DATA_VERIFY = 7,
IPL_STEP_TRIM_PROG = 8,
IPL_STEP_RUN = 9,
IPL_STEP_CODE_READ = 10,
IPL_STEP_DATA_READ = 11,
IPL_STEP_NOT_SUPPORTED = 12,
IPL_STEP_TARGET_OFF = 13,
} IPL_PROG_STEP;
typedef enum {
IPL_STATUS_IDLE = 0,
IPL_STATUS_WORKING = 1,
IPL_STATUS_ERR_COMMUNICATION = 2,
IPL_STATUS_ERR_INTERNAL = 3,
IPL_STATUS_ERR_BLANKCHECK_DEVICE = 4,
IPL_STATUS_ERR_READ_DEVICE = 5,
IPL_STATUS_ERR_ERASE_DEVICE = 6,
IPL_STATUS_ERR_PROGRAM_DEVICE = 7,
IPL_STATUS_ERR_VERIFY_DEVICE = 8,
IPL_STATUS_ERR_PROTECTION_DEVICE
IPL_STATUS_ERR_INVALID_DEVICE
=
=
9,
10
9
} IPL_INST_STATUS_MODE;
99
inDART Programming Library
typedef enum {
IPL_EVENT_PROG_START = 0,
IPL_EVENT_PROG_END = 1,
IPL_EVENT_PROG_STEP = 2,
IPL_EVENT_ERROR = 3,
} IPL_EVENT_TYPE;
100
inDART-One User's Manual
void (*IPL_CALLBACK)(
int inst_ID,
IPL_EVENT_TYPE event_type,
void *event_data);
101
inDART Programming Library
9.5.2 IPL_EndSession()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_EndSession(void);
Parameters:
None.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Ends a programming “session”. All of the Programming Library
functions (exception made for the IPL_GetVersion() function)
must be called within a IPL_StartSession() and
IPL_EndSession() function.
102
inDART-One User's Manual
9.5.3 IPL_GetBufferChecksum()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_GetBufferChecksum(unsigned long *chk);
Parameters:
chk: pointer to an unsigned integer that will receive the
checksum of the programming buffer.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Calculates and returns the checksum of the programming buffer.
103
inDART Programming Library
9.5.4 IPL_GetButtonStatus()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_GetButtonStatus(
int inst_ID,
BOOL *pressed,
IPL_INST_STATUS *status);
Parameters:
inst_ID: ID of the inDART-One instrument (previously set
via the IPL_SetInstrumentConfiguration()
function).
pressed: TRUE if the “START” button is pressed, FALSE
otherwise.
status: pointer to an IPL_INST_STATUS structure that will
receive instrument status information (see the
IPL_GetInstrumentStatus() function).
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
9 This function reads the status of the “START” button of the specified
inDART-One instruments. If the “START” button is pressed, the
pressed parameter will be TRUE.
104
inDART-One User's Manual
105
inDART Programming Library
9.5.5 IPL_GetDefaultProgrammingSteps()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_GetDefaultProgrammingSteps(
IPL_PROG_STEP *prog_steps,
int n_items,
int *items_found);
Parameters:
prog_steps: pointer to the array that will be filled with the
default programming steps for the currently
selected target device.
n_items: number of programming steps to retrieve.
items_found: the actual number of default programming steps
available for the currently selected target device.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Fills an array (prog_steps) with the default programming steps for
the currently selected target device. The function returns n_items.
9 The items_found variable will contain the actual number of
programming steps.
106
inDART-One User's Manual
IPL_GetDefaultProgrammingSteps(NULL, 0,
*no_of_prog_steps);
IPL_GetDefaultProgrammingSteps(*tot_steps,
no_of_prog_steps, NULL);
107
inDART Programming Library
9.5.6 IPL_GetDeviceList()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_GetDeviceList(
IPL_DEVICE_LIST *device_list,
int n_items,
int *items_found);
Parameters:
device_list: pointer to the array that will be filled with the device
list.
n_items: number of devices to retrieve.
items_found: the actual number of devices present in the
Programming Library’s device list.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Fills an array (device_list) with devices supported by the IPL-One
Programming Library. The function extracts n_items from the
9 Programming Library device list. The items_found variable will
contain the actual number of devices present in the Programming
Library’s device list.
108
inDART-One User's Manual
IPL_GetDeviceList(NULL, 0, *no_of_devices);
109
inDART Programming Library
9.5.7 IPL_GetError()
Include file:
#include “IPL-One.h”
Function prototype:
void IPL_GetError(char *error_string);
Parameters:
error_string: this parameter will be filled with a text message
explaining the cause of the problem.
Return value:
None.
Description:
Most of the Programming Library functions return a BOOL value which
indicates whether the function was successfully executed (return value
= TRUE) or not (return value = FALSE). In the latter case it is possible
to get extended error information by calling the IPL_GetError()
function.
110
inDART-One User's Manual
9.5.8 IPL_GetInstrumentsConnected()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_GetInstrumentsConnected(
IPL_INST_INFO *inst_info,
int n_items,
int *items_found);
Parameters:
inst_info: pointer to the array that will be filled with
information about inDART-One instruments
connected to the USB bus.
n_items: number of instruments to retrieve.
items_found: the actual number of instruments found.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Fills an array (inst_info) with information about inDART-One
instruments connected to the USB bus. The function returns
n_items. The items_found variable will contain the actual number
of inDART-One instruments found.
Tip: you can first call:
9
IPL_GetInstrumentsConnected(NULL, 0, *no_of_inst);
111
inDART Programming Library
IPL_GetInstrumentsConnected(*tot_inst, no_of_inst,
NULL);
112
inDART-One User's Manual
9.5.9 IPL_GetInstrumentStatus()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_GetInstrumentStatus(
int inst_ID,
IPL_INST_STATUS *status);
Parameters:
inst_ID: ID of the inDART-One instrument (previously set
via the IPL_SetInstrumentConfiguration()
function).
status: pointer to an IPL_INST_STATUS structure that will
receive status information.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Returns status information for the specified instrument. This function is
useful to retrieve the result of reading (IPL_ReadDeviceMemory()
function) or programming (IPL_StartProgramming() function)
operations.
113
inDART Programming Library
9.5.10 IPL_GetVersion()
Include file:
#include “IPL-One.h”
Function prototype:
void IPL_GetVersion(char *ver);
Parameters:
ver: this parameter will be filled with a string containing the
version of the IPL-One DLL and related DLLs.
Return value:
None.
Description:
Call this function to get version information about the IPL-One
Programming Library and related DLLs.
114
inDART-One User's Manual
9.5.11 IPL_LoadFileIntoBuffer()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_LoadFileIntoBuffer(
const char *filename,
IPL_FILE_FORMAT file_format,
unsigned long file_offset,
unsigned long buffer_offset);
Parameters:
filename: file to load into the programming buffer.
file_format: file format. Can be one of the following constants:
file_offset: offset (in bytes) from the beginning of the file. That
is, the first file_offset bytes read from the file
are discarded. Valid only when file_format is
IPL_FORMAT_BINARY.
buffer_offset: offset (in bytes) from the beginning of the
programming buffer. That is, the programming
buffer is filled starting from the buffer_offset
address. Valid only when file_format is
9
IPL_FORMAT_BINARY.
Return value:
TRUE: the function was successful.
115
inDART Programming Library
Description:
Loads the contents of an external file into the programming buffer.
116
inDART-One User's Manual
9.5.12 IPL_ReadDataFromBuffer()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_ReadDataFromBuffer(
unsigned long addr,
unsigned char *dest_data,
int len);
Parameters:
addr: programming buffer start address.
dest_data: pointer to a destination buffer which will contain the
data copied from the programming buffer.
len: number of bytes to copy.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Reads data from the programming buffer. Since the programming
buffer is a one-to-one mapping of the target device memory, the addr
parameter corresponds to a target device memory address.
117
inDART Programming Library
9.5.13 IPL_ReadDeviceMemory()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_ReadDeviceMemory(int inst_ID);
Parameters:
inst_ID: ID of the inDART-One instrument (previously set
via the IPL_SetInstrumentConfiguration()
function) to read from.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Reads the memory of target device connected to the inst_ID
instrument and copies it into the PC programming buffer. The
programming buffer can then be read with the
IPL_ReadDataFromBuffer() function.
To check the status of the reading operation, call the
IPL_GetInstrumentStatus() function.
118
inDART-One User's Manual
9.5.14 IPL_SetCallback()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_SetCallback(IPL_CALLBACK callback);
Parameters:
callback: callback function.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Sets the callback function that will be called by the Programming
Library each time a meaningful event occurs. The callback function
prototype is:
void (*IPL_CALLBACK)(
int inst_ID,
IPL_EVENT_TYPE event_type,
void *event_data);
119
inDART Programming Library
120
inDART-One User's Manual
9.5.15 IPL_SetCommunicationSettings()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_SetCommunicationSettings(
char *settings,
BOOL show_window);
Parameters:
settings: pointer to a buffer containing the initialization
string.
show_window: if set to TRUE, opens the “Communication Settings”
dialog box, where you can specify all of the target’s
communication settings. Upon exiting the
“Communication Settings” dialog box, the
settings parameter is filled with the information
coming from the dialog box. If set to FALSE, the
settings parameter must be manually specified.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Initializes inDART-One with target device information. This
initialization procedure must be done before calling any other function
that reads from/writes to the target device.
9
121
inDART Programming Library
9.5.16 IPL_SetDevice()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_SetDevice(const char *device_code);
Parameters:
device_code: the string containing the complete device code.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Sets the target device to be programmed. To retrieve a list of
supported devices, call the IPL_GetDeviceList() function.
122
inDART-One User's Manual
9.5.17 IPL_SetInstrumentConfiguration()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_SetInstrumentsConfiguration(
IPL_INST_CONFIG *config,
int n_items);
Parameters:
config: pointer to the array that specifies instrument
configuration.
n_items: number of instruments to configure.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Configures one or more inDART-One instruments. The config
parameter is a pointer to an array of IPL_INST_CONFIG structures
which associate each instrument’s serial number to a logical ID.
123
inDART Programming Library
9.5.18 IPL_SetProgrammingSteps()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_SetProgrammingSteps(
IPL_PROG_STEP *prog_steps,
int n_items);
Parameters:
prog_steps: pointer to the array that specifies the programming
steps.
n_items: number of programming steps in the array.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Sets the programming steps to be performed when calling the
IPL_StartProgramming() function. To retrieve the default
programming steps available for the currently selected target device,
call the IPL_GetDefaultProgrammingSteps() function.
9 i
Note: programming steps will be performed in a fixed,
pre-defined order, regardless of their order in the
prog_steps array. E.g., a blank check operation will
be always performed before an erase operation, a
verify operation will be always performed after a
program operation, etc.
124
inDART-One User's Manual
9.5.19 IPL_StartProgramming()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_StartProgramming(int inst_ID);
Parameters:
inst_ID: ID of the inDART-One instrument (previously set
via the IPL_SetInstrumentConfiguration()
function).
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Starts the programming in the specified instrument. The instrument
will perform the programming steps specified with the
IPL_SetProgrammingSteps() function.
To check the status of the programming, call the
IPL_GetInstrumentStatus() function.
125
inDART Programming Library
9.5.20 IPL_StartSession()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_StartSession(void);
Parameters:
None.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Starts a programming “session”. All of the Programming Library
functions (exception made for the IPL_GetVersion() function)
must be called within an IPL_StartSession() and
IPL_EndSession() function.
The IPL_StartSession() function detects all inDART-One
instruments connected to the USB bus and determines whether fast
programming algorithms are unlocked.
126
inDART-One User's Manual
9.5.21 IPL_WriteDataToBuffer()
Include file:
#include “IPL-One.h”
Function prototype:
BOOL IPL_WriteDataToBuffer(
unsigned long addr,
unsigned char *src_data,
int len);
Parameters:
addr: programming buffer start address.
src_data: pointer to a source buffer containing the data to be
copied to the programming buffer.
len: length (in bytes) of the source buffer.
Return value:
TRUE: the function was successful.
FALSE: an error occurred. Call the IPL_GetError()
function to get extended error information.
Description:
Writes data to the programming buffer. The contents of the
programming buffer will be programmed into the target device with the
IPL_StartProgramming() function. Since the programming buffer
is a one-to-one mapping of the target device memory, the addr
parameter corresponds to a target device memory address.
9
127
inDART-One User's Manual
10 Troubleshooting
129
inDART-One User's Manual
2. Make sure that the target board is powered on and the target
microcontroller is working. Programming and debugging rely on a
MON08/BDM communication between inDART-One and the target
board. This means that, in order to work correctly, the target
microcontroller must be running. In particular, make sure that:
3. Make sure you are working with the correct inDART hardware model.
10 mode, all of the target microcontroller’s peripherals run at the same speed
they do in user mode. If, however, you set this parameter to 2 not all
peripherals will work at this doubled speed.
130
inDART-One User's Manual
1. Open the inDART-One Control Panel. Select “Start > Programs >
SofTec Microsystems > inDART-One > Control Panel”. The
following dialog box will appear.
10
131
inDART-One User's Manual
Note: before to start the diagnostic test, make sure that only
i one instrument is connected to the PC and that no target
system is connected to the instrument.
10
132
inDART-One User's Manual
11 Technical Specifications
Parameter Value
General
Operating Voltage 5 V DC (provided by the USB bus)
MON08 Section
“TARGET POWER” connectors maximum 42 V DC, 5 A
accepted ratings
(when “POWER OUT” = “POWER IN”)
“TARGET POWER OUT” connector 5.0 V DC, 200 mA
maximum ratings 3.3 V DC, 100 mA
(when “POWER OUT” = VDD) 2.7 V DC, 100 mA
1.8 V DC, 100 mA
MON08 connector VDD signal maximum 5.0 V DC, 200 mA
ratings 3.3 V DC, 100 mA
(standard MON08 mode, pin 15) 2.7 V DC, 100 mA
1.8 V DC, 100 mA
MON08 connector OSC signal 12 MHz, GND to VDD, 50% Duty Cycle
(standard MON08 mode, pin 13)
BDM Section
BDM connector VDD signal (pin 6) 1.8 V DC to 5.5 V DC, 5 mA max
BDM connector BKGD signal (pin 1) 50 MHz max at 5 V DC
11
133
inDART-One User's Manual
Parameter Value
Dimensions 140 x 102 x 40 mm
MON08 connector type 16-pin, 2.54-mm pitch, dual row header (male)
BDM connector type 6-pin, 2.54-mm pitch, dual row header (male)
Target power connectors type Coaxial power jack, center pin (positive) = 2.1 mm,
outer sleeve = 5.5 mm
Operating temperature 0°C to 50°C
11
134
Copyright © SofTec Microsystems®. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
Designed by