[DSP学习笔记]基于TMS320F28335的FIR滤波实现

这篇具有很好参考价值的文章主要介绍了[DSP学习笔记]基于TMS320F28335的FIR滤波实现。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

首先进入TI官网,搜索C2000 wave,进行下载安装。

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

安装完成后,在2000 wave的安装目录下,进入以下目录:C2000Ware_4_02_00_00\libraries\dsp\FPU\c28

以我本地的安装目录为例:E:\ti\c2000\C2000Ware_4_02_00_00\libraries\dsp\FPU\c28

复制include、source文件夹到新建工程中。再根据选用的DSP型号对文件夹内容进行删减。如:我使用的是TMS320F28335,FPU是32位的,故仅保留include、source文件夹中的fpu32文件夹以及dsp.h头文件。

工程中,可以见有以下文件(仅进行滤波可删除FFT相关文件)

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

同时记得添加头文件路径

[DSP学习笔记]基于TMS320F28335的FIR滤波实现 至此,对于我们进行滤波所需的函数库已经移植完毕。

测试部分:

首先使用MATLAB生成输入信号。

 MATLAB函数式文件:

%生成固定点数固定频率的正弦信号
%fs为采样率
%f为多频信号频率
%N为采样点数
%amp为信号幅值
%phase为信号初相位
function [input,t] = mult_freq_signal_test(fs,f,N,amp,phase)
    dt = 1/fs;        %采样周期
    t = dt*N;         %采样时间
    temp = (0:dt:(N-1)*dt)';
    y = amp.*sin(2*pi*f.*temp+phase/180*pi);
    Num = size(f,2);    %获取f频率个数
    input = y*ones(Num,1);
    subplot(1,2,1);
    plot(temp/dt,input);
    title('信号时域');
    xlabel('点数 N');ylabel('幅值 A');
    subplot(1,2,2);
    Y = fftshift(fft(input));%做傅里叶变换并把零频点移到频谱中心
    F = (-N/2:N/2-1)*(fs/N);%设置横坐标
    plot(F,abs(Y)/max(abs(Y)));
    title('信号频域');
    xlabel('频率 f');ylabel('幅值 A')
end

 MATLAB命令式文件:

%与mult_freq_signal_test.m函数式文件配合使用,将生成的输出信号保存到本地
fs=1e5;             %设采样率为100K
f = [1e3,5e3,1e4];  %频率矩阵(1*N)测试信号频率为1K,5K,10K
phase = [0,0,0];    %初相位均为0
amp = [0.3,1.0,0.5];
N=512;              %采样点数

y=mult_freq_signal_test(fs,f,N,amp,phase);

y=reshape(y,[4,N/4]);
y=y';

fileID = fopen('record.txt','w');
for i=1:1:N/4
    fprintf(fileID,'%.6f,%.6f,%.6f,%.6f,\n',y(i,1),y(i,2),y(i,3),y(i,4));
end
fclose(fileID);%将生成的初始信号保存到.m文件路径下的record.txt

生成波形如下的输入信号:

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

 将record.txt文件内容复制到INPUT.c文件中,如下:

