USBDM - Version 2 (JB16 Version)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USBDM - Version 2 (JB16 Version)

9,836 Views
pgo
Senior Contributor V
Dear All,

 

Attached is version 2 of the JB16 version of USBDM.

 

Please note that I no longer recommend using this version of the hardware as the JB16 is becoming hard to get. 

 

If you want a simple BDM then I recommend the JS16 version posted separately.  This has all the advantages of the JB16 (ability to be programmed over USB & convenient SOIC package) as well as being USB2 Full speed.  It is also available as a sample from Freescale :smileyhappy:.

 

If you want a full-featured BDM then I recommend the JMxx version.

 

 

BDM Firmware History
  • V2.0 (September 2009) - Major change - Please read
    • Major revision. The structure of the software has been revised and the operation with various targets made more uniform.
    • Introduction of a new API for using the BDM. Existing APIs (TBDML, OSBDM, TBLCF) are now supported by a separate compatibility layer. This has resulted in a very significant reduction in the complexity of both the BDM firmware and the interface DLLs. The previous arrangement was becoming impossible to maintain.
    • The handling of RS08 devices has been re-written in a more sensible fashion. This involved moving the bulk of the RS08 code from the BDM firmware to the interface DLLs. This should mean that additional devices can be introduced without changing the BDM firmware. Support for additional RS08 devices has been added. The BDM now supports KA1, KA2, KA4, KA8, LA8 and LE4.
    • Because of the above changes, the BDM REQUIRES the use of the provided interface DLLs. The BDM is no longer compatible with the original TBDML or OSBDM dlls.
      The provided DLLs maintain some limited compatibility with earlier versions of TBDML, OSBDM and USBDM but may not support all features or targets
  • V1.5 (?? 2009)
    • Improved/corrected connection strategy for external power cycling
    • Minor bug fixed (glitch removal)
    • Improvements to ALT clock handling
    • Minor changes to USB code - Tested with USBCV13.exe from USB.ORG - now passes
  • V1.4 (February 2009)
    • Added extra dialogues prompting the user to cycle target power when necessary. Corresponding options added.
    • Added connection retry when target power is absent.
    • Added support for MC51AC256 (a bit of a hack!)
    • Modified HCS macros (to provide considerable size reduction as needed for USBDM_CF in 16K)
    • General clean up of code
    • Unified Timer MACROS
    • Re-arrangement of Target Vdd control routines
    • Minor mods & corrected comments in bdm_syncMeasure()
    • Reviewed stack size
    • Increased cable_status.waitX size
  • V1.2 (October 2008)
    • Removed library reference in ICP code - ICP broken when non-ICP code was changed! This update requires the ICP code to be replaced when updating any code.
    • Increased stack size (stack overflow was possible)
    • Utilities (setBoot) updated to match.
    • Other cosmetic changes
  • V1.1 (August 2008)
    • Vista compatibility
    • Fixed several bugs related to use of 1T45 buffers (Witztronics etc.)
  • V1.0 Initial Release
 

 

 

 

Message Edited by pgo on 2009-11-05 12:01 PM
Message Edited by pgo on 2009-11-05 12:02 PM
Message Edited by pgo on 2009-11-05 12:17 PM
Message Edited by t.dowe on 2009-11-05 12:39 PM
Tags (2)
0 Kudos
Reply
12 Replies

1,675 Views
Ari
Contributor I

Hi, first of all, thanks pgo for aiding me. Today i went to a friend's house, and borrowed his oscilloscope (we're students), and while i was checking the different lines, i realized that i hadn't connected the pin 10. Fixed it and it ran smoothly =D.

 

Thanks for your time, and i'm sorry i bothered you with such a dull problem :smileytongue:.

 

 

0 Kudos
Reply

1,675 Views
carloscuevas
Contributor III
Thank you pgo for ypur reply on my question, Now it's clear. Thanks
0 Kudos
Reply

1,675 Views
Ari
Contributor I

Hi, i've build the JB16 - 20 pins version 2, the one posted here, but it doesn't seem to be working properly.

 

I've build my own PCB, following the schematics on the zip file. Using ICP i've downloaded the firmware into the device, and installed the .dlls on the computer.

 

I'm using the CW v6.3 - special edition, and everything goes on well, until the moment i want to flash a uC.

 

I've typed a simple soft to make a LED blink using a S08SH8 microcontroller, just to test the OSBDM. The problem i'm getting is this: when i want to flash the device, the "HIWAVE" part of CW prompts a message saying that the device is secured, or the derivative is wrong, and cannot be flashed.

 

When i select the option "Unsecure", under the "HCS08 Open Source BDM" menu, it returns that the device couldn't be unsecured.

 

The soft i wrote for the SH8 is configured to work with the internal clock generator, and preescaled the internal bus to 4MHz. 

 

