完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
320f28335
我编写的程序在ram中运行没有问题。 在flash中不能运行。我学习了你们的帮助文档,下载了你们的在flash中运行的实例,发现可以在flash中运行。我讲实例稍微修改,只修改了bss和ebss部分从l4ram改为外部存储器extmem0,发现程序下载后能正常运行,但是将cpu复位后运行就不对了。。如果问题解决,请回邮件到huangpeng8@163.com.谢谢。 |
|
相关推荐
10 个讨论
|
|
谢谢, extmem0 地址:0x100000,len:0x30000. void UserInit(void) [ #ifdef EXAMPLE_FLASH // EXAMPLE_FLASH, if defined, is in CCS project options // Section .trcdata is generated by DSP/BIOS. // It must be copied from its load to its run address BEFORE main(). memcpy(&trcdata_runstart, &trcdata_loadstart, &trcdata_loadend - &trcdata_loadstart); #endif //--- CPU Initialization InitSysCtrl(); // Initialize the CPU InitPieCtrl(); // Initialize and enable the PIE InitWatchdog(); // Initialize the Watchdog Timer InitGpio(); // Initialize the shared GPIO pins InitXintf(); 。。。 void InitXintf(void) [ EALLOW; XintfRegs.XINTCNF2.bit.XTIMCLK = 1; // write buffering while(XintfRegs.XINTCNF2.bit.WLEVEL != 0); // poll the WLEVEL bit; XintfRegs.XINTCNF2.bit.WRBUFF = 3; // XCLKOUT is disabled XintfRegs.XINTCNF2.bit.CLKOFF = 1; // XCLKOUT = XTIMCLK XintfRegs.XINTCNF2.bit.CLKMODE = 0; SysCtrlRegs.PCLKCR3.bit.DMAENCLK = 1; // DMA Clock SysCtrlRegs.PCLKCR3.bit.XINTFENCLK = 1; // XTIMCLK SysCtrlRegs.PCLKCR3.bit.GPIOINENCLK = 1; // GPIO input clock //all Zone read/write lead/active/trail timing XintfRegs.XTIMING0.bit.X2TIMING = 1;//0;//1; // Zone 0------------------------------------ 。。。 // Zone will not sample XREADY signal XintfRegs.XTIMING0.bit.USEREADY = 0; // XintfRegs.XTIMING0.bit.READYMODE = 1; // sample asynchronous // Size must be either: // 0,1 = x32 or // 1,1 = x16 other values are reserved XintfRegs.XTIMING0.bit.XSIZE = 3; // Zone 6------------------------------------ // When using ready, ACTIVE must be 1 or greater // Lead must always be 1 or greater // Zone write timing XintfRegs.XTIMING6.bit.XWRLEAD = 1;//3; XintfRegs.XTIMING6.bit.XWRACTIVE =1 ;//7; XintfRegs.XTIMING6.bit.XWRTRAIL = 0;//3; // Zone read timing XintfRegs.XTIMING6.bit.XRDLEAD = 1;//3; XintfRegs.XTIMING6.bit.XRDACTIVE = 1;//7; XintfRegs.XTIMING6.bit.XRDTRAIL = 0;//3; // single all Zone read/write lead/active/trail timing XintfRegs.XTIMING6.bit.X2TIMING = 0; // Zone will sample XREADY signal XintfRegs.XTIMING6.bit.USEREADY = 0;// 1; // XintfRegs.XTIMING6.bit.READYMODE = 1; // sample asynchronous // Size must be either: // 0,1 = x32 or // 1,1 = x16 other values are reserved #if DATA_WIDTH >16 XintfRegs.XTIMING6.bit.XSIZE = 1; #else XintfRegs.XTIMING6.bit.XSIZE = 3; #endif // Bank switching // Assume Zone 6 is slow, so add additional BCYC cycles // when ever switching from Zone 6 to another Zone. // This will help avoid bus contention. XintfRegs.XBANK.bit.BANK = 6; XintfRegs.XBANK.bit.BCYC = 6; // double all Zone read/write lead/active/trail timing XintfRegs.XTIMING7.bit.X2TIMING = 1; // Zone will sample XREADY signal XintfRegs.XTIMING7.bit.USEREADY = 1; XintfRegs.XTIMING7.bit.READYMODE = 1; // sample asynchronous // Size must be either: // 0,1 = x32 or // 1,1 = x16 other values are reserved XintfRegs.XTIMING7.bit.XSIZE = 3; // Bank switching // Assume Zone 7 is slow, so add additional BCYC cycles // when ever switching from Zone 6 to another Zone. // This will help avoid bus contention. // XintfRegs.XBANK.bit.BANK = 7; // XintfRegs.XBANK.bit.BCYC = 7; //EDIS; //Force a pipeline flush to ensure that the write to //the last register configured occurs before returning. // EALLOW; // InitXintf16Gpio(); //EALLOW; GpioCtrlRegs.GPCMUX1.bit.GPIO64 = 3; // XD15 GpioCtrlRegs.GPCMUX1.bit.GPIO65 = 3; // XD14 GpioCtrlRegs.GPCMUX1.bit.GPIO66 = 3; // XD13 GpioCtrlRegs.GPCMUX1.bit.GPIO67 = 3; // XD12 GpioCtrlRegs.GPCMUX1.bit.GPIO68 = 3; // XD11 GpioCtrlRegs.GPCMUX1.bit.GPIO69 = 3; // XD10 GpioCtrlRegs.GPCMUX1.bit.GPIO70 = 3; // XD19 GpioCtrlRegs.GPCMUX1.bit.GPIO71 = 3; // XD8 GpioCtrlRegs.GPCMUX1.bit.GPIO72 = 3; // XD7 GpioCtrlRegs.GPCMUX1.bit.GPIO73 = 3; // XD6 GpioCtrlRegs.GPCMUX1.bit.GPIO74 = 3; // XD5 GpioCtrlRegs.GPCMUX1.bit.GPIO75 = 3; // XD4 GpioCtrlRegs.GPCMUX1.bit.GPIO76 = 3; // XD3 GpioCtrlRegs.GPCMUX1.bit.GPIO77 = 3; // XD2 GpioCtrlRegs.GPCMUX1.bit.GPIO78 = 3; // XD1 GpioCtrlRegs.GPCMUX1.bit.GPIO79 = 3; // XD0 GpioCtrlRegs.GPBMUX1.bit.GPIO40 = 3; // XA0/XWE1n GpioCtrlRegs.GPBMUX1.bit.GPIO41 = 3; // XA1 GpioCtrlRegs.GPBMUX1.bit.GPIO42 = 3; // XA2 GpioCtrlRegs.GPBMUX1.bit.GPIO43 = 3; // XA3 GpioCtrlRegs.GPBMUX1.bit.GPIO44 = 3; // XA4 GpioCtrlRegs.GPBMUX1.bit.GPIO45 = 3; // XA5 GpioCtrlRegs.GPBMUX1.bit.GPIO46 = 3; // XA6 GpioCtrlRegs.GPBMUX1.bit.GPIO47 = 3; // XA7 GpioCtrlRegs.GPCMUX2.bit.GPIO80 = 3; // XA8 GpioCtrlRegs.GPCMUX2.bit.GPIO81 = 3; // XA9 GpioCtrlRegs.GPCMUX2.bit.GPIO82 = 3; // XA10 GpioCtrlRegs.GPCMUX2.bit.GPIO83 = 3; // XA11 GpioCtrlRegs.GPCMUX2.bit.GPIO84 = 3; // XA12 GpioCtrlRegs.GPCMUX2.bit.GPIO85 = 3; // XA13 GpioCtrlRegs.GPCMUX2.bit.GPIO86 = 3; // XA14 GpioCtrlRegs.GPCMUX2.bit.GPIO87 = 3; // XA15 GpioCtrlRegs.GPBMUX1.bit.GPIO39 = 3; // XA16 GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 3; // XA17 GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 3; // XA18 GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 3; // XA19 // GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 3; // XREADY // GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 3; // XRNW // GpioCtrlRegs.GPBMUX1.bit.GPIO38 = 3; // XWE0 GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 0; // XREADY GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 0; // XRNW GpioCtrlRegs.GPBMUX1.bit.GPIO38 = 3; // XWE0 GpioCtrlRegs.GPBMUX1.bit.GPIO36 = 3; // XZCS0 GpioCtrlRegs.GPBMUX1.bit.GPIO37 = 3; // XZCS7 GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 3; // XZCS6 EDIS; asm(" RPT #7 || NOP"); ] // end of InitXintf() 问题没有解决。 |
|
|
|
|
|
您好!请在Code Start Branch.asm中,将XINTF引脚配置成XINTF,因为默认是GPIO。再尝试一下。
具体的可以参考下面的代码: *********************************************************************** WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0 .ref _c_int00 .global code_start .ref _InitSysCtrl ;开外设 .ref _xintf_zone6and7_timing ;初始化XINTF总线为16BIT(用户的系统硬件设计相关) *********************************************************************** * Function: codestart section * * Description: Branch to code starting point *********************************************************************** .sect "codestart" code_start: .if WD_DISABLE == 1 LB wd_disable ;Branch to watchdog disable code .else LB _c_int00 ;Branch to start of boot.asm in RTS library .endif ;end codestart section *********************************************************************** * Function: wd_disable * * Description: Disables the watchdog timer *********************************************************************** .if WD_DISABLE == 1 .text wd_disable: SETC OBJMODE ;Set OBJMODE for 28x object code EALLOW ;Enable EALLOW protected register access MOVZ DP, #7029h>>6 ;Set data page for WDCR register MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD EDIS LCR _InitSysCtrl LCR _xintf_zone6and7_timing ;Disable EALLOW protected register access LB _c_int00 ;Branch to start of boot.asm in RTS library .endif ;end wd_disable .end 如果您认为此问题已被解答,请在“这是否解答您的问题” 后,点击“是”按钮! 谢谢您的合作! |
|
|
|
|
|
www033 发表于 2020-5-15 12:57 关于上电复位,请参考TI的标准的复位电路,有些电源芯片本身就包含复位信号输出,例如TPS767D318。 如果用阻容电路,要保证复位信号保持512个Cycle的低电平,再拉高。 如果您认为此问题已被解答,请在“这是否解答您的问题” 后,点击“是”按钮! 谢谢您的合作! |
|
|
|
|
|
www033 发表于 2020-5-15 13:24 你好,如果我要将所有text从内部flash复制到片外RAM运行,在进入_c_int00之前如何预初始化XINTF,在DSP2833x_CodeStartBranch.asm中如何用汇编来实现XINTF和InitSysCtrl函数的调用。我使用您上面的代码试过,没有成功...... |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
666 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
597 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1047 浏览 1 评论
730 浏览 0 评论
普中科技F28335开发板每次上电复位后数码管都会显示,如何熄灭它?
519 浏览 1 评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
157浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
119浏览 14评论
在使用3254进行录音的时候出现一个奇怪的现象,右声道有吱吱声,请教一下,是否是什么寄存器设置存在问题?
123浏览 13评论
TLV320芯片内部自带数字滤波功能,请问linein进来的模拟信号是否是先经过ADC的超采样?
121浏览 12评论
TPA6304-Q1: TPA6304 两片公用一组I2C的话,其中一片配置不成功怎么办
163浏览 10评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 01:07 , Processed in 0.860002 second(s), Total 76, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号