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 all,
I am quite new with F28377D and I am trying to learn about EPwm triggered ADC, by using the Code Composer Studio sample code provided inside: device_support\F2837xD\v130\F2837xD_examples_Cpu1\adc_soc_epwm\cpu01\ccs.
In the "adc_soc_epwm_cpu01.c" file, I can see that the purpose is to fill the "AdcaResults[RESULTS_BUFFER_SIZE]" vector with the results of the ADC conversion. However I would like to understand
1. where are (in the program adc_soc_epwm_cpu01.c) the ADC results are written inside the "AdcaResults" vector?
Thank you so much
Leonardo
Leonardo,
Leonardo Callegaro said:In the "adc_soc_epwm_cpu01.c" file, I can see that the purpose is to fill the "AdcaResults[RESULTS_BUFFER_SIZE]" vector with the results of the ADC conversion. However I would like to understand
1. where are (in the program adc_soc_epwm_cpu01.c) the ADC results are written inside the "AdcaResults" vector?
In the ADCA-1 interrupt ISR. Look at line 182 of adc_soc_epwm_cpu01.c:
AdcaResults[resultsIndex++] = AdcaResultRegs.ADCRESULT0;
Regards,
David
Yes, that line of code sets the SOC0 to trigger on the ePWM1 SOC-A or SOC-C signal.
- David