EDIT: Why can't you program 912DG128A with USBDM?

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

EDIT: Why can't you program 912DG128A with USBDM?

562 Views
tomogden
Contributor I

I think I need to rephrase my question so it doesn't look like I haven't done any research...

I'm new to the 912 series chips.  I have a couple of old 912DG128A boards that have a 6 pin port with the bdm pins (gnd, vcc, bkgd, reset, modb, moda) but I can't figure out what I can program them with.  I read about the bdm interface in the device datasheet.  I've done a lot of googling about bdms and from what I can tell the main open source ones were the OSBDM and the TBDML, but they've now been combined into the USBDM.  If I understand correctly, the JS16 version is the current design.  Under the JS16 section on usbdm at sourceforge, the HCS12 is listed as supported but the HC12 is not.

I also installed the flash programmer code from usbdm (written by pgo i think?) and ran it in windows but the 912DG128A is not in the device list.

It seems like the USBDM only works with the S (HCS12) chips and I don't understand why.  I've emailed various makers of bdms found on ebay (which i think are clones of the USBDM) and they've said their units cannot program the 912DG128A.  I found Daniel Malik's old TBDML debugging post and it looks like the old bdm could program this device, but I haven't been able to find any of them.

The 912DG128A is an old part, but it has an internal charge pump for flash and eeprom so Vpp of 12v isn't necessary.  I read a post describing the 912 and 912S differences as a die size/technology change.  I read the dev support chapter in the datasheet, regarding how to use the bkgd pin to start bdm mode, and then send flash commands to the chip... is the bdm spec for the 912DG128A somehow different from the S versions of the chip?  Why can't the USBDM write the flash on this chip?

Any thoughts would be much appreciated.

0 Kudos
2 Replies

354 Views
pgo
Senior Contributor V

Hi Tom,

A little bit of history:

  • TBDML cannot program anything - It is a BDM interface and relies upon other software to make use of the BDM interface to do the programming.  The usual way to do this was using Codewarrior for HC(S)12.  I'm unsure if the combination Codewarrior+TBDML was ever able to program HC12 devices.  I have checked the current version of Codewarrior and it certainly doesn't .  It only supports P&E or Abatron interfaces.  It is possible that the current version has removed support that previously existed.  I cannot locate an earlier version to check.
  • There may be other 3rd party software that supports programming HC12s using TBDML but I am unaware of any.
  • USBDM is similar to TBDML.  When working with Codewarrior it pretends to be a TBDML interface and can program any device that TBDML+Codewarrior can program.  So the above limitation applies. 
  • In addition the USBDM software provides a stand-alone programmer that can program HCS12 devices (amongst others).  Why doesn't it support HC12 devices? The simple answer is because I haven't written the required programming routines to support them.  This assumes that they don't have special requirements that I'm not aware of. This is unlikely to be get done.  I have limited time and no access to HC12 devices for testing. I have briefly checked the device data sheet and it would appear to have a EEPROM based flash that is significantly different to that used in the S12 devices so it would be a fair amount of work.
  • You could attempt to write your own routines for the USBDM programmer but I will admit the required information is a bit fragmented.

So - not much help I'm afraid.

bye

0 Kudos

354 Views
tomogden
Contributor I

Hey Pgo,

Thank you very much for the explanation!!  I think this all makes more sense now.  I did check out the USBDM code a little bit on github so if I get the hang of it I may take a crack at writing a programming routine for it.

Assuming I'm using USBDM, is this a correct if not oversimplified understanding of how this all works... the BDM pods know very nothing about what chip you're using.  Applications like the USBDM stand-alone programmer or the API Example (that dumps the flash from a MCS908JM60) use the usbdm api to send instructions to the USBDM pod.  The USBDM pod then interprets those instructions and writes (or reads) the single wire BKGND pin to execute the command on the target device.  Those BDM commands are either hardware commands (when not in active background mode) or firmware commands (when in active background mode).

One last question is shouldn't I be able to use the USBDM api to write a simple program for any target device with BDM capability (MC912DG128A or MCS908JM60 etc) to do a bunch of READ_BYTE instructions to get a word from any address (which addresses i can read of course depends on the target)?

0 Kudos