16-bit ADC Data Buffering Using DMA example, using a larger array issues | Cypress Semiconductor
16-bit ADC Data Buffering Using DMA example, using a larger array issues
I am using the CY8CKIT-001 PSoC-5 demo board and have been able to get the 16-bit ADC example to work in "diff" mode, and then send the data out using the USBUART example. I use the original switch routine to start the conversion, then I turn on an LED showing the the DMA is done, then use another switch to dump the data out the USBUART portion.....BUT.... when I try to setup my array to bigger than 2,000 and do an ADC sample, I end up with a bunch of 0's in the reset of the array. Example, if I wanted to make my array 20,000 samples, only about the first 2000 samples are actual data, while the rest are all 0's. (it varies from acquire to acquire)
the uint16 should be 0 -- 65535 values so that should be ok. The code is exactly as the original Cypress example. I have just changed the NO_OF_SAMPLES to a larger number.
#define NO_OF_SAMPLES 2000
The array of 2,000 works fine, along with a sample rate of upto 100,000Sps. Verified with sig-gen and Excel. I don't understand why changing the array won't work. Even changing it to 3,000 samples doesn't work. Why / Where is the array/DMA transfer limitation?