第1讲 DSP 2407 概述.ppt_第1页
第1讲 DSP 2407 概述.ppt_第2页
第1讲 DSP 2407 概述.ppt_第3页
第1讲 DSP 2407 概述.ppt_第4页
第1讲 DSP 2407 概述.ppt_第5页
已阅读5页,还剩33页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、第一讲 DSP 2407 概述,TSM320系列DSP,不同公司(如TI、AD、MOTOROLA)分别有多种系列的DSP产品。 TI公司的TMS320系列包括:定点(2000/5000系列)、浮点(3000/6000系列)、多处理器(8000系列)数字信号处理器。其中2000系列有部分是DSP控制器(F24X、F240X)。,TMS320lf2407A属于TI公司C2000XILIE 的定点DSP。 LF代表片内FLASH EPROM。 LC代表低电压CMOS ROM。 比如:TMS320LC2407(2401 2402 2403 2406)A。 TMS320LC2406(2401 2402

2、2404)A,LF240X系列DSP控制器融合实时信号处理能力、通用控制器的外设功能于一身。有如下特性: 内在的灵活操作:(SCSR1.5-7) 高速的运算能力: (30mips) 32位的累加器和32位的中央算术逻辑单元(CALU)。 16位16位的乘法器:可以实现单指令周期的乘法运算。 有效的成本(AD PWM),TMS320LF240 x系列DSPTMS320C2XX系列是TI公司的第二代改进型DSP,此后又陆续推出LF2406、LF2407等C2XX DSP。 LF2407为单片数字电机控制器制定了标准,执行速度可达30MIPS,指令几乎都可在33ns的单周期内完成,可对复杂杂的控制算

3、法进行实时处理。(2812),主要的应用领域,应用领域包括: 工业电机驱动 功率转换器和控制器 汽车系统,如电子动力转向装置 仪表和HAVC压缩机电机控制 机器人 计算机数字控制机械,DSP2407的内部资源,两个事件管理器EVA,EVB PWM对称和非对称波形; 当外部引脚PDFINTX引脚出现低电平时快速关闭PWM通道 PDFINTA:功率驱动保护引脚,当电机逆变器不正常时,可以把这个引脚置为低电平,产生一个中断将PWM输出引脚置为高阻态其是一个下降沿有效的中断; PDFINTB: 具有相同的功能。,PWM死区控制; 3个捕获单元 片内光电编码脉冲电路 事件管理器模块使DSP适合用于各种电

4、机控制。,其他片内外设,10位A/D转换器,最小转换时间位500ns。(排序器) 控制器局域网络CAN模块; 串行通信接口(SCI)模块; 16位串行外设(SPI)模块; 40个通用输入/输出引脚(GPIO),5个外部中断(两个电机驱动保护、复位和两个可屏蔽中断)。,DSP的存储器结构, 1. 544字16位片内数据/程序双口RAM 2.32K字16位片内程序FLASH 3.192K字16位最大寻址空间(64K字程序空间、64K字数据空间、64K字I/O空间) 4. 外部存储器接口模块:软件等待状态发生器、16位地址数据总线,程序存储空间,名词解释:,1.RAM: Dual-Access RA

5、M:544个16位的字; The 240 xA DARAM allows writes to and reads from the RAM in the same cycle. The DARAM is configured in three blocks: block 0 (B0), block 1 (B1), and block 2 (B2). Block 1 contains 256 words and Block 2 contains 32 words, and both blocks are located only in data memory space.,Block 0 con

6、tains 256 words, and can be configured to reside in either data or program memory space. The SETC CNF (configure B0 as program memory) and CLRC CNF (configure B0 as data memory) instructions allow dynamic configuration of the memory maps through software.,2.SRAM,single-access RAM (SARAM) There are 2

7、K words 16 bits of SARAM on some of the 240 xA devices. The PON and DON bits select SARAM(SCSR2 ) (2K) mapping in program space, data space, or both. At reset, these bits are 11, and the on-chip SARAM is mapped in both the program and data spaces.,The SARAM (starting at 8000h in program memory) is a

8、ccessible in external memory space (for 2407A only), if the on-chip SARAM is not enabled.,3.flash EEPROM,Flash EEPROM provides an attractive alternative to masked program ROM. Like ROM, Flash is nonvolatile. However, it has the advantage of reprogrammability. The LF2407A incorporates one 32K 16-bit

