Author Topic: Rigol MSO1074X with Raspberry Pi Successful Upgrade  (Read 4265 times)

0 Members and 1 Guest are viewing this topic.

Offline taustinTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Rigol MSO1074X with Raspberry Pi Successful Upgrade
« on: January 08, 2017, 03:43:03 am »
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 it
        https://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
        this made it easy to have multiple windows running for the various steps in dumping the image file
  Pin header wires to connect individual male pin to male pin
  sicker backing (just peel a sitcker off its backing and use the backing

The 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 OpenOCD
    Follow directions at adafruit
    https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi?view=all
    you can stop after "make install" step

    Here's a table of the Raspberry Pi GPIO header to JTAG function pins
        Pi Port          Physical Pi Pin #          JTAG
        3.3V             1                                 3.3V
        GND             14                               GND
        GND             20                               GND
        GPIO 7         26                               TRST
        GPIO 9         21                               TDO
        GPIO 10       19                               TDI
        GPIO 11       23                               TCK
        GPIO 18       12                               SRST
        GPIO 25       22                               TMS
                               
Remove the warranty label
    use heat (a hair dryer)
    use sticker backing paper
    lots of patience - expect 10 minutes at this step

Open the scope
    Use T-10 torx driver

Replace the fan for quiet operation
    Optional, but very easy and worth it IMHO
    I 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=1
    Run the screws into the fan BEFORE installing it to thread the holes for easier installation
    Make sure the fan spins before reassembly.


Turn off your Raspberry Pi

Connect JTAG wiring from Raspberry Pi to scope
    Follow pins on Raspberry Pi given above and scope JTAG pins identified in the video
    A wire harness is not necessary - just make good connections and make sure there are no shorts
    DOUBLE CHECK YOUR CONNECTIONS

In this order
   1- Turn on your Raspberry Pi
   2- Turn on the scope
        The scope back-fed the Raspberry Pi power over the 3.3V line and caused me some scare and headaches
        It didn't kill anything, the Raspberry Pi didn't boot up right and I had to turn everything off and start in the right order

On the Raspberry Pi start OpenOCD
    sudo openocd -d1 -f interface/raspberrypi2-native.cfg -f C:\openocd-0.8.0\scripts\target\imx28.cfg
    note this is different than the video because we are using a Raspberry Pi for the JTAG interface

Telnet to OpenOCD port 4444
   halt and dump_image as described in the video
       note - the dump_image parameters are an address and a lengthm bit a start and stop address
            4 with (7) 0's for the address
            3 with (6) F's for the length
   the dump can take anywhere from a few minutes to several hours depending on the JTAG speed
     mine took about 3 hours
     you can check the output file size to see progress
       'ls -l' in the directory where dump file is located
          file should be about ~67MB

Once OpenOCD dump is finished
    turn off the scope
    turn off the pi
    disconnect wiring
    reassemble scope
    make sure warrant label is intact

Getting the keys

Turn on the Raspberry Pi and install and run rigup

Make rigup
    the version is important - use the one in the link below
    make a directory for rigup
        mkdir rigup
        cd rigup
    download rigup source
        http://gotroot.ca/rigol/rigup-0.4.1-mso1000z.zip
    patch make file
        https://www.eevblog.com/forum/testgear/sniffing-the-rigol's-internal-i2c-bus/msg565561/#msg565561
        did not compile right for me until I made this change
    'make clean'
    'make'
    copy rigup to where you have the dump_image file

Run rigup
    run as shown in the video

codes for licenses are here
    https://www.eevblog.com/forum/testgear/sniffing-the-rigol's-internal-i2c-bus/msg565557/#msg565557
    Enter as shown in the video
    I used 0x1C00F which worked on the first try
    All options are now 'Official'

    To get 100Mhz you need to 'or' codes shown in above link
        use license code 0x1C08F
            all 'official options (0x1C00F)
            100Mhz   option   (0x1C080)
            or = 0x1C08F

License codes worked on the first try

I 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!
 
The following users thanked this post: smithnerd

Offline smithnerd

  • Regular Contributor
  • *
  • Posts: 120
  • Country: gb
Re: Rigol MSO1074X with Raspberry Pi Successful Upgrade
« Reply #1 on: January 08, 2017, 03:57:24 am »
Nice clear description of the method.
 

Offline taustinTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Rigol MSO1074X with Raspberry Pi Successful Upgrade
« Reply #2 on: January 09, 2017, 03:31:23 pm »
I was asked for the config files I used with OpenOCD.
  raspberrypi2-native.cfg
  imx28.cfg

The 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.
 

Offline Daruosha

  • Regular Contributor
  • *
  • Posts: 181
  • Country: ir
Re: Rigol MSO1074X with Raspberry Pi Successful Upgrade
« Reply #3 on: January 10, 2017, 07:10:38 am »
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: [Select]
openocd -d2 -f /usr/local/share/openocd/scripts/interface/raspberrypi2-native.cfg -f /usr/local/share/openocd/scripts/target/imx28.cfg
However got an error saying:
Code: [Select]
Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.

by adding adapter_khz 400 at 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.
 

Offline taustinTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Rigol MSO1074X with Raspberry Pi Successful Upgrade
« Reply #4 on: January 10, 2017, 03:03:34 pm »
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.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf