USBDM  V4.12
Codewarrior - HCS08 & HCS12

When creating a project in Codewarrior choose the appropriate debugger option as follows:

Codewarror Version
BDM Version
Target Debugger
CW for HC12 TBDML (Not all targets support this option)
CW for Microcontrollers V6.x HCS08 Target - HCS08 Open Source BDM
Coldfire V1 Target - CFv1 Opensource BDM

Start the de-bugger in the usual fashion after ensuring the appropriate target debugger is selected.

HC12

When launching the debugger you will be presented with the dialogue shown below. After closing this dialogue debugging will proceed as usual. Some options may be disabled depending upon the hardware capabilities of the BDM interface.

Select BDM - Allows selection between BDMs when multiple are connected

  • BDM Selection drop-down box - This displays the serial numbers of the connected USBDM-BDMs. It is useful if each BDM has a unique serial number as that will allow the automatic re-selection of the same BDM on the next session.
    If the BDM does not support the required target then a suitable message replaces the serial number. Communication problems will also cause an informative message.

  • Detect button - This may be used to scan for changes in the connected BDMs.

  • BDM Description - Also displayed is the BDM Description obtained from the BDM firmware.

    Target Vdd Control - Enables supply of Target Vdd from the USBDM module
    Some versions of the BDM are able to supply a modest amount of power to the target device via the BDM connection. This is useful when debugging with a small system.
    Note: These options will be disabled if the BDM does not have software controlled target power i.e. no option at all or manual control via a jumper.
  • Off, 3.3V or 5V - Controls voltage supply to target through BDM Vdd connection.

  • Cycle target Vdd on reset - This option will cause the BDM to cycle the target power as part of the reset sequence.

  • Cycle target Vdd on connection problems - This option will cause the BDM to cycle the target power when it is having trouble connecting to the target.

  • Leave target powered on exit - The target Vdd supply will be left on when exiting the debugger.

  • Prompt to manually cycle target Vdd - Some targets may only be made to enter BDM mode through holding BKGD low while applying power. This option will cause a dialogue to appear prompting the user to remove and re-apply power to the target. The BDM will be holding BKGD low while this prompt appears. This option is not required if the BDM is supplying power to the target.

Connection Control

  • Automatically re-connect - The existing TBDML code appears to have problems debugging a target when the target clock speed is changed. The option causes the BDM to continuously update the interface speed to prevent loss of communication in this case.

  • BDM Clock Select - Some targets provide an alternative BDM clock selection which may be at a lower speed that the default. This can have advantages when connecting to high speed targets (mostly of use in the JB16 version). There may be other requirements before the alternative clock will be used.


    Note: it appears that HC12 use the Alt source by default so the Normal option may be of more interest.


  • Guess speed if no SYNC - Early HCS12s do not support the SYNC feature which allows the BDM interface speed to be determined. Selecting this option will cause the BDM to attempt to find the communication speed by trial and error. This can take quite a while and may be unreliable. Alternatively, set the target speed in the debugger TBDML menu.

RS08, HCS08 and Coldfire V1

The above targets have very similar settings so are described together. Some of the following options may be absent from the dialogue for a particular target.
When launching the debugger you will be presented with the dialogue shown below. After closing this dialogue debugging will proceed as usual. Some options may be disabled depending upon the hardware capabilities of the BDM interface.

Select BDM - Allows selection between BDMs when multiple are connected

  • BDM Selection drop-down box - This displays the serial numbers of the connected USBDM-BDMs. It is useful if each BDM has a unique serial number as that will allow the automatic re-selection of the same BDM on the next session.
    If the BDM does not support the required target then a suitable message replaces the serial number. Communication problems will also cause an informative message.

  • Detect button - This may be used to scan for changes in the connected BDMs.

  • BDM Description - Also displayed is the BDM Description obtained from the BDM firmware.

    Target Vdd Control - Enables supply of Target Vdd from the USBDM module
    Some versions of the BDM are able to supply a modest amount of power to the target device via the BDM connection. This is useful when debugging with a small system.
    Note: These options will be disabled if the BDM does not have software controlled target power i.e. no option at all or manual control via a jumper.
  • Off, 3.3V or 5V - Controls voltage supply to target through BDM Vdd connection.

  • Cycle target Vdd on reset - This option will cause the BDM to cycle the target power as part of the reset sequence.

  • Cycle target Vdd on connection problems - This option will cause the BDM to cycle the target power when it is having trouble connecting to the target.

  • Leave target powered on exit - The target Vdd supply will be left on when exiting the debugger.

  • Prompt to manually cycle target Vdd - Some targets may only be made to enter BDM mode through holding BKGD low while applying power. This option will cause a dialogue to appear prompting the user to remove and re-apply power to the target. The BDM will be holding BKGD low while this prompt appears. This option is not required if the BDM is supplying power to the target.

Connection Control

  • Automatically re-connect - The existing TBDML code appears to have problems debugging a target when the target clock speed is changed. The option causes the BDM to continuously update the interface speed to prevent loss of communication in this case.

  • BDM Clock Select - Some targets provide an alternative BDM clock selection which may be at a lower speed that the default. This can have advantages when connecting to high speed targets (mostly of use in the JB16 version). There may be other requirements before the alternative clock will be used.


  • Use RESET signal - Many of the target microcontrollers do not have a dedicated reset signal. This is not a problem as it is possible to reset the target using the BKGD mode commands through the BDM interface. However, the RESET signal on the BDM interface will often still be connected to the Reset signal of the processor. This option allows the BDM to monitor and control the RESET signal when appropriate.

    Don't show this dialogue in future
  • This suppresses the display of the dialogue when connecting to the target. This is useful if you have a simple BDM without target voltage control and you find the default (or once modified) options to be adequate.
    Display of the dialogue can be restored by the following methods:
    • Try debugging without the BDM connected. An error dialogue with three options should appear. One of these options being to "Change Settings". This will open the dialogue.
    • Delete the programmer configuration file %APPDATA%%/usbdm/usbdm_HC12.cfg (or similar for other targets).
      This will restore the default settings including the dialogue display.

Popups

  • When first connecting with the target you may be prompted with a connection error dialogue if the connection can't be established. This provides you with an opportunity to return to the Connection Dialogue to change settings. This option will not be available if the connection is later lost.
  • When connecting with the target you may be prompted to cycle the target power.
    Simply turn off and turn on the target power and then press Retry to continue. The Target BKGD pin will be held low while doing this.
    This is useful for difficult HCS08 targets that may not respond to software reset when in certain modes. For example, this may occur when a blank chip has a COP timeout or some times when the processor clock is supended. Another case would be if the BKGD pin can be programmed as an general purpose I/O pin.
  • After the initial connection with the target, you may be prompted to supply power to the target.
    This means that the BDM has detected that the target has no supply.