Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Compiler/TMS320C5505: fir filter dsplib

$
0
0

Part Number:TMS320C5505

Tool/software: TI C/C++ Compiler

Dear All,


I am trying to use the built-in cfir function in dsplib to implement the fir filter. I am using below code:

Int16 left_input;

int const h[52] = {
        -22,    -25,    -30,    -38,    -50,    -66,    -86,   -112,   -143,
        -182,   -228,   -283,   -348,   -425,   -515,   -623,   -752,   -909,
        -1103,  -1350,  -1677,  -2136,  -2838,  -4071,  -6895, -20853,  20853,
         6895,   4071,   2838,   2136,   1677,   1350,   1103,    909,    752,
         623,    515,    425,    348,    283,    228,    182,    143,    112,
         86,     66,     50,     38,     30,     25,     22
};

void main( void )
{
    signed short int left_input2 = 0

    /* Initialize BSL */
    USBSTK5505_init( );

    /* Initialize PLL */
    pll_frequency_setup(100);

    /* Initialise hardware interface and I2C for code */
    aic3204_hardware_init();
    
    /* Initialise the AIC3204 codec */
    aic3204_init();

    asm(" bclr XF");

    for ( i = 0  ; i < SAMPLES_PER_SECOND * 6000  ;i++  )
    {
        aic3204_codec_read(&left_input, &right_input); // Configured for one interrupt per two channels.

        cfir(&left_input, h, &left_input2, 0, 1, 52);

       left_output =  left_input2;

}

However, I am getting the error like

Description    Resource    Path    Location    Type
#169 argument of type "const int *" is incompatible with parameter of type "DATA *"   

Seems like there is problem in storing the coefficients of filter. I am not sure which data type should be used to store the coefficients.

Does anyone know how to store coefficients 'h' of fir filter?

Thanks and regards,

Satyajit


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>