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.

TMS320F28232: Solar Lib - SPLL_1ph_IQ

Part Number: TMS320F28232
Other Parts Discussed in Thread: CONTROLSUITE

Hi,
 
 I am using controller TMS320F28232 & trying to find the Theta of the given sine wave range from 0 to 3V (Vpeak) with the help of solar library "SPLL_1ph_IQ.h"
From the location - 'C:\ti\controlSUITE\libs\app_libs\solar\v1.2\IQ\'
 
Can anyone tell me what is the exact time taken by the "SPLL_1ph_IQ_FUNC(&spll1)" in the "Solar_IQ.h" library to execute ?
 I've used the "SPLL_1ph_IQ_FUNC" within the 20KHz timer interrupt & tried to check the time by toggling a GPIO its taking nearly 15uSec.
 
15uSec is vast for my operations how can i reduce the execution time ?
 
Note :
1. My system clock is configured for 150MHz
2. Reading the ADC_Value through the opamp circuit with the offset of 1.5Vdc so as to get the(0 to 3Vpeak) 50HZ AC Sine wave voltage.ADC value swing from 0 to 4096.
3. As per document when i give _IQ21 format value some glitches happening randomly in the values of spll1.theta[1] & spll1.sin[1]. But I've given the (spll1.AC_input) ADC Value in _IQ11(11 bit value) format its working fine for me.
 
Here is my code : ( Within the 20KHz Timer interrupt loop)
 
    Adc.Adc_Buffer9_Count = AdcResult.ADCRESULT9 >> 4;  // Converting ADC result to 12 bit format
 
    spll1.AC_input = ((long) (Adc.Adc_Buffer9_Count - 2048));  // ADC Value to 11 bit format
 
    GpioDataRegs.GPCSET.bit.GPIO84 = 1;  // Turn On GPIO
 
    SPLL_1ph_IQ_FUNC(&spll1);  // SPLL Function to find the theta & Sine values
 
    GpioDataRegs.GPCCLEAR.bit.GPIO84 = 1;  // Turn Off GPIO
 
    Sine_Wave = _IQ21abs(spll1.sin[1]); // Resultant in the _IQ21 format
    Theta = (spll1.theta[1] >> 5);    // Converting the _IQ21 resultant to _IQ16 (16 bit value) for display purpose