sorry, small correction.
3. Is there any way to do the above 2 steps without involving the CPU? ie CPU tells DMA to start shipping to the DAC at 1msps. When all the output waveform points have been shipped to the DAC, the DMA signals the ADC to start sampling, and simultaneously start transferring sampled values?
On getting the data out...
One way to get the data out, would be to use a timer to kick the DMA, for each sample. The same signal could be wired to a counter to count the number of samples, and have the counter interrupt when the number of samples are complete.
- For transferring the Look up table values to a DAC, set up a DMA TD that has source address as SRAM location where, the look up values are stored and the destination address as the VDAC Data Pointer. The TD should have the next TD as Invalid TD, so that the chain terminates. Note that there was an errata on ES2 Silicon, that says that the TD chain will not terminate inspite having INVALID_TD parameter. This issue has been fixed in ES3 . Hence there wont be any kind of Infinite loops. However there are workarounds to make it work on ES2 as well. Let me know if you are using ES2.
- Yes there is enough space. There is 8KB SRAM in PSoC3. Or it is possible to do the sample by sample transfer using the DMA. In this case, the source for the DMA will be the ADC Data registers and the destination will be the UART TX Data Pointer. Note that the DMA rate of transfer can be controlled using the drq terminal. Hence you can use the ADC EOC terminal to trigger the DMA transfer.
- Yes it is possible to do the complete transfer without CPUs involvement. You need to configure the DMA appropriately and provide proper terminations and triggers.
Let us know if you need any help on this.
Picture attached illustrates the same.