Upgrading firmware in an old JB16 USBDM

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

Upgrading firmware in an old JB16 USBDM

Jump to solution
3,152 Views
DanielO
Contributor I

Hi,

I have an old Chinese JB16 I bought years ago and never got around to using, however I tried it recently again and had some trouble - if I try and connect to a target with UsbdmScript.exe I get "No BDM Tx routine was found".

It reports firmware 4.10.2 so I thought I would upgrade it, however when I run FirmwareChanger.exe it does not like the USBDM_JB16.s19 file, nor any of the .s19 files in that directory.

The error is "Flash image is invalid. File is incorrect or corrupt?". I traced this through the code but unfortunately extra information is hidden behind a logging #ifdef which I don't believe is on and I don't know how to rebuild the code.

It does load any other firmware file, although I note those are .sx rather than .s19, obviously I can't flash those on a JB16 though

I tried a wild stab in the dark copying USBDM_JB16.s19 to USBDM_JB16.sx but it wstill rejected it.

FWIW I have tested my setup with a newer JS16 unit and it works so if it's a write off it's no big deal but if possible I would like to fix it as a spare.

Thanks.

0 Kudos
1 Solution
3,136 Views
pgo
Senior Contributor V

Hi,

I was able to find an old witztronics (sp?) JB16 BDM.

This worked fine under Linux with a HCS12 target (programmer+memory dump).  I was also able to update the firmware without any problems (to V4.10.0).

Under a Windows VM I was able to use the BDM with the HCS programmer and Memory Dump but the JB16_Boot-loader failed when doing the ICP reboot - the device failed to detect as a USB device.  This was expected as described earlier.

So it doesn't look like you can upgrade under Windows.

I do not have an explanation for the JB_16 boot-loader problems with opening the firmware file.  The auto-detect work OK for me and I was able to explicitly open a suitable firmware file from the JB16 firmware directory under both windows and Linux.

The above was with the current USBDM version.

bye

 

 

View solution in original post

8 Replies
3,105 Views
DanielO
Contributor I

Hi,

I built the code under Linux and used JB16_Bootloader to flash it to both 4.10.0 and 4.10.2 but I get "Target BDM Enable failed" so I guess either the programmer is busted or incompatible.

 

My earlier comment about FirmwareChanger was wrong - I was confused by the error message and didn't realise it doesn't support JB16s (realised it after debugging how the s19 load process works..)

Thanks for your prompt and comprehensive reply, it has been very helpful, and thanks for maintaining the software!

 

0 Kudos
3,138 Views
DanielO
Contributor I

Yeah I understand it's not supported but it does seem strange that the firmware loader can't even load the .s19 file for it - seems like a different issue.

0 Kudos
3,137 Views
pgo
Senior Contributor V

Hi,

I was able to find an old witztronics (sp?) JB16 BDM.

This worked fine under Linux with a HCS12 target (programmer+memory dump).  I was also able to update the firmware without any problems (to V4.10.0).

Under a Windows VM I was able to use the BDM with the HCS programmer and Memory Dump but the JB16_Boot-loader failed when doing the ICP reboot - the device failed to detect as a USB device.  This was expected as described earlier.

So it doesn't look like you can upgrade under Windows.

I do not have an explanation for the JB_16 boot-loader problems with opening the firmware file.  The auto-detect work OK for me and I was able to explicitly open a suitable firmware file from the JB16 firmware directory under both windows and Linux.

The above was with the current USBDM version.

bye

 

 

3,128 Views
DanielO
Contributor I

Hi, The first issue was that FirmwareUpdater.exe wouldn't load the .s19 file - it didn't even get to switching to ICP mode. I was trying it under a Windows VM (on OSX) but I'll try Linux VM and see but if I can't then in the bin it goes

0 Kudos
3,140 Views
pgo
Senior Contributor V

Hi,

I'm sorry the JB16 version has been unsupported for a long while.

See comments here:

http://usbdm.sourceforge.net/USBDM_V4.12/html/index.html

Basically the bootloader that is built in to the chip doesn't meet the USB standards properly and doesn't work with Windows 7 onwards. Mind you I haven't tried it since then.

If I can find a JB16 BDM I will check this.

bye

0 Kudos
76 Views
jiangA48386
Contributor I

Hello,

I also love TBDML because I started learning from MC9S12XD256. A while ago, I suddenly wanted to try making a TBDML, so I used TBDML_JB16-SOIC28 [Minimal]. pdf to complete the hardware. But I tested all the firmware and couldn't correctly install the drivers inside the sub folder of the USBDM_JB16-Distribution folder. I was planning to modify the VID&PID (modification date 12062008) corresponding to the driver in TBDML_JB16.abs.19, but I foolishly used ICP mode to upgrade USBDL_CF_JMxx ABS S19, from now on, JB16-PIN27 grounding can no longer activate ICP mode. I think it was based on MCU's s19 file that different ICP rewritten ICP's own Flash code space code? Can't ICP protect its own code space? This is a very magical process, and I am preparing to replace a JB16 to verify again. At the same time, I also want to know which driver (winXP) or win7 environment was used in the original TBDML. I am really confused! Thank you for maintaining these massive codes!

Thank you again!

Best Regards!

0 Kudos
54 Views
pgo
Senior Contributor V

I have not used a JB16 for a very long time and remember little directly.

I have checked the reference manual and found that for the ROM monitor to be entered there are two possible methods:

1. If IRQ = VTST:
– External clock on OSC1 is 12MHz
– PTA3 = high
– PTE3 = high
2. If $FFFE & $FFFF is blank (contains $FF):
– External clock on OSC1 is 12MHz
– IRQ = VDD
– PTE3 = high

For the usual USB in-circuit-programming of the  MC908JB16 option 2 is usual so it is necessary that the reset vector be erased (0xFFFF) so that the on-chip ROM monitor is active.

Since you have programmed the chip this will not be the case and ICP is not available.

Please refer to the reference manual:

Section: 9.4.1 Entering Monitor Mode

bye

 

 

0 Kudos
36 Views
jiangA48386
Contributor I

Dear pgo,

Thank you for your support! I have replaced the MCU and plan to test it again in the future (1 If IRQ=VTST: - External clock on OSC1 is 12MHz - PTA3=high - PTE3=high. I have found and tested the Winxp driver for TBDML_JB16. abs. s19&TBDML_JB16-SOIC28 [Minimum]. pdf, which can be downloaded using CW5.1 connection to XD256, and can also be used by WIN7. I am very happy! But it cannot be used on USB3.0 WIN7 and WIN10 systems. I tested the TBDML_. s19 generated by USBDM_JB16_V4_10 and downloaded it to TBDML_JB16_SOIC28 [Minimum]. pdf hardware. In the WIN7 environment, CW displayed the discovery of a bdm device, but CW5.1 indicated that it was not connected to the target board. I think maybe I didn't define the successful bdm signal pin or BDM * * * DLL version mismatch or other issues. I will continue to work hard to test with your support, and I believe I will succeed!

Best regards!

0 Kudos