AnsweredAssumed Answered

FIR/IIR Accelerator Switching - Buzz

Question asked by larry_o on May 29, 2015
Latest reply on Aug 27, 2015 by Mitesh

Hi,

 

I have set up FIR and IIR accelerators on my 21489 EZ Kit, both running correctly in my project individually (one active, other commented out and vice versa).

 

I believe it is possible to use both in the same project (in sequence) by setting the appropriate bits (17 & 18) in the PMCTL1 register. I have tried doing this, but when I try to switch between accelerators, I get a "buzz" like distortion over the audio signal. Bear in mind that I have both configured correctly, as they both function as expected without distortion when only 1 accelerator is being used.

 

Here are the functions I am calling to switch accelerators just before the call to each of my FIR and IIR functions within the main process audio loop.

 

 

void SelectFIR_Accel()

{

    int temp;

 

    //Mapping the FIR DMA interrupt

    temp=*pPICR0;

    temp&=~(P0I0|P0I1|P0I2|P0I3|P0I4);

    temp|=P0I0|P0I1|P0I3|P0I4;

    *pPICR0=temp;

    asm("nop;nop;nop;nop;");

    interrupt(SIG_P0,FIR_ACC_ISR);

   

    asm("nop;nop;nop;nop;");

   

    //Selecting the FIR Accelerator

    temp=*pPMCTL1; // --> in previous versions PMCTL_EXT, perhaps have to be changed, if you don't have "def21489.h" and "Cdef21489.h" in the versions according to 2146x Hardware Reference 0.2

    temp&=~(BIT_17|BIT_18);

    temp|=FIRACCSEL;

    *pPMCTL1=temp;

   

    asm("nop;nop;nop;nop;");

}

 

void SelectIIR_Accel()

{

    int temp, i;

   

    //Mapping the IIR DMA interrupt

 

    temp=*pPICR0;

    temp&=~(P0I0|P0I1|P0I2|P0I3|P0I4);

    temp|=P0I0|P0I1|P0I3|P0I4;

    *pPICR0=temp;

    asm("nop;nop;nop;nop;");

 

    interrupt(SIG_P0,IIR_ACC_ISR);

    asm("nop;nop;nop;nop;");

   

    //Selecting the IIR Accelerator

    temp=*pPMCTL1;

    temp&=~(BIT_17|BIT_18);

    temp|=IIRACCSEL;

    *pPMCTL1=temp;

 

    asm("nop;nop;nop;nop;");

}

 

Any suggestions would be much appreciated.

 

Thanks

Brian

Outcomes