Tool/software: TI C/C++ Compiler
HELLO
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.
Hello Whong,
How many ADC channels are sampled? How many us are used for your ADC sample+conversion? You don't have to read the conversion result after every conversion.
The ADC module supports group memory threshold interrupt which can be used to significantly reduce the CPU load when using interrupts for reading the conversion results.
Another way to reduce the CPU load is to use DMA to transfer data from ADC memory to CPU SRAM:
The ADC module can generate DMA request for a a specified number of conversion results being available in the group’s results’ memory.
The RTI counter is configured to 50 uSec and it is started as before. Only interrupt is disabled.)
Is it possible to trigger the sampling of ADC without enabling the RTI compare 0 interrupt?
use you give me example, one time rti 50us,but adc and rti are 50us
The RTI compare0 interrupt condition can be used as a trigger source to trigger the ADC conversion. But you don't have to enable the RTI compare 0 interrupt in VIM module. You need to enable RTI compare 0 to generate the interrupt request which is used as the trigger.
You will work out an example tomorrow for you.
Thank you
You mean I don’t need to start the interrupt function in VIM, and the ADC is triggered set by the RTI hardware, but this code
{
while((adcIsConversionComplete(adcREG1,adcGROUP1))==0);
adcGetData(adcREG1, adcGROUP1,&adc_data[0]);
Amplitude_value[AD_COUNT]=adc_data[0].value;
}
where I write,
Attached is my example code to sample ADC triggered by rtiCOMP0
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/312/1121.TMS570LS0432_5F00_ADC_5F00_RTITrigger.7z
ADC gets triggered by either a rising edge or a falling edge (default) on the RTI compare interrupt line output from the RTI module.
Here are the steps to get the RTI compare 0 interrupt to trigger the ADC:
/* Enable RTI Compare 0 interrupt notification */
rtiEnableNotification(rtiNOTIFICATION_COMPARE0);
/* Enables the auto-clear functionality on the compare 0 interrupt.*/
rtiREG1->INTCLRENABLE = (0x0A << 0);
/* set value to RTI Compare 0 Clear Register*/
rtiREG1->COMP0CLR = rtiREG1->CMP[0].COMPx + rtiREG1->CMP[0].UDCPx / 2;