DSP程序Flash程序下载到RAM中运行
来源:互联网 发布:创建表注释sql语句 编辑:程序博客网 时间:2024/05/16 18:58
程序区:最大原则是将经常调度使用的算法模块放片内,TI的CCS中提供了#pragma CODE_SECTION,可以把需要单独控制存放的函数段从.text段中独立出来,从而在.cmd文件中对这些函数段进行单独物理地址映射。
程序烧到flash中后可以运行但是速度慢,如何将程序从flash中下载到RAM中运行?
1.先在cmd文件中进行配置
secureRamFuncs : LOAD = FLASH_E, PAGE = 0 /* Used by InitFlash() in SysCtrl.c */
RUN = PRAMH0, PAGE = 0
LOAD_START(_secureRamFuncs_loadstart),
LOAD_END(_secureRamFuncs_loadend),
RUN_START(_secureRamFuncs_runstart)
2.实现函数处,可以找demo参考
/**********************************************************************
* Function: InitFlash()
* Description: Initializes the F281x flash timing registers.
* Notes:
* 1) This function MUST be executed out of RAM. Executing it out of
* OTP/FLASH will produce unpredictable results.
* 2) The flash registers are code security module protected. Therefore,
* you must either run this function from L0/L1 RAM, or you must
* first unlock the CSM. Note that unlocking the CSM as part of
* the program flow can compromise the code security.
* 3) Final flash characterization needs to be performed by TI. The
* below settings may not meet final specifications, and are for
* example purposes only. Check the latest device datasheet for
* TMS qualified specifications.
**********************************************************************/
#pragma CODE_SECTION(InitFlash, "secureRamFuncs")
void InitFlash(void)
{
asm(" EALLOW"); // Enable EALLOW protected register access
FlashRegs.FPWR.bit.PWR = 3; // Pump and bank set to active mode
FlashRegs.FSTATUS.bit.V3STAT = 1; // Clear the 3VSTAT bit
FlashRegs.FSTDBYWAIT.bit.STDBYWAIT = 0x01FF; // Sleep to standby transition cycles
FlashRegs.FACTIVEWAIT.bit.ACTIVEWAIT = 0x01FF; // Standby to active transition cycles
FlashRegs.FBANKWAIT.bit.RANDWAIT = 5; // Random access waitstates
FlashRegs.FBANKWAIT.bit.PAGEWAIT = 5; // Paged access waitstates
FlashRegs.FOTPWAIT.bit.OPTWAIT = 5; // Random access waitstates
FlashRegs.FOPT.bit.ENPIPE = 1; // Enable the flash pipeline
asm(" EDIS"); // Disable EALLOW protected register access
/*** Force a complete pipeline flush to ensure that the write to the last register
configured occurs before returning. Safest thing is to wait 8 full cycles. ***/
asm(" RPT #7 || NOP");
}
3.主程序开始调用函数之前,就可以了
memcpy( &secureRamFuncs_runstart,
&secureRamFuncs_loadstart,
&secureRamFuncs_loadend - &secureRamFuncs_loadstart);
InitFlash();
- DSP程序Flash程序下载到RAM中运行
- 把DSP TMS320F28XXX的程序段从flash复制到ram中运行
- 把DSP TMS320F28XXX的程序段从flash复制到ram中运行 .
- 把DSP TMS320F28XXX的程序段从flash复制到ram中运行
- 把DSP TMS320F28XXX的程序段从flash复制到ram中运行
- 把DSP TMS320F28XXX的程序段从flash复制到ram中运行
- F2812程序从Flash搬到RAM中运行
- 在TMS320F28XXX DSP上实现从flash拷贝整个程序到ram运行的方法探讨
- keil环境下载程序到RAM中运行
- DSP TMS320FF28335程序从FLASH中拷贝到RAM中的两种方法及FLASH烧写方法
- F2812程序从Flash搬到RAM中运行(调试过程)
- TMS320F28335将程序从FLASH搬移到RAM中运行详细步骤
- DSP28335—把TMS320F28XXX的程序段从flash复制到ram中运行
- DSP28335—把TMS320F28XXX的程序段从flash复制到ram中运行
- 将程序从Flash搬运到RAM中运行总结(转载)
- TMS320F28027将程序下载到flash中运行
- 程序在flash中还是ram中运行
- 程序在flash中还是ram中运行
- 在Linux系统下远程连接oracle的防火墙设置
- 21个受用一生的故事-故事的启迪
- J2EE和.NET平台的技术构成
- 资源连接
- funambol 时间戳
- DSP程序Flash程序下载到RAM中运行
- 自动投票。。。
- 进程
- Web开发中需要了解的东西 (转)
- 控件的老祖宗Control类
- 通过va_list和/dev/kmsg在串口打印调试信息
- oracle导入或者导出数据库、表
- ReadYuvFile
- 不要轻易许下承诺