//#############################################################################
//! \file   input.c
//! \brief  Input Vector (1024) 
//! \author Vishal Coelho 
//! \date   16-Sep-2016
//! 
//
//  Group:          C2000
//  Target Family:  $DEVICE$
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2022 Texas Instruments Incorporated -
//             http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################
float test_input[512] = {
                         0.000000,0.621747,1.100913,1.340760,
                         1.319556,1.092705,0.767601,0.461223,
                         0.256783,0.175872,0.176336,0.176103,
                         0.093107,-0.114798,-0.426010,-0.757295,
                         -0.991651,-1.021653,-0.791865,-0.323977,
                         0.285317,0.893485,1.358000,1.582180,
                         1.544357,1.300000,0.956572,0.631123,
                         0.406943,0.305699,0.285317,0.263809,
                         0.159191,-0.070597,-0.403866,-0.757295,
                         -1.013795,-1.065855,-0.857949,-0.411682,
                         0.176336,0.763658,1.207840,1.412279,
                         1.355387,1.092705,0.731771,0.389703,
                         0.149857,0.033962,0.000000,-0.033962,
                         -0.149857,-0.389703,-0.731771,-1.092705,
                         -1.355387,-1.412279,-1.207840,-0.763658,
                         -0.176336,0.411682,0.857949,1.065855,
                         1.013795,0.757295,0.403866,0.070597,
                         -0.159191,-0.263809,-0.285317,-0.305699,
                         -0.406943,-0.631123,-0.956572,-1.300000,
                         -1.544357,-1.582180,-1.358000,-0.893485,
                         -0.285317,0.323977,0.791865,1.021653,
                         0.991651,0.757295,0.426010,0.114798,
                         -0.093107,-0.176103,-0.176336,-0.175872,
                         -0.256783,-0.461223,-0.767601,-1.092705,
                         -1.319556,-1.340760,-1.100913,-0.621747,
                         -0.000000,0.621747,1.100913,1.340760,
                         1.319556,1.092705,0.767601,0.461223,
                         0.256783,0.175872,0.176336,0.176103,
                         0.093107,-0.114798,-0.426010,-0.757295,
                         -0.991651,-1.021653,-0.791865,-0.323977,
                         0.285317,0.893485,1.358000,1.582180,
                         1.544357,1.300000,0.956572,0.631123,
                         0.406943,0.305699,0.285317,0.263809,
                         0.159191,-0.070597,-0.403866,-0.757295,
                         -1.013795,-1.065855,-0.857949,-0.411682,
                         0.176336,0.763658,1.207840,1.412279,
                         1.355387,1.092705,0.731771,0.389703,
                         0.149857,0.033962,0.000000,-0.033962,
                         -0.149857,-0.389703,-0.731771,-1.092705,
                         -1.355387,-1.412279,-1.207840,-0.763658,
                         -0.176336,0.411682,0.857949,1.065855,
                         1.013795,0.757295,0.403866,0.070597,
                         -0.159191,-0.263809,-0.285317,-0.305699,
                         -0.406943,-0.631123,-0.956572,-1.300000,
                         -1.544357,-1.582180,-1.358000,-0.893485,
                         -0.285317,0.323977,0.791865,1.021653,
                         0.991651,0.757295,0.426010,0.114798,
                         -0.093107,-0.176103,-0.176336,-0.175872,
                         -0.256783,-0.461223,-0.767601,-1.092705,
                         -1.319556,-1.340760,-1.100913,-0.621747,
                         -0.000000,0.621747,1.100913,1.340760,
                         1.319556,1.092705,0.767601,0.461223,
                         0.256783,0.175872,0.176336,0.176103,
                         0.093107,-0.114798,-0.426010,-0.757295,
                         -0.991651,-1.021653,-0.791865,-0.323977,
                         0.285317,0.893485,1.358000,1.582180,
                         1.544357,1.300000,0.956572,0.631123,
                         0.406943,0.305699,0.285317,0.263809,
                         0.159191,-0.070597,-0.403866,-0.757295,
                         -1.013795,-1.065855,-0.857949,-0.411682,
                         0.176336,0.763658,1.207840,1.412279,
                         1.355387,1.092705,0.731771,0.389703,
                         0.149857,0.033962,0.000000,-0.033962,
                         -0.149857,-0.389703,-0.731771,-1.092705,
                         -1.355387,-1.412279,-1.207840,-0.763658,
                         -0.176336,0.411682,0.857949,1.065855,
                         1.013795,0.757295,0.403866,0.070597,
                         -0.159191,-0.263809,-0.285317,-0.305699,
                         -0.406943,-0.631123,-0.956572,-1.300000,
                         -1.544357,-1.582180,-1.358000,-0.893485,
                         -0.285317,0.323977,0.791865,1.021653,
                         0.991651,0.757295,0.426010,0.114798,
                         -0.093107,-0.176103,-0.176336,-0.175872,
                         -0.256783,-0.461223,-0.767601,-1.092705,
                         -1.319556,-1.340760,-1.100913,-0.621747,
                         0.000000,0.621747,1.100913,1.340760,
                         1.319556,1.092705,0.767601,0.461223,
                         0.256783,0.175872,0.176336,0.176103,
                         0.093107,-0.114798,-0.426010,-0.757295,
                         -0.991651,-1.021653,-0.791865,-0.323977,
                         0.285317,0.893485,1.358000,1.582180,
                         1.544357,1.300000,0.956572,0.631123,
                         0.406943,0.305699,0.285317,0.263809,
                         0.159191,-0.070597,-0.403866,-0.757295,
                         -1.013795,-1.065855,-0.857949,-0.411682,
                         0.176336,0.763658,1.207840,1.412279,
                         1.355387,1.092705,0.731771,0.389703,
                         0.149857,0.033962,-0.000000,-0.033962,
                         -0.149857,-0.389703,-0.731771,-1.092705,
                         -1.355387,-1.412279,-1.207840,-0.763658,
                         -0.176336,0.411682,0.857949,1.065855,
                         1.013795,0.757295,0.403866,0.070597,
                         -0.159191,-0.263809,-0.285317,-0.305699,
                         -0.406943,-0.631123,-0.956572,-1.300000,
                         -1.544357,-1.582180,-1.358000,-0.893485,
                         -0.285317,0.323977,0.791865,1.021653,
                         0.991651,0.757295,0.426010,0.114798,
                         -0.093107,-0.176103,-0.176336,-0.175872,
                         -0.256783,-0.461223,-0.767601,-1.092705,
                         -1.319556,-1.340760,-1.100913,-0.621747,
                         0.000000,0.621747,1.100913,1.340760,
                         1.319556,1.092705,0.767601,0.461223,
                         0.256783,0.175872,0.176336,0.176103,
                         0.093107,-0.114798,-0.426010,-0.757295,
                         -0.991651,-1.021653,-0.791865,-0.323977,
                         0.285317,0.893485,1.358000,1.582180,
                         1.544357,1.300000,0.956572,0.631123,
                         0.406943,0.305699,0.285317,0.263809,
                         0.159191,-0.070597,-0.403866,-0.757295,
                         -1.013795,-1.065855,-0.857949,-0.411682,
                         0.176336,0.763658,1.207840,1.412279,
                         1.355387,1.092705,0.731771,0.389703,
                         0.149857,0.033962,0.000000,-0.033962,
                         -0.149857,-0.389703,-0.731771,-1.092705,
                         -1.355387,-1.412279,-1.207840,-0.763658,
                         -0.176336,0.411682,0.857949,1.065855,
                         1.013795,0.757295,0.403866,0.070597,
                         -0.159191,-0.263809,-0.285317,-0.305699,
                         -0.406943,-0.631123,-0.956572,-1.300000,
                         -1.544357,-1.582180,-1.358000,-0.893485,
                         -0.285317,0.323977,0.791865,1.021653,
                         0.991651,0.757295,0.426010,0.114798,
                         -0.093107,-0.176103,-0.176336,-0.175872,
                         -0.256783,-0.461223,-0.767601,-1.092705,
                         -1.319556,-1.340760,-1.100913,-0.621747,
                         0.000000,0.621747,1.100913,1.340760,
                         1.319556,1.092705,0.767601,0.461223,
                         0.256783,0.175872,0.176336,0.176103,

     };


// End of File

借助MATLAB自带的滤波器设计工具filter designer,生成滤波器系数(滤波器截止频率选择1500Hz,滤除高频噪声,指定阶数为80阶)。

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

 再点击目标,选择生成到CCS IDE中

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

28335FPU为32位,故选择单精度浮点型 

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

 点击生成到CCS新建工程中即可。

生成的fadcoefs.h如下:

/*
 * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
 * Generated by MATLAB(R) 9.11 and Signal Processing Toolbox 8.7.
 * Generated on: 13-Jan-2023 10:06:26
 */

/*
 * 离散时间 FIR 滤波器(实数)
 * ----------------
 * 滤波器结构  : 直接型 FIR
 * 滤波器长度  : 81
 * 稳定     : 是
 * 线性相位   : 是 (Type 1)
 */

/* General type conversion for MATLAB generated C-code  */
#include "tmwtypes.h"
/* 
 * Expected path to tmwtypes.h 
 * E:\Program Files\MATLAB\R2021b\extern\include\tmwtypes.h 
 */
/*
 * Warning - Filter coefficients were truncated to fit specified data type.  
 *   The resulting response may not match generated theoretical response.
 *   Use the Filter Design & Analysis Tool to design accurate
 *   single-precision filter coefficients.
 */
const int BL = 81;
const float coeffs[81] = {
               -0,-7.111737887e-06,-2.438249976e-05,-4.471002831e-05,-5.97600847e-05,
  -6.013489474e-05,-3.557757736e-05,2.479158684e-05,0.0001322122553,0.0002980003483,
  0.0005332503351, 0.000848530326, 0.001253577648, 0.001757002436, 0.002366006607,
   0.003086125944, 0.003921000753, 0.004872185644, 0.005938995164, 0.007118403912,
   0.008404986933, 0.009790921584,  0.01126603596,  0.01281791367,  0.01443205494,
    0.01609207876,  0.01777997613,  0.01947640628,  0.02116102912,  0.02281285636,
    0.02441063337,   0.0259332303,  0.02736003883,  0.02867136523,  0.02984880283,
    0.03087559529,   0.0317369625,  0.03242038563,  0.03291586414,  0.03321611136,
    0.03331669047,  0.03321611136,  0.03291586414,  0.03242038563,   0.0317369625,
    0.03087559529,  0.02984880283,  0.02867136523,  0.02736003883,   0.0259332303,
    0.02441063337,  0.02281285636,  0.02116102912,  0.01947640628,  0.01777997613,
    0.01609207876,  0.01443205494,  0.01281791367,  0.01126603596, 0.009790921584,
   0.008404986933, 0.007118403912, 0.005938995164, 0.004872185644, 0.003921000753,
   0.003086125944, 0.002366006607, 0.001757002436, 0.001253577648, 0.000848530326,
  0.0005332503351,0.0002980003483,0.0001322122553,2.479158684e-05,-3.557757736e-05,
  -6.013489474e-05,-5.97600847e-05,-4.471002831e-05,-2.438249976e-05,-7.111737887e-06,
               -0
};

需注意,生成的fadcoefs.h文件需包含tmwtypes.h文件

在生成的fadcoefs.h中包含tmwtypes.h的文件路径,将其添加到工程头文件路径即可。

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

 至此已完成了大部分准备工作,接下来开始编写函数进行滤波操作。

仿照TI官方例程,完成了以下函数的编写。

/*
 * FIR.h
 *
 *  Created on: 2023年1月12日
 *      Author: yang
 */

#ifndef APP_FIR_H_
#define APP_FIR_H_

#include "DSP28x_Project.h"
#include <stdio.h>
#include <string.h>

void FIR_Init(void);
void FIR_filter_run(void);


#endif /* APP_FIR_H_ */
/*
 * FIR.c
 *
 *  Created on: 2023年1月12日
 *      Author: yang
 */


#include <FIR.h>
#include "dsp.h"
#include "fpu_filter.h"
#include <math.h>
#include "complex.h"
#include "fdacoefs.h"

#define pi 3.14159
#define FIR_SIZE       (512U)
#define FIR_ORDER       (80U)             // ORDER = NUM_TAPS - 1,ORDER为滤波器阶数

#pragma DATA_SECTION(coeffs, "FIR_buffer0");
#pragma DATA_SECTION(FIR_output, "FIR_buffer1");

// FIR_f32 object
FIR_f32 fir;
// Handle to the FIR_f32 object
FIR_f32_Handle hnd_fir = &fir;

// The filter coefficients are tacked on to the end of the
// MATLAB generated input

// The delay line buffer
float delayLine[FIR_ORDER+1];

float FIR_output[FIR_SIZE];

extern float test_input[];
extern const float coeffs[];
//*****************************************************************************
// the function definitions
//*****************************************************************************
void FIR_Init(void)
{
    // Configure the object
    FIR_f32_setCoefficientsPtr(hnd_fir, coeffs);
    FIR_f32_setDelayLinePtr(hnd_fir, delayLine);
    FIR_f32_setOrder(hnd_fir, FIR_ORDER);
    FIR_f32_setInitFunction(hnd_fir, (v_pfn_v)FIR_f32_init);
    FIR_f32_setCalcFunction(hnd_fir, (v_pfn_v)FIR_f32_calc);

    // Copy the coefficients from test input into the "coeffs" array
    //memcpy(&coeffs, &test_input[FIR_SIZE], (FIR_ORDER + 1U)*sizeof(float));

    // Run the initialization function
    hnd_fir->init(hnd_fir);

}

void FIR_filter_run(void)
{
    // Locals
    uint16_t i;
    float32u_t in, out;

    for(i = 0U; i < FIR_SIZE; i++)
    {
        in.f32   = test_input[i];
        out.f32  = FLT_MAX;
        FIR_f32_setInput(hnd_fir, in.f32);
        FIR_f32_setOutput(hnd_fir, out.f32);

        // Call the calculation routine
        hnd_fir->calc(hnd_fir);

        out.f32 = FIR_f32_getOutput(hnd_fir);
        FIR_output[i] = out.f32;
    }
}

// End of File









cmd文件如下

/*
// TI File $Revision: /main/3 $
// Checkin $Date: July 9, 2008   14:12:45 $
//###########################################################################
//
// FILE:    28335_RAM_lnk.cmd
//
// TITLE:   Linker Command File For IQmath examples that run out of RAM
//
// NOTE; The example project uses memory protected by the
//       Code Security Module (CSM).  Make sure the CSM is
//       unlocked before you load the project.  One quick way
//       to do this on an erased device is to open a memory
//       window to the CSM password locations.  If these locations
//       read back 0xFFFF (or non-zero), then the CSM is unlocked:
//
//      Device    Password locations
//      28335:    0x33FFF8 - 0x33FFFF
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2014-2022 Texas Instruments Incorporated -
//             http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
*/




MEMORY
{
PAGE 0 :
   BEGIN      : origin = 0x000000, length = 0x000002     /* Boot to M0 will go here                      */
   BOOT_RSVD  : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */

   RAML0      : origin = 0x008000, length = 0x000800
   RAML1L2    : origin = 0x008800, length = 0x004800
   ZONE7A     : origin = 0x200000, length = 0x00FC00    /* XINTF zone 7 - program space */

   FLASHH     : origin = 0x300000, length = 0x008000     /* on-chip FLASH */
   FLASHG     : origin = 0x308000, length = 0x008000     /* on-chip FLASH */
   FLASHF     : origin = 0x310000, length = 0x008000     /* on-chip FLASH */
   FLASHE     : origin = 0x318000, length = 0x008000     /* on-chip FLASH */
   FLASHD     : origin = 0x320000, length = 0x008000     /* on-chip FLASH */
   FLASHC     : origin = 0x328000, length = 0x008000     /* on-chip FLASH */
   FLASHA     : origin = 0x338000, length = 0x007F80     /* on-chip FLASH */


   CSM_RSVD   : origin = 0x33FF80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
   CSM_PWL    : origin = 0x33FFF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA            */
   OTP         : origin = 0x380400, length = 0x000400     /* on-chip OTP */
   ADC_CAL    : origin = 0x380080, length = 0x000009

   IQTABLES    : origin = 0x3FE000, length = 0x000b50     /* IQ Math Tables in Boot ROM */
   IQTABLES2   : origin = 0x3FEB50, length = 0x00008c     /* IQ Math Tables in Boot ROM */
   FPUTABLES   : origin = 0x3FEBDC, length = 0x0006A0     /* FPU Tables in Boot ROM */
   ROM         : origin = 0x3FF27C, length = 0x000D44     /* Boot ROM */

   RESET      : origin = 0x3FFFC0, length = 0x000002
   VECTORS     : origin = 0x3FFFC2, length = 0x00003E     /* part of boot ROM  */







PAGE 1 :
   BOOT_RSVD  : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */
   RAMM0      : origin = 0x000050, length = 0x0003B0     /* on-chip RAM block M0 */
   RAMM1      : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
   RAML3      : origin = 0x00D000, length = 0x001000
   RAML4      : origin = 0x00E000, length = 0x001000
   RAML5      : origin = 0x00F000, length = 0x001000
   ZONE7B     : origin = 0x20FC00, length = 0x000400     /* XINTF zone 7 - data space */
   FLASHB     : origin = 0x330000, length = 0x008000     /* on-chip FLASH */

}
 

SECTIONS
{
   FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
   /* Setup for "boot to SARAM" mode:
      The codestart section (found in DSP28_CodeStartBranch.asm)
      re-directs execution to the start of user code.  */

   codestart        : > BEGIN,     PAGE = 0
 
#ifdef __TI_COMPILER_VERSION__
    #if __TI_COMPILER_VERSION__ >= 15009000
        .TI.ramfunc : {} LOAD = RAML0,
                         RUN = RAML0,
                         LOAD_START(_RamfuncsLoadStart),
                         LOAD_END(_RamfuncsLoadEnd),
                         RUN_START(_RamfuncsRunStart),
                         LOAD_SIZE(_RamfuncsLoadSize),
                         PAGE = 0
    #else
        ramfuncs       : LOAD = RAML0,
                         RUN = RAML0,
                         LOAD_START(_RamfuncsLoadStart),
                         LOAD_END(_RamfuncsLoadEnd),
                         RUN_START(_RamfuncsRunStart),
                         LOAD_SIZE(_RamfuncsLoadSize),
                         PAGE = 0
    #endif
#endif

	.text           : {*(.text)}>> RAML1L2|RAML0 PAGE = 0
	.cinit          : > RAML0,     PAGE = 0
    .pinit           : > RAML0,     PAGE = 0
    .switch          : > RAML0,     PAGE = 0

    .stack           : > RAMM1,     PAGE = 1
    .ebss            : > RAML3,     PAGE = 1
    .econst          : > RAML3,     PAGE = 1
    .sysmem          : > RAML3,     PAGE = 1
    .esysmem         : > RAML3,     PAGE = 1

    .sysmem          : > RAML3,     PAGE = 1

	FIR_buffer0		: > RAML4,     PAGE = 1
	FIR_buffer1		: > RAML5,     PAGE = 1


   .cio             : > RAML3,     PAGE = 1
   ZONE7DATA        : > ZONE7B,    PAGE = 1

   DMARAML4         : > RAML4,     PAGE = 1
   DMARAML5         : > RAML5,     PAGE = 1

   .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used                    */
   csm_rsvd         : > CSM_RSVD   PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
   csmpasswds       : > CSM_PWL    PAGE = 0, TYPE = DSECT /* not used for SARAM examples */

   /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
   .adc_cal     : load = ADC_CAL,   PAGE = 0, TYPE = NOLOAD

}

/*
//===========================================================================
// End of file.
//===========================================================================
*/

再在主函数中调用FIR_Init(); FIR_filter_run();函数即可完成滤波操作。

借助CCS的Graph画图工具测试滤波效果如下:

原始信号:

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

滤波后信号:

[DSP学习笔记]基于TMS320F28335的FIR滤波实现

测试结束,完成了FIR滤波。

本人为TMS320F28335学习小白,如有错误,请大佬多多指正。

本文参考了以下文章:​​​​​​

[1]TMS320F28335调用官方库进行FFT频谱分析_PeepFuture橙子的博客-CSDN博客

[2]https://blog.csdn.net/weixin_42216236/article/details/127375580文章来源地址https://www.toymoban.com/news/detail-498713.html

到了这里,关于[DSP学习笔记]基于TMS320F28335的FIR滤波实现的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • TMS320F28374S之X-BAR

    X-BAR可翻译为 交叉开关 或者 交换总线 ,在DSP中有四种 X-BAR,分别是: Input X-BAR、 Output X-BAR、 CLB X-BAR 和 ePWM X-BAR。Input X-BAR可以将外部信号传输到CPU内部,Output X-BAR则可以将内部信号传输到外部GPIO端口。CLB X-BAR 和ePWM X-BAR将内部信号传输到CLB和 ePWM模块。 Input X-BAR用于将信号从

    2024年02月13日
    浏览(36)
  • 【轮式平衡机器人】——TMS320F28069片内外设之ePWM

    声明:本系列博客参考有关专业书籍,截图均为自己实操,仅供交流学习! 脉冲宽度调制(PWM)是一种对模拟信号进行数字编码的方法,硬件原理是根据相应载荷的变化来调制晶体管栅极或基极的偏置,来实现 开关 稳压电源输出晶体管 或 晶体管导通时间的 改变。 一个重要

    2024年03月11日
    浏览(50)
  • DSP28335学习笔记:定时器中断

    F28335的CPU定时器有3个且均为32位,分别是Timer0、Timer1、Timer2, 其中 Timer2 是为操作系统 DSP/BIOS 保留的,当未移植操作系统时,可用来做普 通的定时器。这三个定时器的中断信号分别为 TINT0,TINT1,TINT2,分别对应于中断向量 INT1,INT13,INT14。 一、F28335定时器介绍(CPU定时器)

    2024年04月10日
    浏览(44)
  • DSP_TMS320F28377D_算法加速方法1_拷贝程序到RAM运行

    TI C2000系列的DSP芯片算力有限,用于来控制有时候常会出现控制程序无法实现实时运行的情况,因此从本文开始,将陆续推出几篇DSP算法加速的方法 此方法只需要添加 一行代码 和 一个预定义 ,即可达到算法整体加速的目的。先声明本文是讲的是TMS320F28377D,其他C2000系列芯片

    2024年02月10日
    浏览(62)
  • DSP28335学习笔记-产生PWM波 ——从应用角度出发

    关于DSP28335的书籍有很多,但都是从乏味的寄存器开始入手。对于新手可能不是很友好,因此关于DSP的学习记录我打算从应用入手去学习寄存器的用法和配置。 此次实验用J4模块引脚的XPWM1和XPWM2分别产生ePWM1A和ePWM1B,对应芯片GPIO0和GPIO1引脚。 黄色线为EPWM1A,紫色线为EPWM1B。

    2024年02月06日
    浏览(34)
  • DSP_TMS320F28377D_算法加速方法2_添加浮点运算快速补充库rts2800_fpu32_fast_supplement.lib

    继上一篇博客DSP_TMS320F28377D_算法加速方法1_拷贝程序到RAM运行_江湖上都叫我秋博的博客-CSDN博客之后,本文讲第二种DSP算法加速的方法,该方法的加速效果很明显,但是加速范围仅限于32位浮点数下面这几种函数: 下面稍微解释一下一些可能有疑问的点 1 电机控制中经常对同一

    2024年02月10日
    浏览(35)
  • F28335的ADC模块

    标签: DSP 具有双采样保持器的 12位转换内核 模拟输入电平:0~3V 16个转换通道;ADC有16个输入引脚,即16个模拟转变输入通道,分为2组,一组为A,一组为B,其中ADCINA0~ ADCINA7都是属于A的,ADCINB0~ADCINB7都是B的。 序列发生器可配置成两个独立8通道或者一个16通道;无论是级联工

    2023年04月11日
    浏览(34)
  • DSP28335学习之旅2-最小系统

    目录 1  什么是最小系统 2  JTAG下载电路 3  电源电路 4  boot电路 5  复位电路 6  晶振电路         最小系统又称最小应用系统,它是能够使DSP正常工作的最低电路要求,学习DSP的硬件设计首先从DSP的最小系统开始。 DSP的最小系统应包含: (1)JTAG下载电路:用于烧录D

    2023年04月09日
    浏览(30)
  • 基于DSP28335的CAN通信(附代码)

    在学DSP28335的时候由于寄存器数量多且配置复杂,网上各路大神给出的代码基本上都不太能跑的通(可能是我移植的时候有些寄存器没配置好),所以在看了好几遍官方数据手册并且自己动手写了一遍代码之后,将一些容易错的地方记录了下来,文末也附上了一份代码,希望能对

    2024年02月11日
    浏览(57)
  • 【TES600】基于XC7K325T与TMS320C6678的通用信号处理平台

    板卡概述         TES600是一款基于FPGA+DSP协同处理架构的通用高性能实时信号处理平台,该平台采用1片TI的KeyStone系列多核浮点/定点DSP TMS320C6678作为主处理单元,采用1片Xilinx的Kintex-7系列FPGA XC7K325T作为协处理单元,具有1个FMC子卡接口,具有4路SFP+万兆光纤接口,具有2路

    2024年02月06日
    浏览(43)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包