while I compute the FFT I cannot gather data DMA does not use the CPU, so the question is
How long does it take to calculate the FFT for your given number of points? When the calculation is as fast as taking the samples, you can get away with double buffering. That is: While calculating the FFT with data from the first buffer, data is DMAed into the second buffer.
Well, Bob, that is an excellent question: "How long does it take to calculate the FFT?" I should put a timer on it. I only assumed that I could not keep up with calculating at a sample rate of 44.1 kHz in two channels. For each channel I collect 4 TDs of 1,984 samples (uint16) each, then generate an interrupt to stop the SAR and Filter and start my calcs. You give me something to think about. Maybe I could generate an interrupt after every TD and work on that array -- and maybe I could keep up and be ready for the next TD. At a 24 MHz clock rate, it seems unlikely I can process that fast. I will add a timer and see. Or, I can do some arithmetic to see how long it takes to calc my FFT theoretically. This will take some time so I apologize if I do not gratify you with my results soon.
Meanwhile, if anyone else has ideas on overlapping FFTs using multiple PSoC 5LPs, let me know. Cypress employees? And, Bob, I wish my German were as fluent as your English. You are valuable to this blog.
@78RPM, I don't see how a single PSoC can handle continuous FFT. If 2 streams were sampled at 44kHz, 1024 points each, that would be 23ms per array, which leaves 11.5ms for FFT processing of each array. Reported times for processing 1024 point array on PSoC are about 20-60ms. This task is for some faster processor, M4 running at 100MHz probably the smallest suitable. There are many low cost boards around starting at $11. IMHO splitting task between processors is not right direction in this case. If results are being observed on a PC, I would send collected data and perform FFT on PC.
odissey1, thank you for the response. You confirmed my hunch. I'm looking at M4 solutions now and comparing dedicated DSP versus microcontrollers. Some new M4 devices offer a combination. I'm re-considering my direction for research.