DSP28027— DELAY_US总结
2015-10-14 14:26
330 查看
在很多程序中都会调用延时程序DELAY_US(A),在文件DSP281x_Examples.h中有如下宏定义:
#define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE)
- 9.0L) / 5.0L)
DELAY_US(A)必须要在RAM里运行,因此必须使用代码
#ifdef
FLASH
// Copy time critical code and Flash setup code to RAM
// The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
// symbols are created by the linker. Refer to the linker files.
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
InitFlash();
// Call the flash wrapper init function
#endif
把程序从flash搬运到ram中运行,否则的话程序在debug模式下正常,但是release模式下能编译通过但是运行会进入非法中断。
具体做法请参考http://blog.sina.com.cn/s/blog_762cf5f80101asmq.html。
#define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE)
- 9.0L) / 5.0L)
DELAY_US(A)必须要在RAM里运行,因此必须使用代码
#ifdef
FLASH
// Copy time critical code and Flash setup code to RAM
// The RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
// symbols are created by the linker. Refer to the linker files.
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
InitFlash();
// Call the flash wrapper init function
#endif
把程序从flash搬运到ram中运行,否则的话程序在debug模式下正常,但是release模式下能编译通过但是运行会进入非法中断。
具体做法请参考http://blog.sina.com.cn/s/blog_762cf5f80101asmq.html。
相关文章推荐
- linux du 命令
- Error pulling origin: error: The following untracked working tree files would be overwritten by...
- 理解Storm Topology的并发机制
- Sql Server Alter语句
- MVC View中获取action、controller、area名称
- [置顶] 【实验-视频过程】数据库归档日志满了以后
- PreparedStatement
- Vmvare虚拟机vmdk格式转换为 qcow2格式
- eclipse中的js文件报错处理方案
- delete
- linux vi替换命令
- JAVA字符串的方法
- JSTL使用需加入两个jar包:jstl与taglibs
- 【dedecmsv5.7】 获取顶级栏目名称
- JavaScript 空白与换行
- C#调C++动态库Dll C++回调C#函数
- 关 于 Linux 密 码 问 题
- mysql启动时,提示/etc/my.cnf 被忽略的问题处理
- sqoop相关整理记录
- gcc: gcc include path gcc中include文件的搜索路径