How to read flash from Motorola/NXP mcu - Page 1
Forum section: electronics / beginners

author: frenky
author_rank: Unknown
timestamp: September 06, 2016, 08:00:09 am
content: Guys I really need your help.I really like to fix stuff for friends but this one turned from joy to nightmare really quick.A "friend of a friend" brought me a control panel that regulates two dc motors of some kind of industrial machine...While investigating the circuit I accidental connected 24v and 5v lines.There are two mcu's on the board and before accident leds near mcus were blinking. Now they are not.I have a bunch of different ic programmers at home so my question is:Is there a way to dump flash with code to pc and put in onto a new mcu? (if mcu is still able to access memory)Mcu markings: MC908 KX2CDWE 2L09HData sheet:http://pdf.datasheetz.com/data/Integrated%20Circuits%20(ICs)/Microcontrollers/MC68HC908KX2CP-datasheetz.pdfWhole board:

author: johm
author_rank: Contributor
timestamp: September 06, 2016, 10:41:12 am
content: In case you need a programmer and budget is not a problem:https://elmicro.com/files/softecmicro/indart-one_manual.pdfhttp://www.newark.com/softec-microsystems/indart-one/programmer-debugger-for-hc08-hcs08/dp/85K2275Otherwise you can try this evaluation board:http://www.ebay.com/itm/Beta-Control-HC908KX8-Evaluation-Kit-fur-MC68HC908KX8CP-/221642004290?hash=item339ae49742:g:q2AAAOxyaURTe0wtOr this (your MC68HC908KX8CP is not explicitly specified):https://de.aliexpress.com/item/Free-shipping-MON08-programmer-MC908-68HC08-microcontroller-simulation-read-and-write-Download/32402621593.htmlSeeing the whole board though, this DB9 connector seems to program those MC908 chips. This way, you could place the DIP switches in programming position and use the computer to bit bang its protocol as specified in the PDF document above. I haven't been able to find a free programming software for the KX family except for a demo version of Freescale's CodeWarrior, which includes programming utilities:http://www.nxp.com/products/software-and-tools/software-development-tools/codewarrior-development-tools/codewarrior-development-suites/codewarrior-development-suite-basic:CW-SUITE-BASICI'd like to be more helpful but that was all I could find; AZ series are far more popular than KX, it seems.

author: frenky
author_rank: Unknown
timestamp: September 06, 2016, 11:53:51 am
content: Thank you. You have been very helpful. Sadly budget is non existent...I have been searching an reading a lot too..I have found this diy programmer:https://sourceforge.net/projects/hc08prog/and this one:http://www.physics.mcmaster.ca/tech/HC908/HC908Intro.htm#programmingand this one:http://www.sparetimelabs.com/funwith08/funwith08.phpI have also bought pci-2-serial card to try to connect to the serial port on the board.

author: CJay
author_rank: Super Contributor
timestamp: September 06, 2016, 02:19:56 pm
content: If the chiop is dead you're going to find it rather difficult to read anything from it.Have you checked the obvious things first?Do the chips have power, is that clock oscillator running, do the chips have an external reset line and does it do what you expect it to?While I'm inclined to agree that you've screwed the board up royally, it still makes sense to check the basics and not jump to the most complex solution first.

author: frenky
author_rank: Unknown
timestamp: September 06, 2016, 06:30:51 pm
content: I measured voltages and were fine but didn't check out the oscillator.I've checked it now with a scope and there was nothing on the output.I desoldered it just to be sure that nothing is pulling it down and result is the same.So there still is some hope that mcus did not fry...The oscillator is Epson 9.8304Mhz 5V.Just for test... would it be ok to replace it with 8MHz which I can get localy? Just to see if leds start to blink again.My brains say that lower frequency should be safe but I'd rather ask and look stupid than screw up something again...

author: CJay
author_rank: Super Contributor
timestamp: September 06, 2016, 07:21:24 pm
content: Should be fine with a lower frequency but you may find it won't communicate properly with whatever controls it.I still think the board is probably fried but it won't harm to try another oscillator.

author: amyk
author_rank: Super Contributor
timestamp: September 07, 2016, 10:17:16 am
content: The flash could be read-protected... this MCU is programmed/accessed via an internal ROM which communicates over serial - see chapter 16 of the datasheet. If you can read the ROM you may be able to disassemble it and find the undocumented way in which it locks/unlocks the flash, or power-glitch it to bypass the protection.