Author Topic: Rigol DS10xxZ firmware re-write  (Read 51065 times)

0 Members and 1 Guest are viewing this topic.

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: Rigol DS10xxZ firmware re-write
« Reply #25 on: April 28, 2017, 06:55:02 am »
One might take a look at the DSO quad community firmware (wildcat) which is an OSS app to drive the tiny oscilloscope.
Nice, hadn't noticed it was alive again. Will have to dig mine out again :)
 

Offline azer

  • Regular Contributor
  • *
  • Posts: 70
  • Country: va
Re: Rigol DS10xxZ firmware re-write
« Reply #26 on: April 28, 2017, 12:14:24 pm »
Christer Weinigel did something similar for the OWON SDS7102.
http://blog.weinigel.se/
He got as far as dumping correct ADC data to disk.
It's a different architecture, though some of the techniques to reverse engineer the FPGA-SOC and ADC-FPGA connections could be reused.
http://blog.weinigel.se/2016/05/29/sds7102-fpga-pins.html
http://blog.weinigel.se/2016/07/08/sds7102-capture.html
 
The following users thanked this post: luisprata

Offline bitwelder

  • Frequent Contributor
  • **
  • Posts: 964
  • Country: fi
Re: Rigol DS10xxZ firmware re-write
« Reply #27 on: April 28, 2017, 12:40:38 pm »
I wonder if it would be possible to keep part of the original Rigol code running while it's getting analyzed and block by block replaced with a 'open source' functionally equivalent version of it.
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #28 on: April 28, 2017, 01:32:16 pm »
OK, I am up for it...

Have ordered £350 DS1054Z for the job, since I don't want to risk trashing my £1000 MSO1104Z-S.

To get me started...

1 Does anybody have a link to schematic for input circuitry please?    Dave's reverse engineer video shows part schematic, but maybe there is something better since?
2 Any hints on disassembling code for FPGA (is disassemble even the correct term) and ARM chip?
3 Any other info available that might help me assist with the firmware re-write?
4 Do I/we need to be careful about breaking Intellectual Property or Copyright rules?

Note that I am well aware that this is a totally pointless exercise, so no need for any negativity. Purely a fun thing for an experienced hobbyist to do with too much free time available :)

Any hints or assistance appreciated, and hopefully I can contribute to the bigger project in return.

Seems to me I need to learn:
a) Spartan 6 XC6SLX25 FPGA (the thing with the heatsink).  I know nothing of FPGA - is it hard to learn?
b) ACTEL ProASIC3 ASP030. I know nothing of ASIC - is it hard to learn
c) MCIMX283(DVM4B) freescale ARM 9 - I am familiar with ARM at amateur level - maybe this is where I can add value to this thread?

I have multi-meter with continuity function and I am not afraid to use it :)
I will soon have spare Rigol and I am not afraid to break it :)
« Last Edit: April 28, 2017, 03:03:46 pm by hexreader »
 
The following users thanked this post: bitseeker

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: Rigol DS10xxZ firmware re-write
« Reply #29 on: April 28, 2017, 04:46:30 pm »

1 Does anybody have a link to schematic for input circuitry please?    Dave's reverse engineer video shows part schematic, but maybe there is something better since?


See the link I posted earlier in the thread.
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Rigol DS10xxZ firmware re-write
« Reply #30 on: April 28, 2017, 06:38:55 pm »
Can I make the 1st entry in wish list ?  ;D

Nothing spectacular, use the whole damn screen just for traces only, I mean horizontally, without those annoying both sides buttons bars.

At least not permanently occupying at both sides.

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #31 on: April 28, 2017, 08:50:18 pm »
See the link I posted earlier in the thread.
Thanks Cerebus, I am embarassed that I did not read the earlier thread posts properly  :-[

Not sure the schematics for front end apply to DS1054Z, but the other schematics will probably get me off to a good start.

Thanks,
 

Offline cBaer

  • Contributor
  • Posts: 12
  • Country: de
Re: Rigol DS10xxZ firmware re-write
« Reply #32 on: April 28, 2017, 09:30:26 pm »

Seems to me I need to learn:
a) Spartan 6 XC6SLX25 FPGA (the thing with the heatsink).  I know nothing of FPGA - is it hard to learn?


a: FPGA's are a very different from micro processors. They even need a different type of source code called Hardware Description Language or HDL for short. Verilog and VHDL are the most common. VHDL is more Complicated and more common in europe while Verilog is more simpler and more common in america. Unlike classic programming languages, you are not describing a sequence of Operations. You have to describe a digital circuit instead. (OK, your digital circuit could be a CPU which can then be programmed, but thats off topic). But I have to say the learning curve can be very steep and there are a lot of pitfalls that arent even possible on classic porgramming languages. But dont fear, the internet has a lot to tell you about that.

One word to Xilinx/Spartan 6: Xilinx has a lot of Code Generators and other stuff we can use but there are a lot of nasty bugs in it. There are whole books just dedicated to these bugs. The suite we need is the now discontinued ISE from Xilinx. The newer Xilinx Vivado doesnt support Spartan 6 (I'm pretty sure thats on purpose >:( ). ISE for that FPGA is free, but it phones home for whatever reasons. And i can recommend emacs for VHDL editing. Besides the good templates the ability to edit the same buffer in two or more windows alone is worth it.

I have a different question:
A project like this can produce several thousand lines of code (maybe in the millions) among other countless files and documents. How do we organize this? +we need some versioning like SVN or so.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Rigol DS10xxZ firmware re-write
« Reply #33 on: April 28, 2017, 11:28:16 pm »
FPGAs are absolutely fascinating and amazing devices. I'm not actually sure if knowing how to program microcontrollers makes it easier or harder to get started in FPGAs. The thing that is hardest for most people to grasp is that writing HDL is not writing a program. Instead you are describing the function of a digital circuit using a special language that happens to superficially resemble a computer programming language. Tell yourself that over and over until it sinks in.

The best beginner resource I found was a free pdf book called Free Range VHDL. In the US Verilog is more popular but I found VHDL makes more sense to me. My advice if you read that book is to first read it through cover to cover and don't worry too much about absorbing it all. Then go back and read it again, this time trying the examples as you go along. Existing projects are a great source of information too, I found Grant Searle's Multicomp to be very helpful.
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Rigol DS10xxZ firmware re-write
« Reply #34 on: April 29, 2017, 03:52:56 am »
I have a different question:
A project like this can produce several thousand lines of code (maybe in the millions) among other countless files and documents. How do we organize this? +we need some versioning like SVN or so.

Github
TEA is the way. | TEA Time channel
 
The following users thanked this post: Kilrah

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Rigol DS10xxZ firmware re-write
« Reply #35 on: April 29, 2017, 04:17:29 am »
"microcontrollers makes it easier or harder"

I would say harder because you always think "inside the box", and FPGA is a totally different philosophy, where sequenced thighs must be changed to parallel, Microprocessor is a generic hardware to solve problems with software, FPGA is Pure hardware defined by software tool, but after definition 100% hardware ( except if you define a microprocessor IP )
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #36 on: April 29, 2017, 05:37:45 pm »
Struggling to add photos - but will keep trying...

OK, I give in....

How do I add a dozen photos of MSO1104Z-S daughter card for Sig Gen?

EDIT: found add attachment option, but now get attachment too large.

Don't want to play this game any more :(

Detail shots added, but bigger pictures left out due > 1MB

You will have to use your imagination to guess what the whole board view looks like :(

I guess that the money shot is the second one, except maybe the glue from the sticker makes chip info hard to read

« Last Edit: April 29, 2017, 06:14:43 pm by hexreader »
 

Offline JJalling

  • Supporter
  • ****
  • Posts: 246
  • Country: dk
Re: Rigol DS10xxZ firmware re-write
« Reply #37 on: April 29, 2017, 05:40:11 pm »
Dave has taken some photos of the scope already: https://www.flickr.com/photos/eevblog/albums/72157646442125864

EDIT: Oh sorry, didn't see that you were adding pictures of MSO1104Z-S.

BR Jonas
« Last Edit: April 29, 2017, 05:45:51 pm by JJalling »
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: Rigol DS10xxZ firmware re-write
« Reply #38 on: April 29, 2017, 06:06:25 pm »
There's a "(more attachments)" just below where you posted your first one.
 

Offline cBaer

  • Contributor
  • Posts: 12
  • Country: de
Re: Rigol DS10xxZ firmware re-write
« Reply #39 on: April 29, 2017, 08:21:09 pm »
Is that a altera Cyclone?
How is the Generator board connected?
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28136
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Rigol DS10xxZ firmware re-write
« Reply #40 on: April 29, 2017, 09:03:17 pm »
There's a "(more attachments)" just below where you posted your first one.
Yep, individuals can't be bigger than 1Mb and the total for a post can't be bigger than 2Mb.
For a project like this some need to be hi res and then it's better to add more posts with bigger pics and then all the imagery is on Dave's server where it won't get lost.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline farzadb82

  • Contributor
  • Posts: 12
  • Country: us
Re: Rigol DS10xxZ firmware re-write
« Reply #41 on: April 29, 2017, 09:45:42 pm »
@hexreader, how did you get the lighting such that the chip identifiers are readable?
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #42 on: April 29, 2017, 09:49:42 pm »
Is that a altera Cyclone?
How is the Generator board connected?
Yes, Altera Cyclone.
Board connects to stake pins right hand side of main board next to piezo buzzer, then 2 flying leads for output to 2 BNCs on daughter board. That is what the bigger pictures would have shown if picture limit was 2 meg instead of 1 :(

Quote
how did you get the lighting such that the chip identifiers are readable?
Just used USB microscope with built-in light. Sometimes I need to turn off microscope light and shine a torch side-ways on

By the way...  I notice that the interesting jumpers next to JTAG connector are 0100100 001 for both DS1074Z-S and for MSO1104Z-s.
Dave's pictures for DS1054Z show 0000101 001, while my DS1054Z has 0000100 001

Maybe the second jumper from the left sets the "S" option????
« Last Edit: May 02, 2017, 02:18:08 pm by hexreader »
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #43 on: April 29, 2017, 10:23:06 pm »
With a bit of cropping.... maybe I can post picture of top of signal generator board...

... and most of the bottom of the board, with just a bit lost at lower edge, which luckily has no components on

« Last Edit: April 29, 2017, 10:30:22 pm by hexreader »
 

Offline cBaer

  • Contributor
  • Posts: 12
  • Country: de
Re: Rigol DS10xxZ firmware re-write
« Reply #44 on: April 30, 2017, 12:17:14 am »
hexreader are the BGAs for the Logic analyser populated on your scope?

I looked at daves hi res photos of the PCBs to get an idea of the bootstrapping.
https://www.flickr.com/photos/eevblog/15354530840/in/photostream/

There are
-a 128 MBbyte Flash, i guess it holds the software for the CPU
-a 25x4 SPI Flash, i guess the Spartan 6 boots from that
-a I2C FRAM(MB85RC16), no idea whats that for
-the ACTEL FPGA has build in flash

theres a ic i cant read the part number of, its the "im XSZ ..."

Clocking for the hardware is not that hard i think:
25 MHz -> ADF4360-7 -> ADC -> FPGA -> maybe others.

We need to figure out what clock comes out of the ADF chip.

What questions me is that the Spartan 6 has a maximum Speed in the ballpark of 400MHz (if you use a very very veeeeeeeeerrrryyyyyy quick HDL) but it is specified at 1GSa/s. So how did they implement that?

 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #45 on: April 30, 2017, 01:05:31 am »
hexreader are the BGAs for the Logic analyser populated on your scope?
No doubt they are, but I am not willing to pull all of the buttons off of the scope and undo those tiny ribbon connectors to find out.

When I get cheap DS1054Z delivered, then I am willing to take more chances. If I break my MSO1104Z-s I will be heart-broken and never recover.

Quote
theres a ic i cant read the part number of, its the "im XSZ ..."
MCIMX283(DVM4B) freescale ARM 9 - which I gained by watching Dave's tear-down video
« Last Edit: April 30, 2017, 01:11:41 am by hexreader »
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16560
  • Country: 00
Re: Rigol DS10xxZ firmware re-write
« Reply #46 on: April 30, 2017, 12:23:31 pm »
How did you figure out the video driver?
 

Offline luisprata

  • Regular Contributor
  • *
  • Posts: 58
  • Country: br
Re: Rigol DS10xxZ firmware re-write
« Reply #47 on: April 30, 2017, 01:01:46 pm »
Nice !!!
 

Offline zdun8

  • Newbie
  • Posts: 1
  • Country: pl
Re: Rigol DS10xxZ firmware re-write
« Reply #48 on: May 01, 2017, 08:11:10 pm »
Hello All,

First of all, hello everybody, I'm new to the forum, even though I've watched several of Dave's videos.

I think this is a very cool project, I own this scope and I have the skills to help (IMX and FPGA). Maybe we should arrange a jira to organise work?

Kind regards,
Piotr Zdunek
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Re: Rigol DS10xxZ firmware re-write
« Reply #49 on: May 01, 2017, 09:07:20 pm »
Welcome to the forum, Piotr!
TEA is the way. | TEA Time channel
 
The following users thanked this post: PhiMX


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf