楼主: xiaocaihong

大咖问答第13期:顾卫钢博士在线解答DSP设计难题

  [复制链接]

该用户从未签到

发表于 2020-8-10 17:01:39 | 显示全部楼层
分享到:
DSP更一般普通的单片机相比有啥优势么,看着外设感觉也没有啥大的区别,一般哪里用到DSP开发用到的比较多,前景咋样了
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2020-8-10 18:38
  • 签到天数: 7 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    发表于 2020-8-10 18:37:28 | 显示全部楼层
    非常好的活动,DSP还没有使用过,用过单片机做过些控制电路。如果有兴趣学习DSP需要增加那些基础知识,谢谢
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2020-8-10 21:32:21 | 显示全部楼层
    新手使用28335,遇到一个问题,求问.
    编译后.text .stack .esysmem 会报错,修改cmd文件后,编译不报错。在线调试时,下载完成之后,开始按钮是灰色的。
    在CPU Reset后可以点开始,但提示No source available for “0x3ff9ce”
    运行后,会停在0x3ff9fa
    修改过28335_RAM_lnk.cmd文件如下:
    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode      */

       BEGIN      : origin = 0x000000, length = 0x000002     /* Boot to M0 will go here                      */
       RAMM0      : origin = 0x000050, length = 0x0003B0
       RAML0      : origin = 0x008000, length = 0x001000        //修改RAM大小
    //   RAML1      : origin = 0x009000, length = 0x002000        //RAML1      : origin = 0x009000, length = 0x001000
       RAML1_2   : origin = 0x009000, length = 0x005000
       RAML2     : origin = 0x00E000, length = 0x000400
       L1SARAM   : origin = 0x00E400, length = 0x000120
    //   RAML2      : origin = 0x00b000, length = 0x001000        //RAML2      : origin = 0x00A000, length = 0x001000
    //   RAML2      : origin = 0x00b200, length = 0x000800
    //   RAML3      : origin = 0x00c000, length = 0x001000        //RAML3      : origin = 0x00B000, length = 0x001000
       ZONE7A     : origin = 0x200000, length = 0x00FC00    /* XINTF zone 7 - program space */
       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            */
       ADC_CAL    : origin = 0x380080, length = 0x000009
       RESET      : origin = 0x3FFFC0, length = 0x000002
       IQTABLES   : origin = 0x3FE000, length = 0x000b50
       IQTABLES2  : origin = 0x3FEB50, length = 0x00008c
       FPUTABLES  : origin = 0x3FEBDC, length = 0x0006A0
       BOOTROM    : origin = 0x3FF27C, length = 0x000D44


    PAGE 1 :
       /* BOOT_RSVD is used by the boot ROM for stack.               */
       /* This section is only reserved to keep the BOOT ROM from    */
       /* corrupting this area during the debug process              */

       BOOT_RSVD  : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */
       RAMM1      : origin = 0x000400, length = 0x000480     /* on-chip RAM block M1 */
       RAML4      : origin = 0x00C000, length = 0x001000
       RAML5      : origin = 0x00D000, length = 0x001200
       RAML6      : origin = 0x00E200, length = 0x000800
       RAML7      : origin = 0x00F000, length = 0x001000
       ZONE7B     : origin = 0x20FC00, length = 0x000400     /* XINTF zone 7 - data space */
    }


    SECTIONS
    {
       /* 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
       ramfuncs         : > RAML0,     PAGE = 0
       .text            : > RAML1_2,     PAGE = 0
       .cinit           : > RAML0,     PAGE = 0
       .pinit           : > RAML0,     PAGE = 0
       .switch          : > RAML0,     PAGE = 0

       .stack           : > RAMM1,     PAGE = 1
       .ebss            : > RAML4,     PAGE = 1
       .econst          : > RAML5,     PAGE = 1
       .esysmem         : > RAML2,     PAGE = 0
    //   .esysmem         : > RAMM1,     PAGE = 1
            .cio            : > L1SARAM,   PAGE = 0

       IQmath           : > RAML1_2,     PAGE = 0
       IQmathTables     : > IQTABLES,  PAGE = 0, TYPE = NOLOAD


       /* Uncomment the section below if calling the IQNexp() or IQexp()
          functions from the IQMath.lib library in order to utilize the
          relevant IQ Math table in Boot ROM (This saves space and Boot ROM
          is 1 wait-state). If this section is not uncommented, IQmathTables2
          will be loaded into other memory (SARAM, Flash, etc.) and will take
          up space, but 0 wait-state is possible.
       */
       /*
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       {

                  IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)

       }
       */

       FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

       DMARAML4         : > RAML4,     PAGE = 1
       DMARAML5         : > RAML5,     PAGE = 1
       DMARAML6         : > RAML6,     PAGE = 1
       DMARAML7         : > RAML7,     PAGE = 1

       ZONE7DATA        : > ZONE7B,    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

    }
    回复 支持 反对

    使用道具 举报

    该用户从未签到

     楼主| 发表于 2020-8-11 09:46:51 | 显示全部楼层
    吉祥云 发表于 2020-8-10 17:25
    《手把手教你学DSP——基于TMS320X281X》怎么才能获得呢?

    参与提问“DSP”相关提问,就有机会获得
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2020-8-13 09:55:02 | 显示全部楼层
    接13楼的问题,求问应该怎么修改cmd文件。
    使用例程里的报错如下:
    批注 2020-08-13 094611.jpg
    报错详情:Description        Resource        Path        Location        Type
    <a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10099.html">#10099-D</a>  program will not fit into available memory.  placement with alignment/blocking fails for section ".text" size 0x4f69 page 0.  Available memory ranges:        28335_RAM_lnk.cmd        /Swung by Wind-force/DSP2833x_Libraries        line 125        C/C++ Problem
    Description        Resource        Path        Location        Type
    <a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10099.html">#10099-D</a>  program will not fit into available memory.  run placement with alignment/blocking fails for section ".stack" size 0x400 page 1.  Available memory ranges:        28335_RAM_lnk.cmd        /Swung by Wind-force/DSP2833x_Libraries        line 130        C/C++ Problem


    原来的cmd文件如下:
    /*
    // TI File $Revision: /main/9 $
    // Checkin $Date: August 28, 2007   11:23:31 $
    //###########################################################################
    //
    // FILE:    28335_RAM_lnk.cmd
    //
    // TITLE:   Linker Command File For 28335 examples that run out of RAM
    //
    //          This ONLY includes all SARAM blocks on the 28335 device.
    //          This does not include flash or OTP.
    //
    //          Keep in mind that L0 and L1 are protected by the code
    //          security module.
    //
    //          What this means is in most cases you will want to move to
    //          another memory map file which has more memory defined.
    //
    //###########################################################################
    // $TI Release: DSP2833x Header Files V1.01 $
    // $Release Date: September 26, 2007 $
    //###########################################################################
    */

    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    // peripheral structures to the proper locations within
    // the memory map.
    //
    // The header linker files are found in <base>\DSP2833x_Headers\cmd
    //
    // For BIOS applications add:      DSP2833x_Headers_BIOS.cmd
    // For nonBIOS applications add:   DSP2833x_Headers_nonBIOS.cmd
    ========================================================= */

    /* ======================================================
    // For Code Composer Studio prior to V2.2
    // --------------------------------------
    // 1) Use one of the following -l statements to include the
    // header linker command file in the project. The header linker
    // file is required to link the peripheral structures to the proper
    // locations within the memory map                                    */

    /* Uncomment this line to include file only for non-BIOS applications */
    /* -l DSP2833x_Headers_nonBIOS.cmd */

    /* Uncomment this line to include file only for BIOS applications */
    /* -l DSP2833x_Headers_BIOS.cmd */

    /* 2) In your project add the path to <base>\DSP2833x_headers\cmd to the
       library search path under project->build options, linker tab,
       library search path (-i).
    /*========================================================= */

    /* Define the memory block start/length for the F28335
       PAGE 0 will be used to organize program sections
       PAGE 1 will be used to organize data sections

       Notes:
             Memory blocks on F28335 are uniform (ie same
             physical memory) in both PAGE 0 and PAGE 1.
             That is the same memory region should not be
             defined for both PAGE 0 and PAGE 1.
             Doing so will result in corruption of program
             and/or data.

             L0/L1/L2 and L3 memory blocks are mirrored - that is
             they can be accessed in high memory or low memory.
             For simplicity only one instance is used in this
             linker file.

             Contiguous SARAM memory blocks can be combined
             if required to create a larger memory block.
    */


    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode      */
       /* BOOT_RSVD is used by the boot ROM for stack.               */
       /* This section is only reserved to keep the BOOT ROM from    */
       /* corrupting this area during the debug process              */

       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 */
       RAMM0      : origin = 0x000050, length = 0x0003B0

       RAML0      : origin = 0x008000, length = 0x001000
       RAML1      : origin = 0x009000, length = 0x001000
       RAML2      : origin = 0x00A000, length = 0x001000
       RAML3      : origin = 0x00B000, length = 0x001000
       ZONE6A     : origin = 0x100000, length = 0x00FC00    /* XINTF zone 6 - program space */
       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            */
       ADC_CAL    : origin = 0x380080, length = 0x000009
       RESET      : origin = 0x3FFFC0, length = 0x000002
       IQTABLES   : origin = 0x3FE000, length = 0x000b50
       IQTABLES2  : origin = 0x3FEB50, length = 0x00008c
       FPUTABLES  : origin = 0x3FEBDC, length = 0x0006A0
       BOOTROM    : origin = 0x3FF27C, length = 0x000D44


    PAGE 1 :
       RAMM1      : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
       RAML4      : origin = 0x00C000, length = 0x001000
       RAML5      : origin = 0x00D000, length = 0x001000
       RAML6      : origin = 0x00E000, length = 0x001000
       RAML7      : origin = 0x00F000, length = 0x001000
       ZONE7B     : origin = 0x20FC00, length = 0x000400     /* XINTF zone 7 - data space */
    }


    SECTIONS
    {
       /* 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
       ramfuncs         : > RAML0,     PAGE = 0
       .text            : > RAML1,     PAGE = 0
       .cinit           : > RAML0,     PAGE = 0
       .pinit           : > RAML0,     PAGE = 0
       .switch          : > RAML0,     PAGE = 0

       .stack           : > RAMM1,     PAGE = 1
       .ebss            : > RAML4,     PAGE = 1
       .econst          : > RAML5,     PAGE = 1
       .esysmem         : > RAMM1,     PAGE = 1

       IQmath           : > RAML1,     PAGE = 0
       IQmathTables     : > IQTABLES,  PAGE = 0, TYPE = NOLOAD
       IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
       FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

       DMARAML4         : > RAML4,     PAGE = 1
       DMARAML5         : > RAML5,     PAGE = 1
       DMARAML6         : > RAML6,     PAGE = 1
       DMARAML7         : > RAML7,     PAGE = 1

       ZONE7DATA        : > ZONE7B,    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.
    //===========================================================================
    */


    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2023-3-5 09:29
  • 签到天数: 18 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    发表于 2020-8-13 11:45:32 | 显示全部楼层
    顾老师好,我是一名常年用单片机的老菜鸟,DSP基本没接触过,想学习下DSP进阶下,平时也越来越少听到DSP的应用,可能是我的应用领域不同吧,所以想问下DSP有哪些经典型号适合学习的。
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2023-3-5 09:29
  • 签到天数: 18 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    发表于 2020-8-13 11:48:22 | 显示全部楼层
    顾老师,以下我对两者区别的理解,不知道这样正确否

    DSP主要针对一些计算能力要求较高的应用,如视频图像处理、智能机器人、数字无线、宽带访问、数字音频、高分辨率成像和数字电机控制等。

    单片机应用最为广泛,主要利益于它的成本控制上,使它能在许多对计算能力要求不那么高的应用立足。相信在未来几年里,MCU市场关键增长驱动力将来自于绿色能源,智能电子设备,智能电网以及电子产品的升级换代比如汽车电子。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2020-9-3 14:24:52 | 显示全部楼层
    吉祥云 发表于 2020-8-10 17:25
    《手把手教你学DSP——基于TMS320X281X》怎么才能获得呢?

    如果说书的话,在京东或者当当网上都有的卖。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2020-9-3 14:28:00 | 显示全部楼层
    ylll75 发表于 2020-8-10 18:37
    非常好的活动,DSP还没有使用过,用过单片机做过些控制电路。如果有兴趣学习DSP需要增加那些基础知识,谢谢 ...

    我觉得您之前已经有硬件设计的经验,另外您如果有C语言的基础,就可以学习DSP了。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2020-9-3 14:32:31 | 显示全部楼层
    SUSTZL 发表于 2020-8-13 09:55
    接13楼的问题,求问应该怎么修改cmd文件。
    使用例程里的报错如下:

    您的提示如果出错在0x3ff9ce,看了下,是bootroom里的内容,检查下硬件吧。
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-4-17 00:36 , Processed in 0.199654 second(s), 33 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.