Question
Using the STM32F10x DSP library FIR
Posted on October 29, 2013 at 16:57
I'm unsure on how to use the FIR interface. From the provided example:
int a[N];/*filter output vector*/ short x[M+N-1] = {x0,x1...,xM+N-1};/*filter input vector*/ short h[M]={h0,h1...,hM-1};/*filter coefficients vector*/ fir_coefs.nh = M; /*Number of Coefficients for FIR*/ fir_coefs.h = h; /*Pointer on FIR coefficient vector*/ fir_16by16_stm32(a,x,&fir_coefs,N);/*performs the FIR filtering*/ Suppose I only have 4 samples (the minimum allowed), I put them into the first 4 elements of x, and call the fir func. But if i have continuous stream, can i just load again the next 4 same way? Trying now but I see wrong stuff seems to come out. (I find the ARM math library fir interface is more clearer in this respect, it keeps the state and input separate)