pecostm32 / FNIRSI_1013D_Firmware

New firmware for the FNIRSI-1013D osciloscope.
GNU General Public License v3.0
117 stars 21 forks source link

does this work for ad1013d-ii #2

Closed notsolowki closed 2 years ago

notsolowki commented 2 years ago

Does this firmware support the newer model ad1013d ii?

pecostm32 commented 2 years ago

I could not find something about a model ad1013d ii, but I found listings of ADS1013D II which look like the same as the one I used to develop the firmware on, so I guess it should work

notsolowki commented 2 years ago

ii = 2. Roman numeric. ADS1013D ii means ADS1013D 2. Sorry aparently somehow I was missing the "S".

I cant tell what version of the firmware is the latest, you have a version "fnirsi_1013d_v0.005.bin.txt" on eevblog but here no mention of numbers, also there are 2 bin files in this repository, who knows which one to use? Whats the difference?

pecostm32 commented 2 years ago

I think that the only difference between the two versions is the case were the first version has the BNC connectors sticking out and the second version has them recessed.

The file to use is fnirsi_1013d.bin The other one is for loading via FEL to test the code. This can be seen in the file How_to_load_scope.txt

On EEVblog I added the version number and the .txt extension to allow for uploading on the blog and to differentiate it from previous uploads in other posts.

notsolowki commented 2 years ago

First i would like to thank you for your work. Next i would like to know,

Could the usb port be used to transfer data struct from the scope to a esp/arduino/pc? or is it strictly limited by hardware as U disk?

Should i move this to a new issue?

pecostm32 commented 2 years ago

The USB port is able to work in both host and device mode. It all depends on software. In the new firmware it is made to act as a Mass Storage Class device. By adding code it should be possible to implement a communication class device to allow access from an other device.

In this repository there is code to make it work like a CH340 device: https://github.com/pecostm32/FNIRSI-1013D-1014D-Hack/tree/main/Test%20code/f1c100s_ch340

I have not tried using it as a host. This is more difficult and there are not a lot of examples around on how to do it.

notsolowki commented 2 years ago

This is interesting I will have to look into this. Thanks for the info.

I notice people claiming these are only 20-30 mhz. Now I'm intermediate with electronics so I may be unfamiliar with some variables when using a scope. However.. when I use my signal generator to generate a freq, I have no problem reading 60mhz sine wave with this scope. I can start at 0mhz and sweep to 60mhz no problem. My generator only goes up to 60mhz, but it worked when auto/manual setting time divisions. I had no sporadic readings.

I had the probe and original firmware set to 10x. Just reporting this. Maybe people have their probes set wrong? Am I missing something?

One feature that would be really neat for this device is serial uart/rs232/i2c decode.

notsolowki commented 2 years ago

I just saw your request for flash dump on eevblog but i dont have an acc,

FNIRSI_1013D_full__backup.zip

this is from the newest "ii" or ads1013d-ii unit

when i copied from usb on ubuntu for some reason they were 0 bytes, on windows they have a file size >0. probably something on my end, im using virtual machine..

i have done the firmware backup and the sdcard backup. then i copied the firmware.bin file to the sdcard with "dd" . but i dont think its being loaded? i cant seem to find the instructions for installing the bootloader. do i need to install a bootloader?

pecostm32 commented 2 years ago

Having looked in depth at both the hardware and the software I can say with confidence that the bandwidth is below the 30MHz many have found. A simple way to test it is to put a 1MHz sine wave of 5V on the input and check that it shows the 5V on the scope. Then start going up in frequency. At some point the measured voltage will go down. When it is about 3.5V you reached the -3db point. This is at the frequency that is the bandwidth.

Further more the scope software will calculate its own sine wave when the input frequency is above ~43.5MHz, so any signal that you put into the scope that has a frequency higher than this will be shown as a perfect sine.

Protocol decoding is not easy and it lacks sample memory to do it on the MCU, so new FPGA programming is needed for that. Not something that is done quickly. Also it is not possible to change the FPGA programming from the MCU. This makes it more difficult.

pecostm32 commented 2 years ago

If you have used my firmware backup program loaded onto the SD card, then the new firmware should start also when loaded properly. Did you make sure to unmount the partition before the "dd" command? Not the device but the partition! This means /dev/sdx1 instead of /dev/sdx, where x stands for the letter your device is connected to.

The file fnirsi_1013d.bin contains all that is needed. Bootloader, splash screen and firmware.

The new firmware has an additional menu option in the top bar and it also shows the version below the battery symbol.

And thanks for the uploading of the hopefully latest firmware.

notsolowki commented 2 years ago

This makes sense then, the voltage was wrong and everything like you said. thanks for clarifying that.

No problem, If you want to me to test anything just let me know..

I ran command sudo dd if=fnirsi_1013d.bin of=/dev/sdb1 bs=1024 seek=8 instead of command sudo dd if=fnirsi_1013d.bin of=/dev/sdb bs=1024 seek=8

Now its working. But looks like battery voltage is reading V0.005. I like the splash screen a lot better. Thankyou for removing those chinese letters.

pecostm32 commented 2 years ago

What do you mean with battery voltage is reading V0.005? The text should be below the battery charge level indicator and is the version of the firmware, which is the latest one.

You can find screen captures in the EEVblog thread that show the new screen: https://www.eevblog.com/forum/testgear/fnirsi-1013d-100mhz-tablet-oscilloscope/msg4020289/#msg4020289 This one shows version V0.003, but V0.005 is not that different

notsolowki commented 2 years ago

LOL! oops. my mistake.

Im trying to open FFT from CH1/2 but it does not appear to open?

pecostm32 commented 2 years ago

The FFT is not implemented. After about a year of working on this thing I decided it was time to move on. Read the last couple of pages on the EEVblog and see what the remaining issues are.

pecostm32 commented 2 years ago

By the looks of it the FLASH of your scope is a slower one. Can you make another backup of your scope with the backup program from here: https://github.com/pecostm32/FNIRSI-1013D-1014D-Hack/tree/main/Test%20code/fnirsi_1013d_firmware_backup/Binaries

I lowered the SPI clock a while back but did not upload the binary to EEVblog or the repository.

Comparing the backup you uploaded with one from an other new scope shows some fallen bits:-(

notsolowki commented 2 years ago

I sure can, but just to be sure, do you intended for me to use fnirsi_1013d_firmware_backup.bin or fnirsi_1013d_fwb.bin?

pecostm32 commented 2 years ago

The file fnirsi_1013d_fwb.bin is the one to use. The other one is for direct loading to memory with FEL. There for testing purposes only.

notsolowki commented 2 years ago

Here is with fwb.bin FNIRSI_1013D_full_backup_2.zip

pecostm32 commented 2 years ago

Thanks. I can see that there are a lot of differences in the binary code. Might investigate this further with Ghidra. Have learned some new tricks on it I would like to test.

notsolowki commented 2 years ago

sounds like fun to me. i have limited knowledge but i'm willing to test whatever you want.

pecostm32 commented 2 years ago

The testing is not something for the scope. I'm learning more about the usage of Ghidra, which is a disassembler with lots of features. When I started on the reverse engineering of the scope it was all new to me. People on EEVblog have been helpful in giving pointers on how to use this tool, but it can do so much more.

You can read about the whole journey on the blog. It is around page 20 that my involvement starts and now we are on page 57:-)

If you are into embedded software it can be very interesting.

notsolowki commented 2 years ago

I am into it but not at a level that you are.

I put a switch on the 5v rail for the sdcard, if i disconnect 5v until oem logo and then reconnect 5v during oem logo, it boots into factory firmware, if i just leave 5v connect it boots into your firmware. I put the switch right next to the power button

pecostm32 commented 2 years ago

Nice hack. Indeed an easy way to switch between the two. Maybe an idea to make an account on EEVblog (It is free) and post this hack with some pictures in the 1013D thread