Using Chinese "JB16" TBDMs with USBDM

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
User avatar
johu
QFP80 - Contributor
Posts: 57
Joined: Sat Aug 16, 2008 4:39 pm
Location: Se oli ainakin näiiiiiin iso!

Using Chinese "JB16" TBDMs with USBDM

Post by johu »

Following steps have been tested with Wayengineer TBDM (S12 BDM interface by AWNUXUE) based on MC908JB16 and silkscreened "S12 BDM v1.3, 2012-01-05, MTC of AIT". At least some cheap S12 BDMs on ebay appear to be same design so same instructions should apply for them.

1. You must use 32-bit Windows XP to perform this
2. You must have Office 2010 installed - evaluation version is enough as it's only required for some unresolved dependency of USBICP.EXE
3. You can't use latest USBDM as support for JB16 has been broken for quite a while
4. USBDM developer has nuked all old versions from Sourceforge. I've proved links to working versions below.
  • Download and install USBDM 4.9.5 with default settings
    http://files.mpoli.fi/sekalaiset/usbdm/ ... 5b_Win.msi
  • Download USBDM_Win32_4_6a.zip from
    http://files.mpoli.fi/sekalaiset/usbdm/ ... 2_4_6a.zip
  • Extract USBDM_Win32_4_6a.zip
  • Plugin Wayengineer TBDM while pulling pin 10 of MON08 connector GND to initiate ICP mode
    Pin 10 is also known as MON_DATA, see "C:\Program Files\pgo\USBDM 4.9.5\FlashImages\JB16\OSBDMe.pdf" included in USBDM 4.9.5 package for pinout if necessary.
  • Install USBICP driver from USBDM_Win32_4_6a.zip "Win32\Freescale ICP Files"
  • TBDM should be detected as USB\VID_0425&PID_ff02 "Motorola JB16/JG16 ICP Device"
  • If it comes up as USB\VID_0425&PID_1000 then you failed to initiate ICP mode
  • Launch USBDM_Win32_4_6a\Win32\Freescale ICP Files\USBICP.EXE
  • Select "Initial_Programming_MassErase.imp" when asked to open file
  • Next browse to "C:\Program Files\pgo\USBDM 4.9.5\FlashImages\JB16" and select USBDM_JB16.s19
  • Go thru Erase, Program, Verify and close USBICP
  • Unplug TBDM
  • Uninstall USBDM 4.9.5
  • Download and install 4.9.4 as it's last version with working JB16 support
    http://files.mpoli.fi/sekalaiset/usbdm/ ... 4b_Win.msi
  • Plug TBDM back without grounding pin 10
  • New device will be detected, point driver install wizard to
    "C:\Program Files\pgo\USBDM 4.9.4\USBDM_Drivers\Drivers"
  • New USB ID should be VID_16D0&PID_0567 and name "USBDM BDM Interface"
  • You can now follow regular USBDM docs. Programmer will also work with 32-bit and 64-bit Win7 now.
I've programmed new SM and FreeEMS to Wayengineer 9S12XDP512 board using this BDM after firmware upgrade described above. Jumpers were "J4: BKGO SELECT as BDM1", "J6: VDD125 from Target: remove jumper" and "J5: VDD125 from USB: install jumper".

Wayengineer 9S12XDP512 board can communicate with EMStudio, but that's it. Haven't done any further testing.
Attachments
MC9S12XDP512-core-1.gif
HCS12-BDM-1.gif
User avatar
AiToR51
QFP80 - Contributor
Posts: 80
Joined: Sun Aug 21, 2011 6:26 pm
Location: Spain

Re: Using Chinese "JB16" TBDMs with USBDM

Post by AiToR51 »

Did anyone used this with elmicro MC9S12XDP512 board?

I followed this steps and could upgrade the TBDM firmware but It can't detect the MC9S12XDP512 board.
Sierra XR4i 2.0T
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Using Chinese "JB16" TBDMs with USBDM

Post by Fred »

Do you have a quality 5V supply on the CPU board? Did you have the cable the right way around? Is the cable in good condition? The errors with bad cables etc are not helpful. How about running it as root? That helped me once, but I don't need it now.

EDIT: If you want to, you can pay postage and I can load an SM onto it here.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
AiToR51
QFP80 - Contributor
Posts: 80
Joined: Sun Aug 21, 2011 6:26 pm
Location: Spain

Re: Using Chinese "JB16" TBDMs with USBDM

Post by AiToR51 »

Fred wrote:Do you have a quality 5V supply on the CPU board? Did you have the cable the right way around? Is the cable in good condition? The errors with bad cables etc are not helpful. How about running it as root? That helped me once, but I don't need it now.

EDIT: If you want to, you can pay postage and I can load an SM onto it here.
I got 5V from an Arduino. My voltimeter says it's 5.00V .
I will check the BDM cable that came with the programmer.

I tried it in linux as root and also in Windows XP 32bits (as needed to modify the TBDM) near the same errores (I don't have it here to copy them).

I will try it this weekend and if I can't load a SM I can take your offer of sending it to you :P But first I want to try.
Sierra XR4i 2.0T
User avatar
MrOnion
QFP80 - Contributor
Posts: 45
Joined: Tue Jul 06, 2010 1:03 pm
Location: Espoo, Finland

Re: Using Chinese "JB16" TBDMs with USBDM

Post by MrOnion »

I can program my elmicro card with a BDM just fine. No need for an external 5V supply if I feed it through the BDM.

There are two 6-pin headers on the elmicro card, X1 and X8. Are you sure you have the BDM cable on the X1 which is the BDM port?
User avatar
AiToR51
QFP80 - Contributor
Posts: 80
Joined: Sun Aug 21, 2011 6:26 pm
Location: Spain

Re: Using Chinese "JB16" TBDMs with USBDM

Post by AiToR51 »

Yes, I followed your guide (http://roller.baboonplanet.com/garage/e ... irmware_on). It's very good explained.

I tried to supply 5V also from BDM closing the two jumpers of the JB16 as is said in it datasheet, and in fact, I get 5V on elmicro card header with the multimeter.

But the HCS12 flash programmer says "The target appears to have no power. Please supply power to the target. Retry?"
But it has 5V..

If I don't apply the 5V from BDM the error is different "Failed to connect to target", the same I get if I disconnect the cable. If I then apply the 5V from an external source gives the same error that before "The target appears to have no power. Please supply power to the target. Retry?"

This happens also in Linux or Win XP.

In the elmicro card, should any led power ON when you apply 5V? In mine none.

thanks.
Sierra XR4i 2.0T
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Using Chinese "JB16" TBDMs with USBDM

Post by Fred »

IIRC it has no software on it, so likely not, unless there is a power LED. Check with others/book/traces/MrOnion/etc.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
MrOnion
QFP80 - Contributor
Posts: 45
Joined: Tue Jul 06, 2010 1:03 pm
Location: Espoo, Finland

Re: Using Chinese "JB16" TBDMs with USBDM

Post by MrOnion »

Yes, it's a blank mcu. No leds should be on. The only led on the board is connected to the PH7 pin and does nothing until your software decides to.

Do you happen to have any ms2 hardware around? Maybe try if the BDM works with them? Try to read the fw from one of those?
User avatar
AiToR51
QFP80 - Contributor
Posts: 80
Joined: Sun Aug 21, 2011 6:26 pm
Location: Spain

Re: Using Chinese "JB16" TBDMs with USBDM

Post by AiToR51 »

ok, thanks. I don't have a MS2 neither any other freescale MCU.

I checked the cable and it's ok and also rechecked the voltage and some schemas and I don't find anything wrong. So I'm seriously considering sending Fred my card.
Sierra XR4i 2.0T
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Using Chinese "JB16" TBDMs with USBDM

Post by Fred »

Got it (BDM and S12), couldn't make his BDM work, used mine, loaded seank.hacked SM and will send back later today. Didn't/couldn't load fw due to no serial or usb connection.

"3. You can't use latest USBDM as support for JB16 has been broken for quite a while"

Likely related, I guess.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply