AnsweredAssumed Answered

Can this "rare" chinese made USBDM forced to accept the OSBDM firmware?

Question asked by on Jun 19, 2020
Latest reply on Jul 1, 2020 by

Hello people.


I have a chinese made USBDM which I got quite cheap from some widely known chinese imports site. I live in Spain, Europe.


This USBDM's hardware includes actually a 6-pin (2x3) header in the line of the original OSBDM schematics header which allows ICP via ribbon cable. Normally this header allows e.g. to reprogram-resurrect an incorrect or corrupted firmware in the MC9S08JM60CLD uC that populates the PCB. This requires another compatible device which acts as a reprogrammer to the USBDM. For example, I could use an Universal Multilink USB from P&E (which holds an MC9S12UF32 iirk) to resurrect the USBDM in case the firmware got "stuck".


Well my original project was to recompile the available USBDM source to make it enumerate as the original OSBDM's VID, PID and also the endpoints specifics and all that. This was not a very hard work and I think I got all the tidbits in the code adapted for that. Recompilation went good. For flashing this "version " into my USBDM I had to touch up a bit some checkings inside the FirmwareChanger utility source code (from USBDM project also). It all went OK so the device eventually "gulped" the adapted firmware, OSBDM-fake if you wish.


DISCLAIMER: Now I wish to mention this experiment is without any commercial use intended, just for the sake of understanding the USBDM internals, well the 08SJM60 line concretely, and also to be able to get the USBDM recognized as OSBDM in order to program and make full use of HC(S)08 utilities and available software. So please avoid me the criticism of trying to "fake" the USBDM into an OSBDM. The schematics are open out there, the documentation is very good and available for anyone trying to get into depths with firmware, flashing, even building your own OSBDM compatible design. OSBDM is open source remember, as the acronym implies; the only bit that is NOT open source are some libraries and parts of P&E (or NXP, or whatever third party) implementations.


To sum up, somehow the adapted USBDM is not enumerating now. In some previous iteration of this experiment I actually made it to offer up the VID/PID I intented to the host (those of OSBDM), so I was able to get another pass in the modified FirmwareChanger for it to get back the correct, working, USBDM firmware 4.12.


Problem is, now that I need to properly blank/ reset the USBDM as if it came from factory "brand new", e.g. to restore its original firmware, the only means I have is a P&E USB Multilink CF (announced as CF v2,3,4). This is NOT to be confounded with the USB Multilink / Multilink Universal, BUT the thing is, the firmware eraser/ recover utility from P&E only allows the Universal (general) to do the kind of subsidary reprogramming to the JM60 in the USBDM as I mentioned before.


How can I:

a) Go into using or adapting the P&E ML Coldfire to the Firmware Recover utiity from P&E?  Actually my P&E ML CF has 6 plated pins which corespond (save numbering) to the very same signals in the USBDM 6-pin header, so in principle I could solder some wires (BKGD, nRESET, VCC and GND to 4 of those and derive them to a 6-pin header properly set up in the other end, plugged into the USBDM). But the aforementioned utiity expects a ML Universal, what can I do?

b) In the event that a) deems impossible, then I guess I'd have to resort to NXP's documentation and OSBDM's too, and try to program my own utility making use of the cable adapter in a)

c) Am I correct in supposing that I can turn the USBDM into enumerating as a OSBDM to the host? I guess so, because it has all the (kinda) like hardware tidbits that the OSBDM, at least in what regards the main chip (JM60) and the 6-pin header and all that, I already checked this.


Since it looks as if Peter O'Dogherty (pgo) is a bit missing from USBDM's forums (like 1-2 years ago last post of his), I need the assistance of any member of this forum which could contribute to my problem with some insight. Of course if Peter himself or any other project responsible person wish to comment, I'd be grateful!


Kind regards and thank you in advance!