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.

[参考译文] CCS/TMS320C5505:FIR 滤波器 DSPLIB

Guru**** 2553450 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/609519/ccs-tms320c5505-fir-filter-dsplib

器件型号:TMS320C5505

工具/软件:Code Composer Studio

尊敬的所有人:


我正在尝试使用 DSPLIB 中的内置 cfir 函数来实现 fir 滤波器。 我使用以下代码:

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

   /*初始化 BSL */
   USBSTK5505_init();

   /*初始化 PLL */
   PLL_FREQUENCY 设置(100);

   /*初始化代码的硬件接口和 I2C */
   aic3204_hardware_init();
   
   /*初始化 AIC3204编解码器*/
   aic3204_init();

   asm (" BCLR XF");

   对于(i = 0 ;i < samples_per_sond * 6000 ;i++ )
   {
       aic3204_codec_read (&left_input、&right_input);//配置为每两个通道一个中断。

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

      left_output = left_input2;

但是、我会得到类似的误差

说明   资源   路径   位置   类型
"const int *"类型的#169参数与"data *"类型的参数不兼容    

在存储滤波器系数时似乎存在问题。 我不确定应使用哪种数据类型来存储系数。

是否有人知道如何存储杉木滤清器的系数"h"?


如果您能提供帮助、请告诉我。

谢谢、此致、

Satyajit