-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with first x samples #41
Comments
I never found out, how to clear the fifo and start/stop sampling cleanly. The fifo is 4 * 1kB for isochronous transfer and 4*512 byte for bulk transfer. So maybe the easiest way is to just ignore the first 4 kB. |
Since I'm using mod_fw_01 firmware I guess only the 4x512 bytes are of interest. Is this problem taken care of in your custom driver implementation? |
I added the fixfiforeset, when I saw in the reference manual, that the bytes written to the fiforeset register didn't conform the spec. I'm not sure if it fixes anything. The chip uses quad-buffering and it really helps to get transfers more reliable, as USB interrupt transfers and frame borders can delay bulk transfers. With isochronous you also need quad-buffering, since three buffers are send per frame. I think the samples you see are from the previous run, but if you want you can try to check it. Do you have different signal generators to check? I never bothered to fix this problem, since I only used it for long-term recording and analysis and then I just ignored the first few wrong samples. So it is not fixed in the custom driver. |
I finally found out how to empty the FIFO: Is it possible for you to use the custom firmware? It would be possible but not so easy to mod the original firmware to do the same (not so easy, because the new code is a bit larger and one cannot just patch the function in place). There are still seven wrong samples at the beginning. I'm not sure where they come from, but it seems to be in the analog circuit or the ADC. |
Sounds great. Unless somebody else volunteers I will give it a try, but based on my current schedule I can't promise any deadlines. |
As long as OpenHantek doesn't use the eeprom feature (command A2), it should run with the custom firmware. The original driver uses the eeprom to store calibration information but the format is undocumented. |
FWIW, I've documented the reverse-engineered calibration protocol here: |
In openhantek I now have a stable SW trigger implementation. openhantek provides your latest mod_fw_01.ihex
Unfortunately I see some instability in the first samples in the received dataset. My guess is that it somehow relates to samples from previous run and that the problem relates to the driver. (circular buffer with left overs or something)
Unfortunately I have been able to test it only with the test square wave from the device it self. A triangle or sinus signal would maybe give some more
I can't tell exactly how many samples are fluctuating, but with a samplerate of 1M/s and timebase of 500us I can position my trigger at pos 22% (= 1.1ms) and get a fully stable image to the right of the trigger.
Two screenshots provided.
The text was updated successfully, but these errors were encountered: