Rigol MSO1074X with Raspberry Pi Successful Upgrade - Page 1
Forum section: electronics / testgear

author: taustin
author_rank: Contributor
timestamp: January 08, 2017, 03:43:03 am
content: I recently purchased a new Rigol MSO1074Z scope and wanted to upgrade it as described in the forums and elsewhere on the net.What a journey! But met with sweet success in the end.There are lots of excellent resources out there and they helped me along the path.I would like to share my journey so that others might also benefit.Forgive the roughness of this post - it's rough or not at all.I will try to link and give credit where credit is due, but please forgive me if I miss something and feel free to denote missed references and credit.I have a brand new MSO1074Z - just purchased from Saelig. Get a discount by posting in these forums and then asking as an EEVBlog member.I used a Raspberry Pi 3 as my JTAG interface.Supplies:Rigol MSO1074Z (other scopes may work as well)Raspberry Pi 3 (with SD card and raspbian)I used Putty to SSH into the Raspberry Pi to run ithttps://the.earth.li/~sgtatham/putty/latest/x86/putty.exethis made it easy to have multiple windows running for the various steps in dumping the image filePin header wires to connect individual male pin to male pinsicker backing (just peel a sitcker off its backing and use the backingThe directions here are mostly based on this video:There are some slight differences and clarifications to make it all work.So watch the video (YouTube's 2x speed feature is very handy) and read this post several times so you understand what you are attempting to do.Setup Raspberry Pi as JTAG using OpenOCDFollow directions at adafruithttps://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi?view=allyou can stop after "make install" stepHere's a table of the Raspberry Pi GPIO header to JTAG function pinsPi Port Physical Pi Pin # JTAG3.3V 1 3.3VGND 14 GNDGND 20 GNDGPIO 7 26 TRSTGPIO 9 21 TDOGPIO 10 19 TDIGPIO 11 23 TCKGPIO 18 12 SRSTGPIO 25 22 TMSRemove the warranty labeluse heat (a hair dryer)use sticker backing paperlots of patience - expect 10 minutes at this stepOpen the scopeUse T-10 torx driverReplace the fan for quiet operationOptional, but very easy and worth it IMHOI used this fan - it even had the right size connector, though I had to swap the red and black wires.https://www.amazon.com/gp/product/B00261ABFK/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1Run the screws into the fan BEFORE installing it to thread the holes for easier installationMake sure the fan spins before reassembly.Turn off your Raspberry PiConnect JTAG wiring from Raspberry Pi to scopeFollow pins on Raspberry Pi given above and scope JTAG pins identified in the videoA wire harness is not necessary - just make good connections and make sure there are no shortsDOUBLE CHECK YOUR CONNECTIONSIn this order1- Turn on your Raspberry Pi2- Turn on the scopeThe scope back-fed the Raspberry Pi power over the 3.3V line and caused me some scare and headachesIt didn't kill anything, the Raspberry Pi didn't boot up right and I had to turn everything off and start in the right orderOn the Raspberry Pi start OpenOCDsudo openocd -d1 -f interface/raspberrypi2-native.cfg -f C:\openocd-0.8.0\scripts\target\imx28.cfgnote this is different than the video because we are using a Raspberry Pi for the JTAG interfaceTelnet to OpenOCD port 4444halt and dump_image as described in the videonote - the dump_image parameters are an address and a lengthm bit a start and stop address4 with (7) 0's for the address3 with (6) F's for the lengththe dump can take anywhere from a few minutes to several hours depending on the JTAG speedmine took about 3 hoursyou can check the output file size to see progress'ls -l' in the directory where dump file is locatedfile should be about ~67MBOnce OpenOCD dump is finishedturn off the scopeturn off the pidisconnect wiringreassemble scopemake sure warrant label is intactGetting the keysTurn on the Raspberry Pi and install and run rigupMake rigupthe version is important - use the one in the link belowmake a directory for rigupmkdir rigupcd rigupdownload rigup sourcehttp://gotroot.ca/rigol/rigup-0.4.1-mso1000z.zippatch make filehttps://www.eevblog.com/forum/testgear/sniffing-the-rigol's-internal-i2c-bus/msg565561/#msg565561did not compile right for me until I made this change'make clean''make'copy rigup to where you have the dump_image fileRun riguprun as shown in the videocodes for licenses are herehttps://www.eevblog.com/forum/testgear/sniffing-the-rigol's-internal-i2c-bus/msg565557/#msg565557Enter as shown in the videoI used 0x1C00F which worked on the first tryAll options are now 'Official'To get 100Mhz you need to 'or' codes shown in above linkuse license code 0x1C08Fall 'official options (0x1C00F)100Mhz option (0x1C080)or = 0x1C08FLicense codes worked on the first tryI now have a MSO1104Z with all options 'Official' (as shown in the system information screen)Now the disclaimers:While this is not very difficult, there is real risk in bricking your scope. Things are robust and my scope survived my missteps and mistakes - nothing says yours will do the same. Do this at your own risk - as with all info posted in the forums, we take no responsibility if your scope becomes a big fancy paperweight.May my experience help others who want to make a similar adventure!

author: smithnerd
author_rank: Regular Contributor
timestamp: January 08, 2017, 03:57:24 am
content: Nice clear description of the method.

author: taustin
author_rank: Contributor
timestamp: January 09, 2017, 03:31:23 pm
content: I was asked for the config files I used with OpenOCD.raspberrypi2-native.cfgimx28.cfgThe files were the stock ones provided when I downloaded and compiled OpenOCD following the adafruit instructions I linked to.I did review raspberrypi2-native.cfg to verify the JTAG pins were what I thought they were since I was risking bricking my new scope.No special configuration or changes required.

author: Daruosha
author_rank: Regular Contributor
timestamp: January 10, 2017, 07:10:38 am
content: Just wanted to add my contribution to the community.Earlier on i tried the very same method and use the following command to establish the connection:Code:openocd -d2 -f /usr/local/share/openocd/scripts/interface/raspberrypi2-native.cfg -f /usr/local/share/openocd/scripts/target/imx28.cfgHowever got an error saying:Code:Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.by addingadapter_khz 400at the bottom of raspberrypi2-native.cfg my problem's been fix.of course it was way easy to figure out, but if you're new to linux stuff or not familiar enough with OpenOCD, it could waste a couple of hours of your time.Hope it helps.

author: taustin
author_rank: Contributor
timestamp: January 10, 2017, 03:03:34 pm
content: Interesting - I had no such problem.The one difference is that I used -d1 instead of -d2.I wonder if the debug level caused it to throw the error instead of using a default.I also used the most recent OpenOCD downloaded last week. I do not know if the 'adapter_khz' was in my raspberrypi2-native.cfg as I only looked at the I/O pin configuration and not really anything else.Thanks for sharing - definitely could help save a couple of hours of time for some folk.