9、Flash EEPROM module in program space. The Flash module has multiple sectors that can be individually protected while erasing or programming. The sector size is non-uniform and partitioned as 4K/12K/12K/4K sectors.,避免了与外部存储器交换数据所需要的等待状态,从而可以取得比采用外部存储器更高的性能。 价格比外部存储器更加便宜; 维持片内存储器中的数据需要的功耗低于外部存储器的功耗。,r

10、svect B _c_int0 ;00h reset0 int1: B int1 ;02h INT1 int2: B _c_int2 ;04h INT2 int3: B int3 ;06h INT3 int4: B int4 ;08h INT4 int5: B int5 ;0Ah INT5 int6: B int6 ;0Ch INT6 int7: B int7 ;0Eh reserved int8: B int8 ;10h INT8 user-defined int9: B int9 ;12h INT9 user-defined int10: B int10 ;14h INT10 user d

11、efined int11: B int11 ;16h INT11 user defined int12: B int12 ;18h INT12 user defined int13: B int13 ;1Ah INT13 user defined int14: B int14 ;1Ch INT14 user defined int15: B int15 ;1Eh INT15 user defined,0000H003FH:段程序存储空间的内容,code security module 240 xA devices incorporate a “code security module” whi

12、ch protects the contents of program memory from unauthorized duplication. Passwords stored in password locations (PWL) 0040h to 0043h are used for this purpose.,注意:,(1)When CNF = 1, addresses FE00hFEFFh and FF00hFFFFh are mapped to the same physical block (B0) in program-memory space. For example, a

13、 write to FE00h has the same effect as a write to FF00h. For simplicity, addresses FE00hFEFFh are referred to as reserved when CNF = 1.,(2)When CNF = 0, addresses 0100h01FFh and 0200h02FFh are mapped to the same physical block (B0) in data-memory space. For example,a write to 0100h has the same effe

14、ct as a write to 0200h. For simplicity, addresses 0100h01FFh are referred to as reserved.,(3)当CFN为1时,B0为片上DARAM程序存储器。而数据存储空间的0200H02FFH为保留的数据存储区。 CFN:为ST1的第12位: ST1为状态寄存器. on-chip RAM configuration control bit (CNF),240 xA devices incorporate a security feature that prevents external access to progr

15、am memory. This feature is useful in preventing unauthorized duplication of proprietary code. If access to Flash/ROM contents are desired for debugging purposes, two actions need to be taken: 1. A “dummy” read of locations 40h, 41h, 42h and 43h (of program memory space) is necessary. The word “dummy

16、” indicates that the destination address of this read is insignificant. NOTE: Step 2 is not required if 40h43h contain 0000 0000 0000 0000h or FFFF FFFF FFFF FFFFh. 2. A 64-bit password (split as four 16-bit words) must be written to the data-memory locations 77F0h, 77F1h, 77F2h, and 77F3h. The four

17、 16-bit words written to these locations must match the four words stored in 40h, 41h, 42h, and 43h (of program memory space), respectively. The device becomes “unsecured” one cycle after the last instruction that unsecures the part.,0007005F:测试/仿真保留区,被测试和仿真系统用于特定信息的发送,因此,不能对测试/仿真地址进行写操作,否则会导致使器件改变工

18、作方式。,SECTIONS /* Sections generated by the C-compiler */ .text: FLASH PAGE 0 /* initialized EXTPROG */ .cinit: FLASH PAGE 0 /* initialized EXTPROG*/ .const: B1 PAGE 1 /* initialized */ .switch: FLASH PAGE 0 /* initialized EXTPROG*/ .bss: EXTDATA PAGE 1 /* uninitialized */ .stack: SARAM PAGE 1 /* uni

19、nitialized */ .sysmem: B1 PAGE 1 /* uninitialized */ /* Sections declared by the user */ vectors: VECS PAGE 0 /* initialized */ ,几个伪指令,.text 该标号表示部分分存放可执行代码和浮点数常量; .SWITCH:该标号表示部分存放大型的SWITCH语句和跳转表; .const:存放已经初始化的字符串常量、全局常量和静态常量; .cint:已经明确初始化的全局变量和静态常量。 .bss:存放没有初始化的全局变量和静态变量。,思考题,Float a; 这时a被分配到什么空间里了。,PAGE 1: /* Data Memory */ B2: org=00060h, len=00020h /* internal DARAM */ B0: org=00200h, len=00100h /* internal DARAM */ B1: org=00300h, len=00100h /* internal DARAM */ SARAM: org=00800h, len=00800h /* internal SARAM */ EXTDATA: org=08000h, len=08000h /* external SRAM */,Addr

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论