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.

ADC ISR time reduction in TMS320F28027

Other Parts Discussed in Thread: TMS320F28027, CONTROLSUITE

//The clock setting are DSP28_DIVSEL=2 and DSP28_PLLCR=12 ====> 60MHz clock.

//The ADC ISR is obtained from EPWM1- SOC at 1st instant, interrupt at zero, The EPWM1 frequency is 100kHz. 

//The device is TMS320F28027.

_iq18 v1, v2, v3, v4, v5, v6, v7;

interrupt void adc_isr(void)
{

v1 = _IQ(AdcResult.ADCRESULT0);
v2 = _IQ(AdcResult.ADCRESULT1);
v3 = _IQ(AdcResult.ADCRESULT2);
v4 = _IQ(AdcResult.ADCRESULT3); 
v5 = _IQ(AdcResult.ADCRESULT4); 
v6 = _IQ(AdcResult.ADCRESULT5);
v7 = _IQ(AdcResult.ADCRESULT6);

}

1) The ADC ISR is taking 50 micro-seconds to read the 7 ADC channels. To reduce the calculations, I want the ADC values in IQ format. How can I reduce the time required to obtain ADC values in IQ format.

2) I am trying to obtain PI (proportional-integral) controller calculations using these ADC values within 20 microseconds. Please suggest me how can it be done.

Please help me on this.

  • 1. You may want to run the ISR from RAM

    For an example of how to do it for an ISR refer to the following example in controlSUITE

    C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_examples_structs\flash_f2802x

    2.  50 micro second to read 7ADC channels in incredulous, you really need to confirm what's going on.. verify your ISR is at the rate you want through a GPIO toggle 

    how are you measuring the time? 

    3. What do you expect this to do??? 

    v1 = _IQ(AdcResult.ADCRESULT0);

    My best suggestion will be to look at some system examples in controlSUITE to see how control software is programmed. 

    C:\ti\controlSUITE\development_kits\TMDSSOLARUINVKIT_v100\MicroInv_F2803x

    or even more basic examples

    www.ti.com/.../TMDSC2KWRKSHPKIT