AnsweredAssumed Answered

adsp-21469 - fir() works outside of interrupt, not inside?

Question asked by misterdsp on Nov 27, 2011
Latest reply on Nov 27, 2011 by Mitesh

I have code where I can run a fir filter in the background and it works, but when placed inside an interrupt service routine it does not work. The interrupt is set up with a call to "interrupt":

 

interrupt(SIG_SP0,Audio_ISR);

 

The filter code is:

 

#include <filter.h>

#define TAPS 16

#define NUM_SAMPLES 32

float GPBlock0[NUM_SAMPLES];

float GPBlock1[NUM_SAMPLES];

float state01[TAPS+1];

float pm coeffs01[TAPS];

 

fir(GPBlock0, GPBlock1, coeffs01, state01, NUM_SAMPLES, TAPS);

 

The arrays are correctly sized and the state array is initialized to all 0. If the fir() is inside main(), it works, but inside Audio_ISR() it does not and the output data is all 0. All other tasks inside Audio_ISR() are working correctly and there is plenty of time to execute the small fir.

 

Any ideas?

Outcomes