Author Topic: Reverse engineering FNIRSI-5012H  (Read 108280 times)

0 Members and 1 Guest are viewing this topic.

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2149
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Reverse engineering FNIRSI-5012H
« Reply #350 on: October 22, 2020, 07:28:51 am »
I've got openOCD installed and I'm trying to use it, not having a lot of luck because I have no idea what I'm doing. I need to compile the code to some format and run a flash utility on it, right? GCC I guess? I'll figure it out eventually I guess!

IRC still exists, if you go over to the #openocd channel on the freenode network, you'll surely find someone to help you. Or, write to the openocd-users mailing list which is hosted on sourceforge (yes, that also still exists).
Everybody likes gadgets. Until they try to make them.
 

Offline neuralsim

  • Contributor
  • Posts: 36
  • Country: us
Re: Reverse engineering FNIRSI-5012H
« Reply #351 on: October 22, 2020, 05:41:44 pm »
I've got openOCD installed and I'm trying to use it, not having a lot of luck because I have no idea what I'm doing. I need to compile the code to some format and run a flash utility on it, right? GCC I guess? I'll figure it out eventually I guess!

IRC still exists, if you go over to the #openocd channel on the freenode network, you'll surely find someone to help you. Or, write to the openocd-users mailing list which is hosted on sourceforge (yes, that also still exists).

Thanks I'll check it out if I get stuck. I just ran out of time last night, doing lots of stuff, I figure I can probably get it working on my own, forgot that there are binaries already made, that helps. I'll want to change them eventually but if I can get the device flashed in the meantime that would be good.
 

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: ch
Re: Reverse engineering FNIRSI-5012H
« Reply #352 on: October 22, 2020, 05:50:53 pm »
Not sure what you are using... but if you have an ST-Link clone, why not use the ST-Link utility?
https://www.st.com/en/development-tools/stsw-link004.html
Worked for me without problems IIRC.
 

Offline neuralsim

  • Contributor
  • Posts: 36
  • Country: us
Re: Reverse engineering FNIRSI-5012H
« Reply #353 on: October 22, 2020, 10:21:47 pm »
Not sure what you are using... but if you have an ST-Link clone, why not use the ST-Link utility?
https://www.st.com/en/development-tools/stsw-link004.html
Worked for me without problems IIRC.

Thanks for the tip! Yeah that's what I was thinking too. I did load it up last night, but didn't get anywhere with it, but good to know that my intuition was correct. So is that all you needed, software-wise?
 

Offline neuralsim

  • Contributor
  • Posts: 36
  • Country: us
Re: Reverse engineering FNIRSI-5012H
« Reply #354 on: October 23, 2020, 02:01:56 am »
Not sure what you are using... but if you have an ST-Link clone, why not use the ST-Link utility?
https://www.st.com/en/development-tools/stsw-link004.html
Worked for me without problems IIRC.

I'm connected to it and able to flash it and it passes the checksum but I just get a blank screen with the backlight on.

I'm not sure how to flash it, there are two files, I've tried both the bin and hex files. Am I supposed to put them in different memory locations?

Edit: I figured out the bin and hex files hold the same data, and ST-LINK just recognizes both of them, so they both show up in the choose file dlg.

So I'm getting a blank screen, but it seems I can erase it and flash it just fine, and also the backlight is working.

Maybe I damaged the screen during the operation, I tried to be careful but it kinda flopped around some when I had the board off the unit. My electronic debugging skills aren't really great yet, so maybe I can figure it out eventually but it won't be trivial for me to debug the circuitry. I knew I was risking a brick by doing it so I'm not too upset, plus I have a good scope that's pretty portable anyway.
« Last Edit: October 23, 2020, 03:01:12 am by neuralsim »
 

Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #355 on: October 23, 2020, 03:19:46 am »
Display damage is not likely if there are no signs of visible damage.

It is much more likely that there is an issue with soldering. You have checked that there are no shorts between the pins, but you have not really verified that there are no opens/disconnects.

And since you have a working scope, put it to works. The things to check are:
1. Try to hold F2 while power cycling. Does the backlight go away?
2. Check the crystal oscillator pins (Xin/Xout have the clock).
3. Check if ADC lines have activity on them.
4. Check if display lines have activity on them.

My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 

Offline neuralsim

  • Contributor
  • Posts: 36
  • Country: us
Re: Reverse engineering FNIRSI-5012H
« Reply #356 on: October 23, 2020, 06:10:22 am »
Display damage is not likely if there are no signs of visible damage.

It is much more likely that there is an issue with soldering. You have checked that there are no shorts between the pins, but you have not really verified that there are no opens/disconnects.

And since you have a working scope, put it to works. The things to check are:
1. Try to hold F2 while power cycling. Does the backlight go away?

Yes and also ST-LINK recognizes it's in low-power debug mode, and recognizes the chip. I'll check the other items tomorrow, thanks again for this and all your help so far! I figure recognizing debug mode and turning off the display is a pretty good sign the flash is at least partly working?

I did make an attempt to test conductivity by using my multimeter and touching each pin with one lead and the corresponding track with the other lead, but as you said that's not perfect by any means.
 

Offline spadger

  • Contributor
  • Posts: 13
  • Country: cn
Re: Reverse engineering FNIRSI-5012H
« Reply #357 on: November 12, 2020, 08:43:19 am »
Now, there is a new 70$ model from China: ZDYZ DS100.
250MSa/s, 50M analog bandwith.
3.5“IPS 400x320 resolution.
Dual channel analog input and simple signal generator.

 

Offline feihong519

  • Newbie
  • Posts: 3
  • Country: cn
Re: Reverse engineering FNIRSI-5012H
« Reply #358 on: February 03, 2021, 04:01:04 am »
设计思路应该大同小异,都是ADC和MCU超频以达到250M的采样率。
The design ideas should be similar, both ADC and MCU are overclocked to reach a sampling rate of 250M.
 

Offline Abrueda

  • Newbie
  • Posts: 1
  • Country: es
Re: Reverse engineering FNIRSI-5012H
« Reply #359 on: March 18, 2021, 05:06:53 pm »
Ataradev congratulations for your work, and all the people supporting this project.
I bought and changed GD32 in my device and a friend's. Working All perfectly, now I can see UART pulses without triggering in a bad way.
From time to time with normal use I get "TIMER OVERFLOW" error messages (usually changing options with the keyboard), which forces me to restart the device, is it a known behavior?, Or i must check something?

tzenis, great job too with cursor lines and AUTO mode! have you continued with the development? i'll compile and flash the device with your patches.
« Last Edit: March 18, 2021, 05:08:42 pm by Abrueda »
 

Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #360 on: March 18, 2021, 05:09:46 pm »
Timer overflow does happen from time to time. It is a bug, I have no idea why it happens and I don't have enough interest in the unit to debug this.
My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 

Offline tcz

  • Contributor
  • Posts: 21
  • Country: ca
Re: Reverse engineering FNIRSI-5012H
« Reply #361 on: April 14, 2021, 08:23:13 am »
One of the bigger problems of this device is overclocking of everything. MCU is overclocked, ADC is overclocked (presumably, since we don't really know the ADC model).

Just finished skimming this thread and kept reading about the MCU being unstable for some at 250mhz.

Have you guys tried to raise the voltage and apply extra cooling?

I get a lot more out of a Raspberry Pi this way. I know they are not the same but it's the same principle.

You may even be able to get those extra cycles you need to allow the DMA to "keep up".
 

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #362 on: April 14, 2021, 09:08:29 pm »
Interesting topic. Any news?
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #363 on: April 15, 2021, 12:40:52 am »
Not really. I came to a conclusion that the hardware is crap and not really worth spending more time on it. I just bought Owon SDS1102 and it does all I need a simple scope to do, most importantly not having a fan and being totally silent.

Portability aspect is nice, but was not a real factor for me.
My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 
The following users thanked this post: tcz

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #364 on: April 20, 2021, 02:11:15 pm »
I see in the pic there is a small 8 pin eeprom/flash, probably used to store captured images from the scope.
Is it a SPI or i2c device?

I am thinking about an hack to use it to extract snapshot.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #365 on: April 20, 2021, 02:13:09 pm »
I agree with you, just ... the Owon SDS1102 is listed at 250 euro, so it's also 5x more expensive than FNIRSI-5012H  ;D
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #366 on: April 20, 2021, 06:00:38 pm »
The first page lists all the part numbers. It is SPI flash W25Q64JV.

But Owon is actually a useful tool. This one is not. The price does not matter here, if functionality is not there.
My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #367 on: April 20, 2021, 07:29:15 pm »
The price does not matter here, if functionality is not there.

If the price does not matter, why not a Fluke (2500 Euro).

If the price does matter, I already have my MSO! I am looking for a low cost digital oscilloscope for things in the bandwidth of 2Mhz, so things for which I don't need to carry my professional (and much more expensive, ~1800 Euro) MSO with me!

Anyway, why do you say, after a long topic, the hardware is crappy? What's wrong now?

The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #368 on: April 20, 2021, 07:58:15 pm »
Everything is overclocked, so does not work reliably in some cases. Analog front-end is a joke, and has strange offsets and gain issues that. I make an attempt to calibrate them out in the firmware, but the result is not perfect.

The stock firmware is just crap. Typical for this kind of product - UI that is unintuitive and frustrating to use. My firmware makes an attempt at a better UI, and generally it is functional, but would need more work.

If you need a unit that just works, then I personally would pass on this one. But if you are ok with it being a project, then it is more of less fine.
My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 
The following users thanked this post: DiTBho

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #369 on: April 20, 2021, 09:27:12 pm »
Ok, just the last thing, umm, I see there are three models
- 5Mhz
- 30Mhz
- 100Mhz

They look the same hardware, with different firmware, and in this case the last two are an overclocked "equivalent time" version of the first.

I am not sure, but I was considering the first one, the 5Mhz version.

Have you tried to not overclock your firmware? Is it still so bad?

p.s.
I also considered a couple of "USB-DSO" supported by Sigrok
- Rocktech BM102
- Hantek 6022BL (this also has 8chs LA)
But they seem problematic with "PulseView"
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 


Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #371 on: April 20, 2021, 10:21:46 pm »
All those models are fundamentally different.  The only thing covered by this topic is FNIRSI-5012H, or equivalent rebranded devices, typically with "5012" somewhere in the name.

20 MSPS is pretty crap for 5 MHz bandwidth.

No, I have not tried to overclock. It would require dramatic redesign, since all the timings and hand-coded routines are all designed around fixed timings.

Overclocking works fine if it works on your device. All my units function fine, but I've seen reports from people having stability issues.

And its sampling rate is already pretty poor, slowing it down further turns it into a complete toy.
« Last Edit: April 20, 2021, 10:26:33 pm by ataradov »
My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #372 on: April 20, 2021, 11:05:20 pm »
20 MSPS is pretty crap for 5 MHz bandwidth.

Talking about periodic signals, to create a waveform accurately, the DSO must gather a sufficient number of samples after the initial trigger. In theory a digital scope needs at least 2 samples per period, one full cycle of a regular waveform, to faithfully reproduce a sine wave; otherwise the acquired waveform will be a distorted representation of the input signal. In practice, using Sin(x)/x interpolation in a DSO needs at least 2.5 samples per period.

Assuming the firmware is not silly and really uses Sin(x)/x interpolation

Real time bandwidth = sample rate / 2.5

Therefore, 20M / 2.5 = 8Mhz, which is not too bad!
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 3772
  • Country: gb
Re: Reverse engineering FNIRSI-5012H
« Reply #373 on: April 20, 2021, 11:10:12 pm »
I am more afraid about the abuse of Equivalent-Time-Sampling in other DSOs.
I know, if I want "true" Real-Time I have to pay for it, that's why I bought a professional MSO.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline ataradovTopic starter

  • Super Contributor
  • ***
  • Posts: 11219
  • Country: us
    • Personal site
Re: Reverse engineering FNIRSI-5012H
« Reply #374 on: April 20, 2021, 11:12:28 pm »
Are you going to look at sine waves only? Then yes, sure. But if you are going to look at more complex signals, then you still will be be seeing sine waves only. Also those things don't have computational resources to do sinc(). They just show sampled points as is, with linear interpolation. The stock firmware on 5012H does some weird averaging when you zoom in too closely.
My RSS reader is blocked by the forum, so I won't be actively reading it. If you need to reach me, use email.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf