Hantek6022API icon indicating copy to clipboard operation
Hantek6022API copied to clipboard

Fix FIFO reset sequence

Open jhoenicke opened this issue 7 years ago • 5 comments

This fixes the FIFO reset sequence to ensure that FIFO is cleared when starting a new capture. This should avoid sending 2048 - 4096 bytes from the last capture run.

@zagrodzki: Since you have some test setup, can you check that this is working as expected? For me it works.

jhoenicke avatar Apr 26 '17 10:04 jhoenicke

I'm testing with a 1MHz triangle wave, sampled at 24Msps with a single channel, expecting no sudden changes in value. I'm using a single libusb transfer with 8 iso packet descriptors, each of 3072 bytes.

With multiple attempts, I see in about 80% of the cases a jump after first 4 bytes, and in 80% of the cases a jump after first 4096 bytes.

With 12Msps, the same thing, about 60% of the time. With 4Msps, only on byte 4, 20% of the time.

Hope that helps.

zagrodzki avatar Apr 26 '17 10:04 zagrodzki

actually, let me test it once more, I only merged your particular commit. I'll try again with the .hex from your repo.

zagrodzki avatar Apr 26 '17 10:04 zagrodzki

yup, with your .ihx it's the same, 60% of the time at 12Msps I see an abrupt change after 4kB.

zagrodzki avatar Apr 26 '17 10:04 zagrodzki

FTR, this is how the data from the scope looks like, I'm capturing first 12k samples or so, at 24Msps, the wave is a 125kHz triangle 10Vpp. You can see the two points where there's a sudden shift in values. screenshot - 04262017 - 01 39 38 pm

zagrodzki avatar Apr 26 '17 11:04 zagrodzki

@jhoenicke will you merge this branch? I think a better reset sequence is better than unsubmitted perfect sequence :)

zagrodzki avatar Jul 05 '17 12:07 zagrodzki