I am sampling DIO 7 from wavegen GUI. The mode is record without triggers. Sampling rate is 4MHz.
I am using 16x16k buffers. The results are perfect. No corrupt samples (see picture below).
When I am using sample code digitalin_record.cpp as base and sampling above 2MHz the result is a lot of corrupt samples.
See attached C file digitalin_record.c.
My OS is win10 and the compiler is gcc. Output from digitalin_record.exe:
$ ./digitalin_record.exe
Open automatically the first available device
Starting record...
receivedSamples: 93743 discardedCorruptSamples: 83844
sample:0 pinstate:0x01b9
sample:1 pinstate:0x01b9
sample:2 pinstate:0x01b9
sample:3 pinstate:0x01b9
sample:4 pinstate:0x01b9
sample:5 pinstate:0x01b9
sample:6 pinstate:0x01b9
sample:7 pinstate:0x01b9
sample:8 pinstate:0x01b9
sample:9 pinstate:0x01b9
sample:10 pinstate:0x01b9
Question
Tood
Hi,
I am sampling DIO 7 from wavegen GUI. The mode is record without triggers. Sampling rate is 4MHz.
I am using 16x16k buffers. The results are perfect. No corrupt samples (see picture below).
When I am using sample code digitalin_record.cpp as base and sampling above 2MHz the result is a lot of corrupt samples.
See attached C file digitalin_record.c.
My OS is win10 and the compiler is gcc. Output from digitalin_record.exe:
$ ./digitalin_record.exe
Open automatically the first available device
Starting record...
receivedSamples: 93743 discardedCorruptSamples: 83844
sample:0 pinstate:0x01b9
sample:1 pinstate:0x01b9
sample:2 pinstate:0x01b9
sample:3 pinstate:0x01b9
sample:4 pinstate:0x01b9
sample:5 pinstate:0x01b9
sample:6 pinstate:0x01b9
sample:7 pinstate:0x01b9
sample:8 pinstate:0x01b9
sample:9 pinstate:0x01b9
sample:10 pinstate:0x01b9
What is wrong with my implementation?
Best Regards,
Tood
digitalin_record.c
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now