EVBplus.com

 

Home

Buy

Products

Textbooks

Resources

Support

Download

Contact

 

 

 

 
 
 

USBDM, designed by PGO

An open source BDM for Freescale
S12(X), 9S08 and Coldfire V1 controllers.

Provides 5V or 3.3V to the target
 with voltage level indicators.

 

 
  USBDM-1-JS16 features:
  • A single BDM for programming and debugging HCS12(X), 9S08 and Coldfire V1 microcontrollers
     
  • Includes a 3.3V (500mA) regulator and can supply 5V or 3.3V to the target board (jumper selectable).
    This is useful when debugging or programming a target board without power supply.
     

  • Includes a voltage level monitoring circuit with a red LED indicating 5V and a yellow LED indicating 3.3V.
    This unique feature is only available with Wytec's USBDM.
     

  • Includes a resettable fuse to protect the USB port of your PC.
     
  • Compact size, 0.8" x 2.4"

 

Installation instructions:

PGO has provided complete documentation on each of his USBDMs. http://usbdm.sourceforge.net/

Our USBDM-1 is pre-programmed with PGO's latest firmware version 4.8 and the installation steps are as follows ( Do not plug in the USBDM-1 until the step 3 ):

1.  You need to install the CodeWarrior in order to use the USBDM-1. If you have not installed the CodeWarrior you need to download and install it from the following link, otherwise skip this step.

http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=01272600610BF1

Special edition version 5.1 for HCS12(X) ( Classic, Windows hosted )
Special edition version 6.3 for
RS08/HC(S)08  and CF V1 ( Classic, Windows hosted )
Special edition version 10.2 for
RS08/HC(S)08  and CF V1 ( Eclipse, Windows or linux hosted )

The size of each file is very large. It will take a few hours to download, so you should first save it on your hard drive in case you need to install it in another PC in the future.

2.  At the web site http://sourceforge.net/projects/usbdm/files/
Double click on the USBDM_4_8_0_Win.msi and wait for everything to install automatically

3. Connect your USBDM-1 to a PC USB port to install the USB driver and follow his instructions at:
http://usbdm.sourceforge.net/USBDM_V4.8/USBDM_JS16/html/driver_page.html

4.   After the USB driver is installed then you can verify it in the Device Manger. When the USBDM-1 is connected to a PC USB port the Device Manger will show "LibUSB-Win32 Devices".  See the picture below:


 

Operating instructions:

  • Connect your USBDM-1 to a PC USB port. After one second, the green LED on the BDM should come on and stay on. It indicates that the BDM firmware is installed in the MC9S08JS16.
     
  • Set the target voltage selecting shunt plug on J2 for the correct target voltage, 5V or 3.3V. Be careful not to set at 5V for a 3.3V target board.  Most HCS08 and V1 controllers rated at 5V still work with 3.3V so it can  be defaulted at 3.3V. Our USBDM-1 includes a voltage monitoring circuit. If the target voltage is 5V, a red LED will be on, if the target voltage is 3.3V, a yellow LED will be on and if the target voltage is 4V both LEDs will be on.
     
  • Connect the 6-pin BDM cable from the BDM OUT (P2) to your target board.
     
  • If you are new to CodeWarrior and never used CodeWarrior, you need to know that you have to open a project file (its file extension is .mcp) in CodeWarrior before invoking the CodeWarrior debugger.
    Otherwise invoke CodeWarrior, open a new project for your target, make sure the MCU type and connection are correct.  For more info. on the CodeWarrior set up and tutorials please visit http://www.evbplus.com/Code_Warrior_hcs12.html
     
  • Click the debugger button.  Read the section of "Using USBDM" on the PGO's web site carefully.  PGO provided USBDM configuration of each MCU family for CW debugger in details. When starting the debugger you will be presented with a small dialogue window and you need to follow PGO's guide to set all options.
     
  • Most the time a new blank CF V1 MCU is locked and the BKGD pin is held low by the USBDM-1. You can cycle the power to unlock it. If the USBDM-1 still does not communicate with a blank V1 chip after cycling the power, then you can use PGO's programming utility, CFV1_FlashProgrammer.exe, in the folder named C:\Program Files\pgo\USBDM 4.8.0 to unlock the blank V1 chip.
     
  • Warning for HCS12 users: Our USBDM-1 uses a built-in resettable fuse to protect the USB port of your PC.  It will cause a voltage drop when it's connected to a target board. If you use the USBDM-1 for debugging a HCS12 board that has a built-in low voltage detector, such as the MC34064, the LV detector may reset your target board if the board draws large amounts of current (>200mA) that will cause the VCC drop to the level below the threshold voltage of the LV detector (4.75V).  When the LV detector kicks in, the reset line of the HCS12 will be held at low and the USBDM-1 won't be able to communicate with the HCS12. If this happens you should remove the shunt plug on the 3-pin target voltage select header (J2 on the USBDM-1) and use the external 5V from your target board for the USBDM-1.
     

 

Replacing D-Bug12 monitor with serial monitor using HCS12_FlashProgrammer:

PGO has provided a cool utility program to turn our USBDM-1 into a standalone programmer without invoking the CodeWarrior.
Warning: To use this feature, your USBDM must be installed successfully.  It should be recognized by the Device Manger.

1.  Download and unzip the serial monitor

2.  Connect your USBDM-1 to a PC USB port ( not a USB hub ) via the USB cable and connect it to the Dragon12 via the 6-pin ribbon cable as shown on the following pictures. The power LED on the Dragon12 should be lit.

If the Dragon12 board keeps resetting itself ( the speaker keeps beeping and the 8 port B LEDs below the 7-segment LEDs keep cycling through ), you need to use the AC adapter that came with the package for the Dragon12 and remove the jumper from the J2 on the USBDM, so the Dragon12 will provide power to the USBDM.

The reason that the Dragon12 board keeps resetting itself is that the supply voltage provided by the USBDM dropped too much. It mainly is caused by the resettable fuse on the USBDM.  You also need to make sure that the USBDM is connected to a USB port ( rated at 500mA ), not a USB hub ( rated at 100mA ) and your USB cable length is 6 feet maximum, no USB extension cord is allowed)

On our newer manufactured USBDMs the trip current of the resettable fuse is rated higher so this problem should not occur any more.

 

3.   Run the HCS12_FlashProgrammer.exe from the folder C:\Program Files\pgo\USBDM 4.8.0,
then it brings up the following window.

Notice that the USBDM is detected above.  The versions of the USBDM firmware and DLL are also shown. They should be the same.
If the firmware version is old than the DLL version you need to upgrade it, otherwise you will get an error message that says "Failed to open BDM".

If the firmware version is 4.x, you can run PGO's bootloader.exe to upgrade it, but if the firmware version is 3.x, then you need to upgrade it in a special bootloader mode ( by shorting two pads in solder side) and run Freescale's bootloader GUI software, or you can use another BDM, such as USBDM or P & E multilink USB BDM, to upgrade it

 

4. Switch to the Target tab, click the "Detect Chip", notice that the HCS12 MCU is detected, make sure to change it to the MC9S12DG256.  Then click the "Load Hex Files", and browse to the s19 file "sm_and_test_dr12p_rgb_8mhz.s19" and click "Open"


Notice that the serial monitor s19 file is loaded above.

 

5.  In order to program the flash memory you need to mass-erase it first. There is an option for the mass-erase in the DLL version V4.8.
Click the Erase Options and scroll down to the last option, "EraseMass"

 

6.  Finally select the "Program Flash", after a short delay you will see:

 

7.  It's done.  Place the left DIP switch of the SW7 in the "UP" position, press the reset button on the Dragon12, the test program should run.

8.  Disconnect the Dragon12 from the USBDM-1 and place the left DIP switch of the SW7 back in the LOW" position.  Your Dragon12 will be ready to talk to CodeWarrior.

Warning:  We added LCD display routines in D-Bug12 monitor firmware, so the LCD will display a message after power up, but the same message will not appear with the serial monitor firmware and you will only see 16 squares on the LCD. The serial monitor does not have enough memory space for LCD routines.  The LCD routines can only be included in our test program or any user programs.

 

Tech support:

  1. If you have any questions with the USBDM please feel free to call us at (630) 894-1440 or post a message at:
    http://forums.freescale.com/t5/OSBDM-JM60-Open-Source-BDM-for/bd-p/OSBDM08