I attach an image of the "Status" of the OSBDM, just in case.

 

If there's anything else anybody needs to help me solve this, please ask for it.

 

Thanks in advance to anyone that can help. 

 

 

0 Kudos
Reply

1,675 Views
pgo
Senior Contributor V

Dear Ari,

 

I assume you get the usual USBDM  Configuration dialogue?

 

If you have the resources, check if the BKGD pin on the target is changing when the BDM tries to program the target.  You could also check for activity on the following JB16 pins:

7 & 13  (BKGD_I). 

12 (BKGD_O)

10 & 15 (BKGD_DRV)

 

This will at least indicate if there is an obvious hardware problem with the 'LV125.

 

If there is nothing obviously wrong then could you replace the DLLs with the debug version and try again.  There won't be any change to the results but a log will be produced in C:\usbdm.log.  Please post this as it should indicate what the problem is.

 

Test_USBDM.exe can be used to do basic testing of the BDM as well.  Try the following commands and inspect the log file:

------------------

settarget 1
connect
gs
exit

------------------

 

bye 

0 Kudos
Reply

1,675 Views
vluban
Contributor I

Dear pgo,

 

Looks like the schematis and pcb files you publish are being made using Protel, but I cannot read them using Protel 99SE somehow. Could you tell me which CAD software to use to read them?

 

Sorry if it was mentioned elsewhere and I missed that.

 

Thanks!

 

0 Kudos
Reply

1,675 Views
pgo
Senior Contributor V

Dear vluban,

 

They were done with Altium designer.  I'll see if it supports export to earlier versions (e.g. protel).

 

Which PCB are you interested in?

 

bye

0 Kudos
Reply

1,675 Views
vluban
Contributor I

Dear pgo,

 

Actually I wanted to build JS16 and JB16/64 versions. I need to recreate a board as I have different size box.

 

But don't worry, those schematics are not that big, I can recreate them easily.

 

OTOH, I suggest to make a sticky thread for posting boards/schematic/sources/docs releases, scooping them over dozen of threads is a bit inconvenient. If that's a problem, I'm offering a free webhosting to collect all the releases in one place.

 

Thanks.

0 Kudos
Reply

1,675 Views
pascalba
Contributor I

Hi,

 

I'm using a WTUSBDML version of the BDM with firmware v1.4.

Can I safely upgrade the stick with the attached "WTBDM_JB16.s19" file or do I need to use the upgrade firmware sold on Witztronics website?

 

Pascal

 

 

 

 

0 Kudos
Reply

1,675 Views
pgo
Senior Contributor V

Dear Pascalba,

 

I have no information on the version from Witztronics.  It may have modifications compared to the above code.  I also have no idea what warranty or support would be available if you used the above version.  I suggest you post on their forum to obtain a definitive answer. 

 

I have used and tested the above version on their hardware.  YMMV :smileyhappy:

 

If you wish to use the USBDM HCS08 Flash programming utility it would be necessary to use the slightly later version of the interface DLL available with that software.

 

bye

0 Kudos
Reply

1,675 Views
pascalba
Contributor I

Hello pgo,

 

Thanks for your feedback.

I finally opted for the safe side and  paid for the Witztronics update... Just to discover that the update contains exactly the same "WTBDM_JB16.s19" file renamed to "WTUSBDML v2.0.s19" :smileymad:

along with other same dll's.

 

The only benefits is the documentation pdf included.

 

Pascal

 

 

 

0 Kudos
Reply

1,675 Views
carloscuevas
Contributor III

Great work PGO ! Thank you for giving us some of your time and work

 

I have WTBDM, as you know it does not have MAX662 in order to program RS08 devices. I want to control an external MAX662 circuit with a signal from the PTD2 pin (pin # 8 of the SOIC28 pkg) that is not used in the WTBDM, I tried doing this mod myself but I got a lot of errors and warnings. I changed the default target to WTBDM and added capabilities changing to "#define CAPABILITY (CAP_RESET|CAP_FLASH)" in the WTBDM_JB16.h file

 

What changes I need to do in order to receive GND signal in PTD2 to turn on the MAX662, and of course the enabling of RS08 programming using WTBDM. Thank you very much.

0 Kudos
Reply

1,675 Views
pgo
Senior Contributor V

Dear carloscuevas,

 

There would be extensive changes required to use the  WTBDM with a RS08.  Apart from the 12V supply you would also need to add the external switching circuit that controls the RESET/Vpp pin.  There are requirements for switching time etc that would make it unattractive to simply switch the supply on/off by controlling the MAX662 directly.  The circuitry currently connected to the RESET pin would also need to be isolated from the 12V.  Some of this could be done manually with jumpers but it's pretty messy.

 

If you wish to pursue it it would be better to start with the header file for the version that supports RS08 and reconcile it with the WTBDM header.

 

bye

 

 

0 Kudos
Reply