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.

How to set a varying sampling rate for ADC

Hi all,

I am using the TMS320F28335 Delfino Experimental kit.

In the ADC module, I am using timer to trigger the ADC, SOC. I am using a software trigger "AdcRegs.ADCTRL2.bit.SOC_SEQ1=1;" in the CPU timer ISR  to start the ADC for every 100 usec,  

In the next step, I need to change this sampling rate after few cycles. But if I use the command  ConfigCpuTimer(&CpuTimer0, 150, 160); for 160 usec, in the ADC ISR, the program build but hangs when I run it.

I tried using breakpoints but the control just disappears after it reaches the section which updates the sampling rate. I also tried changing the location of the command but the program still hangs. I am not able to update the sampling rate whiles the timer interrupt is active.

My question are, how can I update the timer value during run time to set variable sample rate ? and is the command  "ConfigCpuTimer(&CpuTimer0, 150, 160);" the right way to update it or there are some other commands to do it?


Thanks in advance.