This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi,
I have made a code in the CC3200 that samples every 10ms (TIMER0) Channel 1 of the ADC and saves the sample in a buffer. Every 100 samples, that is to say every second, are sent by UDP to a server. But I am having lags of 10ms every 800 seconds.
I'm afraid the processor is not having time to process all of this, so I want to optimize the process. I have read about ADC-UDMA and would like to know how I could configure my ADC-DMA to do the collection by itself of the 100 samples (one every 10ms) and with an Interruption it will notify me to be able to send them through UDP.
Thank you.
hi Julio,
Please refer to the CC3200 TRM (https://www.ti.com/lit/pdf/swru367) for details on the ADC.
You can also refer to the following thread regarding enabling the DMA.
https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/408687
br,
Kobi
Hi,
As I have seen in the manual, the ADC sampling frequency is fixed at 62.5Ksps.
A. This would mean that to save a whole second you would need a 62500 * 2B = 125KB memory buffer for each channel. Is that correct?
B: In the Siddaram example a 640 buffer is used, will the DMA Interrupt occur every 10.24ms (16us * 640)?
C. Is there a way to configure the ADC to sample every 10ms and buffer all 100 samples through the DMA?
Thanks a lot.
A/B. I believe you calculations are correct.
C. I'm not sure (check the TRM), but you can try to increase the 640 to reduce the interrupt frequency.
Hi Kobi,
But the problem I would have is that to trigger the DMA Interuption every second, I would have to configure a 375KB buffer
(62500 * 2B * 3 chanels) for three Channels which is what I need, and the max RAM is 256K. It's not possible. Apart from that I only need
one sample every 10ms, so I'm wasting a lot of memory with unnecessary samples.
Thank you.
I don't see a way to configure the DMA in such way. You better wakeup every 10msec to collect the sample.
I don't think you lags is due to this timer interrupt (it is relatively a very short processing), which shouldn't have a an impact.
Br,
Kobi