Description: 定时器 2 实验
F2812 上有3 个 32 位的 CPU 定时器,本程序主要对 CPU 定时器 2 进行操作,
200MS 产生一次中断。使用时,按以下步骤进行:
(1)点击“CCS”,启动Code Composer Studio 开发环境
(2)点击【project】 【Open…】打开“CpuTimer2”文件夹下的“CpuTimer2.PJT”。
(3)重新编译完毕。
(4)点击【File】 【Load Program…】,选择“CpuTimer2”文件夹下的“DEBUG”
中的“CpuTimer2.OUT”文件,点击【打开】。
长沙智创电子 专业嵌入式(DSP、ARM)系统开发板、解决方案供应商
TMS320F2812 学习板用户手册
0731-2253687 QQ:21483112
(5)点击【Debug】 【Run】或左侧快捷键图标,全速运行。在定时器中断子
函数中,我们打上断点,当定时器2 产生中断时,CCS 就会停在断点处。如下图所示。
注意:TIMER0 属于CPU 外部中断,由PIE 管理,而TIMER2 属于CPU 内部中断,由
CPU 直接管理。两者的具体编程方法有差别,请用户注意软件中的细节。
注:如果发现程序不能正确运行或程序跑飞,可点击CCS 中【Debug】 【Reset CPU】,
然后重新Load 程序。如果还是不能正确运行或程序跑飞,可给学习板和仿真器重新上电。-Timer 2 Experimental
F2812 on three 32-bit CPU timer, this program is the main CPU timer 2
200MS generate an interrupt. Use, follow these steps:
(1) click on the "CCS", start the Code Composer Studio development environment
(2) Click the [project] [Open ...] and open the "CpuTimer2 the folder CpuTimer2.PJT".
(3) re-compile is completed.
(4) Click [File] [the Load the Program ...], select "CpuTimer2" folder under the DEBUG
In the "CpuTimer2.OUT" file, click [Open].
The Changsha Chi Electronics Professional Embedded (DSP, ARM) system development board, and solution providers
TMS320F2812 learning board user manual
0731-2253687 QQ: 21,483,112
(5) Click [Debug] , [Run] or the left side of the shortcut icon, running at full speed. In the timer interrupt sub-
Function, we marked a breakpoint, when Timer 2 to generate an interrupt, the CCS will stop at the breakpoint. As shown below.
Note: TIMER0 belongs to the CPU external interrupts from the PIE m Platform: |
Size: 1024 |
Author:q |
Hits: