Programming a 68HC912B32 with usbdm

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

Programming a 68HC912B32 with usbdm

999 Views
tomcrane
Contributor II

I am attempting to program an old board with this chip on it but am completely new to this microcontroller family and so would appreciate some advice.

I have downloaded and installed the USBDM_4_12_1_340_Win.msi Windows software and was able run the "USBDM Memory Dump" application and dump the flash memory (address range 0x8000-0xFFFF) on the 68HC912B32 chip.

I also looked at the "HCS12 Programmer" or "Flash programmer" application but it does not have the MC912B32 chip on its pull-down menu list. I also tried "Device selection" with the "Detect Chip" button but it was unable to detect my chip.

I don't need a full development environment / IDE, just the ability to dump the flash memory, replace the damaged microcontroller and program the new one with the dumped program.

This 4 year old https://community.nxp.com/t5/OSBDM-and-TBDML/program-the-HC12-B-Family-of-MCU/td-p/1324102 thread is interesting but does not provide a solution.  Noting the contributions further down that thread by @pgo regarding Tcl/Tk, my preferred OS is Linux rather than Windows so am more than happy to try a Linux based solution.

Any thoughts on how I might get a working programming environment set up?

 

Many thanks

Tom Crane

4 Replies

927 Views
pgo
Senior Contributor V

Hi Tom,

I'm sorry but I no longer have access to Codewarrior (or Windows!) so I can't conveniently check this myself.

When I search for  68HC912B32 on the NXP site (https://www.nxp.com/products/68HC912B32) it eventually leads to the Codewarrior version you have downloaded so this appears the correct one.

I have no idea why B32 it doesn't appear.

Sorry!

0 Kudos
Reply

602 Views
tomcrane
Contributor II

Hi @pgo,

Thanks for the follow-up. I had some progress.  The solution to the non-appearance of support for the 68HC912B32 in Code Warrior 5.2 was to install Code Warrior 5.1 instead. This is suggested here https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-Development-Studio-for-HCS12-X-Microcon....

Under 5.1 (see attached screen-grab Code-warrior2-run-as-administrator-MC68HC912B32+USBDM.jpg) the MC68HC912B32 chip is now present and can be selected.  However there is no USBDM or TBDML option listed in the Connections pull-down menu.  I had reinstalled USBDM and its drivers after reinstalling Code Warrior 5.1 and had plugged the USBDM into the PC.

To check if the non-appearance of the USBDM in the Code Warrior Connections menu was due to the 68HC912B32 not being supported by the USBDM, I tried selecting another chip that is supported by USBDM.  I chose a MC9S12A128B.  Now the Connections menu sports 3 additional entries; "TBDML", "HCS Serial monitor" & "USBDM".  See attached screen-grab Code-warrior2-MC68HC9S12A128B+USBDM.jpg.

Apart from trying to modify the USBDM Tcl code to support the 68HC912B32, are there any other S/W applications or other options which could be used with the USBDM pod to program this chip?

If not, are there any other H/W options with S/W support that would let me program the flash memory in a 68HC912B32 ?  The board I have has only the 6-pin BDM socket for debugging/programming -- so have to assume that is how the manufacturer originally programmed it, unless it was done out-of-circuit before soldering in, which seems unlikely...

Thanks

Tom.

0 Kudos
Reply

987 Views
pgo
Senior Contributor V

Hi Tom,

I'm sorry but it is unlikely that the USBDM programmer could be adapted to program your chip.  As the other thread indicated this would require developing TCL scripts to do the basics (chip init, mass erase etc) and the target code to do the block programming.  This is a lot of work and there is no guarantee that the approach would work as the approach taken by USBDM may be incompatible with that earlier chip.

USBDM can be built for Linux using the rep at https://github.com/podonoghue/usbdm-eclipse-makefiles-build.

I think your best bet is to check if Codewarrior V6 ( I think) supports this chip with TBDML (which USBDM is compatible with).  I'm not sure if this allows stand-alone programming rather than debug development from source.  This is windows only.

bye

 

0 Kudos
Reply

971 Views
tomcrane
Contributor II

Hi Pgo,

Thanks for the follow-up.  I have partially disassembled the image I dumped earlier so should be able to cobble together a .asm file to go in a Code Warrior project.

I could not find a version 6 of Codewarrior to download but did download from this https://www.nxp.com/design/design-center/software/development-software/codewarrior-development-tools... link.  It is listed there as version 5.2 and importantly under the "Expand All" checkbox at "Supported Devices" the 68HC912B32 is listed.

Installing + running the application and checking the version number shows 5.9 rather than 5.2. See attached screen-grab image.

Invoking "Startup dialog..." and "Create new project" provides a pop-up with the choice of chip families.  See the attached screen-grab image.  It lists only HCS12 & HCS12X families.

Expanding those shows the family members. See the attached screen-grab image. As expected there is no HCS912B32 amongst them.  

Am I doing something wrong or missing something obvious?

Many thanks

Tom Crane

0 Kudos
Reply