Hantek MSO bricked/ arm openocd help - Page 1
Forum section: electronics / testgear

author: deisenberg
author_rank: Contributor
timestamp: March 19, 2020, 09:12:10 pm
content: Hi Everyone,I did a silly thing and bricked my Hantek MSO5102d.I have tried to upload a new firmware via jtag I have an olimex arm-usb-ocd-hI can connect, via the NAND and even uploaded a u-boot.bin file.Nothing comes up on the serial port after rebooting.Searching the forms and google I found a way to create a complete firmware file and upload with out any results.I've tried to write a character to the uart port via mww port address 0x55 and nothing comes up.Is there a way to tell if I fried the Samsung soc? it's a s3c2440.I am a newbie with open arm jtag and could be just doing things wrong.Thanks.Here is what I did for background information.Opened it and added a UART to USB port - worked fine.Hacked it to 200MHz worked fine - should have stopped here.I tried to do a firmware upgrade and didn't pay attention that this unit only supports 2.0 versionNAND was out of space and could not load init because of a missing file.I screwed up at the u-boot menu and uploaded my back up to uboot location instead of the proper location.That was it for the scope.

author: tmbinc
author_rank: Frequent Contributor
timestamp: March 19, 2020, 09:36:41 pm
content: No idea about this particular device, but:- "write character to UART". Did you a.) configure pinmux, b.) potentially configured/enabled a clock for that UART, c.) setup the baudrate/8n1 and THEN wrote a character?- raw NAND flash is always difficult to get right. Do you have a backup with metadata (the extra bytes per sector for ECC), and can you flash that? Do you have a backup from YOUR chip? Every NAND chip has different defective sectors. Flashing raw NAND is a mess. Best would be if you could somehow load u-boot into memory, execute it, and then use existing flash software that is known to work on this particular model.

author: tv84
author_rank: Super Contributor
timestamp: March 19, 2020, 10:17:56 pm
content: If you damaged the bootloader, then it's time for the soldering iron. You should try to regain control by uboot, if you have a bootloader copy.

author: deisenberg
author_rank: Contributor
timestamp: March 20, 2020, 12:14:04 am
content: Quote from: tmbinc on March 19, 2020, 09:36:41 pmNothing. I did none of that. I didn't back up before messing with it as I didn't have a jtag adapter at the time. Honeslty I didn't think I would have done a bone head move like I did.I will see if I can figure out how to set the uart properly. Didn't know I needed to do all of that first.

author: deisenberg
author_rank: Contributor
timestamp: March 20, 2020, 12:15:07 am
content: Quote from: tv84 on March 19, 2020, 10:17:56 pmWhy do I need the soldering iron? I don't have the bootloader :/

author: tmbinc
author_rank: Frequent Contributor
timestamp: March 20, 2020, 11:32:46 pm
content: So, how much did you erase? Just the bootloader?Restoring the bootloader may be a bit easier than restoring the rest, because the first few sectors of NAND flash are guaranteed to be ok. Does anyone have a backup of the bootloader? I looked at the firmware upgrade but it doesn't include it.

author: deisenberg
author_rank: Contributor
timestamp: March 21, 2020, 03:10:32 pm
content: All of it, I followed instructions on another page which instructed to nand erase 0.I am very much a newbie in regards to jtag flashing and starting up a cpu with openocd past getting access to nand and flashing it. I can't get anything to show up via the serial out put. I hope I didn't fry something else.Could anyone help me with just getting something to show on the serial console via openocd, address for uart 0 is 0x50000028 from the datasheet I can set it to 21 for 115200 baudrate. Again I have some learning to do and any help with be greatly appreciated.

author: Fungus
author_rank: Super Contributor
timestamp: March 21, 2020, 04:40:40 pm
content: First rule of messing around with JTAG: Make a backup copy before modifying anything.

author: morris6
author_rank: Regular Contributor
timestamp: March 22, 2020, 09:15:37 am
content: Maybe this can help:Some years ago, around january 2013, there was a project to extend DSO5102B series to MSO functionality. The project documentation and downloads are still available:http://www.mikrocontroller.net/articles/Tekway_MSO, german, but also english version. IIRC also the bootloader was replaced as part of the upgrade procedure. The procedure is pretty well described. At the time I used a simple LPT to JTAG cable and some software(can't remember what it was, ran on XP) to install the new bootloader.

author: tmbinc
author_rank: Frequent Contributor
timestamp: March 23, 2020, 03:13:52 pm
content: Thanks - seems to be great find! Most importantly, there's a backup image linked at the very bottom ("mso_ready.zip") that has a flash image with bootloader.Google translate should do a reasonable job, if not we can help translating something.

author: deisenberg
author_rank: Contributor
timestamp: March 23, 2020, 05:26:15 pm
content: I tried it. Nothing coming up on the serial console.