Tutorial - Using The USBDM
Tutorial - Using The USBDM
Author:
Joel - MyFreescaleWebPage
http://myfreescalewebpage.free.fr
Last revision of this document: 1.6 of 2014-10-19.
Table of contents
Revisions ................................................................................................................................................. 2
Introduction ............................................................................................................................................ 3
1
3.2
Flashing the USBDM firmware with the internal bootloader of the HCS08JS16 microcontroller
15
5.2
5.3
Conclusion............................................................................................................................................. 25
Appendix - Uninstalling the USBDM ....................................................................................................... 26
Revisions
Version
1.0
1.1
1.2
1.3
1.4
1.5
1.6
Date
2013-02-26
2013-05-08
2013-06-02
2013-10-13
2014-05-04
2014-06-01
2014-10-19
MyFreescaleWebPage
Changes
First release (USBDM 4.10.4)
Update (USBDM 4.10.5)
Update (USBDM 4.10.5b - Released due to some issues with 4.10.5)
Update (USBDM 4.10.6c for CodeWarrior 10.5)
Update (USBDM 4.10.6.140 for CodeWarrior 10.6)
First programming of the target microcontroller added
Update (USBDM 4.10.6.200 for CodeWarrior 10.6)
Introduction
The USBDM is an open source programming cable for Freescale microcontrollers released by PGO.
Several hardware versions are available depending of the targets you want to program. All source files,
firmware, schematics are available on http://usbdm.sourceforge.net.
MyFreescaleWebPage proposes its own USBDM. It is based on "USBDM_SWD_JS16CWJ" schematic from
PGO and is able to program HCS08, HCS12, Coldfire V1 and Kinetis SWD microcontrollers. This makes it a
very good choice if you want to begin with Freescale microcontrollers!
This cheap but powerful USBDM is provided with BDM, SWD and USB cables. You can get it on the
following page: http://myfreescalewebpage.free.fr/toolbox/usbdm/shop.htm.
TheUno and BigBrother evaluation boards are based on the USBDM with an additional serial port used
to communicate with the target.
MyFreescaleWebPage
The following USBDM (found on eBay) is able to program RS08, HCS08, HCS12, CFV1, CFV2, CFV3, CFV4,
Kinetis and DSC microcontrollers and is able to supply the target with 3.3 or 5V voltage.
MyFreescaleWebPage
This other USBDM (also found on eBay from BlackBoxStudio seller at http://www.ebay.fr/itm/FreescaleDebugger-Programmer-for-HCS08-HCS12-Coldfire-V1-/110958979630?) is compatible with HCS08,
HCS12 and CFV1 microcontrollers.
This tutorial explains how to use the USBDM: installation, update, programming the target with
standalone software and Freescale CodeWarrior.
If you want to use your USBDM with CodeWarrior, you must first installed CodeWarrior and then the
USBDM. A tutorial is available on my website at http://myfreescalewebpage.free.fr in you need help.
MyFreescaleWebPage
MyFreescaleWebPage
Download the USBDM Installer and the right USBDM Drivers according to your computer.
MyFreescaleWebPage
Next".
A wizard is displayed. Click "Next
MyFreescaleWebPage
It is possible to custom the installation. I have only verified that the installer detected my CodeWarrior
installation (Eclipse Special Edition V10.6)
V10. has shown on the following screenshot. Click "Next" to
perform the USBDM installation.
MyFreescaleWebPage
Click "Install".
MyFreescaleWebPage
10
It's now time to install the USBDM Drivers. Execute the right USBDM Drivers installer according to your
configuration (Windows XP or not,
not x86 or x64 operating system).
MyFreescaleWebPage
11
MyFreescaleWebPage
12
Window can't verify the publisher of the driver software. Validate the installation.
The installation takes only some few seconds. The wizard says that it is now possible to connect the
USBDM. Click "OK".
MyFreescaleWebPage
13
The installation is finished. USBDM shortcuts are available in the start menu.
MyFreescaleWebPage
14
Based On
HCS08JS16
HCS08JS16
HCS08JS16
HCS08JS16
USBDM_CF_JS16CWJ
USBDM_CF_SER_JS16CWJ
HCS08JS16
HCS08JS16
USBDM_CF_JMxxCLD_V3
HCS08JM60
Firmware
USBDM_JS16CWJ_V4
USBDM_SER_JS16CWJ_V4
USBDM_SWD_JS16CWJ_V4
USBDM_SWD_SER_JS16CWJ_V4
USBDM_CF_JS16CWJ_V4
USBDM_CF_SER_JS16CWJ_V4
USBDM_CF_JMxxCLD_V4
The USBDM schematics and firmware are available in the "BDM Flash Images" directory of the USBDM
installation (a shortcut is available in the start menu following the installation of the USBDM).
The USBDM based on the HCS08JM60 microcontroller must be flashed using an external tool (another
USBDM for example). The USBDM based on the HCS08JS16 microcontroller can be flashed using the
internal USB bootloader present in this device.
3.2 Flashing the USBDM firmware with the internal bootloader of the
HCS08JS16 microcontroller
The internal bootloader of the HCS08JS16 microcontroller is very convenient and can be used to flash
the USBDM firmware. The internal bootloader is a specific peripheral and is always available.
First short the BLMS pin of the HCS08JS16 microcontroller to the ground. As shown below, on TheUno it
is done by shorting X3 with a simple jumper. Adapt this step to your own USBDM. Please note that this is
not necessary if the USBDM is blank (never programmed before), because it is starting by default with
the internal bootloader in this case.
MyFreescaleWebPage
15
Now connect the USBDM to your computer. A new peripheral called "JS16" is d
detected
etected and
automatically installed.
Start "JS16 First Level Bootloader" utility.
MyFreescaleWebPage
16
Firmware
USBDM_JS16CWJ_V4
USBDM_SER_JS16CWJ_V4
USBDM_SWD_JS16CWJ_V4
USBDM_SWD_SER_JS16CWJ_V4
USBDM_CF_JS16CWJ_V4
USBDM_CF_SER_JS16CWJ_V4
MyFreescaleWebPage
17
MyFreescaleWebPage
18
You can check "Auto select BDM firmware" to automatically chose the right USBDM firmware. Note that
the Serial Number of the USBDM will be set to its default value in this case.
ou can load the right firmware yourself by clicking "Load Source File" button and browsing to
Instead, you
the USBDM firmware.
mware. It is then possible to set the Serial Number yourself or to click "Read from device"
to reuse the existing Serial Number
Number. This is very useful if you have several USBDM because you will be
able to use them at the same time on your computer by giving them different Serial Number values.
MyFreescaleWebPage
19
Click
ck "No" to cancel the operation and try again by pressing "Program Flash" button.
button
The firmware of the USBDM is updated and verified.
MyFreescaleWebPage
20
5 Programming microcontrollers
5.1 Using standalone programmer
Some applications are provided by PGO to program microcontrollers with the USBDM
USBDM. The following
example is done using TheUno, on which the target microcontroller is a HCS08DZ60 device.
Connect the USBDM and start "HCS08
HCS08 Programmer".
Programmer The following window iss displayed. The USBDM has
been detected. Click "Detect" if not.
MyFreescaleWebPage
21
MyFreescaleWebPage
22
The device is programmed and a message is displayed to indicate that the operation completed.
MyFreescaleWebPage
23
Simply choose the USBDM in the connection list during the creation of the project, as shown on the
following screenshot (Freescale CodeWarrior V10.
V10.6).
MyFreescaleWebPage
24
Conclusion
The USBDM is a powerful device. It is regularly updated to support new microcontrollers. You are now
ready to build your own USBDM and use it to load and debug applications on many Freescale devices.
MyFreescaleWebPage
25
MyFreescaleWebPage
26
MyFreescaleWebPage
27