Hello,
I am trying to use C2000 LaunchPadXL with TMS320F28027 to as a part of my project simultaneously sample two channels. My goal is to store say 50 samples at a given sampling rate, then change sampling rate and store another 50, and do this for say 10 cycles. Other things that I am doing and are not directly related here are to program a DDS via SPI and send data via SCI. So, it is important for me to make sure interrupts do not interfere when other things are happening.
I am using ePWM to set the sampling frequency.
After initializing things I have a forever loop as below:
for(;;)
{
if(push button is not press) {do nothing;}
else
{
for (i=0;i<10<i++)
{
>>Something should be enabled here (ADC, General interrupt, PMW Clk?) [??????] <<main question
>>PWM period should change
while(conversation<50)
{
Loop++; // wait for interrupt and in interrupt store the values and increment conversion
}
>>something should be disabled here
}
}
}
What is not clear to me is that in each cycle, what should be enabled and after that what should be disabled. I was thinking of something like ADC_enable(myAdc) and ADC_disable(myAdc) which does not seem to work. But should I disable/enable anything else as well or clear or reset anything?
Many thanks,
Arsam