This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28335编译通过,但无法下载到外部RAM,提示报错



我是使用的是28335,我想要将程序加载到外部RAM里面,下面是我的CMD文件

MEMORY
{
PAGE 0 :
   /* BEGIN is used for the "boot to SARAM" bootloader mode      */
   /* BOOT_RSVD is used by the boot ROM for stack.               */
   /* This section is only reserved to keep the BOOT ROM from    */
   /* corrupting this area during the debug process              */
  
   BEGIN      : origin = 0x000000, length = 0x000002     /* Boot to M0 will go here                      */
   BOOT_RSVD  : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */              
   RAMM0      : origin = 0x000050, length = 0x0003B0

   RAML0      : origin = 0x008000, length = 0x001000   
   RAML1      : origin = 0x009000, length = 0x001500   
   RAML2      : origin = 0x00A500, length = 0x000A00   
   RAML3      : origin = 0x00B000, length = 0x001000
   ZONE6A     : origin = 0x100000, length = 0x00A000    /* XINTF zone 6 - program space */
   CSM_RSVD   : origin = 0x33FF80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
   CSM_PWL    : origin = 0x33FFF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA            */
   ADC_CAL    : origin = 0x380080, length = 0x000009
   RESET      : origin = 0x3FFFC0, length = 0x000002
   IQTABLES   : origin = 0x3FE000, length = 0x000b50
   IQTABLES2  : origin = 0x3FEB50, length = 0x00008c
   FPUTABLES  : origin = 0x3FEBDC, length = 0x0006A0
   BOOTROM    : origin = 0x3FF27C, length = 0x000D44              

        
PAGE 1 :
   RAMM1      : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
   RAML4      : origin = 0x00C000, length = 0x001500   
   RAML5      : origin = 0x00D500, length = 0x000A00   
   RAML6      : origin = 0x00E000, length = 0x001000   
   RAML7      : origin = 0x00F000, length = 0x001000
   ZONE6B     : origin = 0x10A000, length = 0x005000     /* XINTF zone 6 - data space */
}
 
 
SECTIONS
{
   /* Setup for "boot to SARAM" mode:
      The codestart section (found in DSP28_CodeStartBranch.asm)
      re-directs execution to the start of user code.  */
   codestart        : > BEGIN,     PAGE = 0
   ramfuncs         : > RAML0,     PAGE = 0 
   .text            : > ZONE6A,     PAGE = 0
   .cinit           : > RAML0,     PAGE = 0
   .pinit           : > RAML0,     PAGE = 0
   .switch          : > RAML0,     PAGE = 0
  
   .stack           : > RAMM1,     PAGE = 1
   .ebss            : > RAML4,     PAGE = 1
   .econst          : > RAML5,     PAGE = 1     
   .esysmem         : > RAMM1,     PAGE = 1

   IQmath           : > RAML1,     PAGE = 0
   IQmathTables     : > IQTABLES,  PAGE = 0, TYPE = NOLOAD
   IQmathTables2    : > IQTABLES2, PAGE = 0, TYPE = NOLOAD
   FPUmathTables    : > FPUTABLES, PAGE = 0, TYPE = NOLOAD
     
   DMARAML4         : > RAML4,     PAGE = 1
   DMARAML5         : > RAML5,     PAGE = 1
   DMARAML6         : > RAML6,     PAGE = 1
   DMARAML7         : > RAML7,     PAGE = 1
  
   ZONE6DATA        : > ZONE6B,    PAGE = 1 

   .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used                    */
   csm_rsvd         : > CSM_RSVD   PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
   csmpasswds       : > CSM_PWL    PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
  
   /* Allocate ADC_cal function (pre-programmed by factory into TI reserved memory) */
   .adc_cal     : load = ADC_CAL,   PAGE = 0, TYPE = NOLOAD
    
}

主程序中添加了zone6初始化

void Init_zone6(void)
{

    // Make sure the XINTF clock is enabled
 SysCtrlRegs.PCLKCR3.bit.XINTFENCLK = 1;

 // Configure the GPIO for XINTF with a 16-bit data bus
 // This function is in DSP2833x_Xintf.c
 InitXintf16Gpio();

    EALLOW;
    // All Zones---------------------------------
    // Timing for all zones based on XTIMCLK = SYSCLKOUT
    XintfRegs.XINTCNF2.bit.XTIMCLK = 0;
    // Buffer up to 3 writes
    XintfRegs.XINTCNF2.bit.WRBUFF = 3;
    // XCLKOUT is enabled
    XintfRegs.XINTCNF2.bit.CLKOFF = 0;
    // XCLKOUT = XTIMCLK
    XintfRegs.XINTCNF2.bit.CLKMODE = 0;

    // 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;
    XintfRegs.XTIMING6.bit.XWRACTIVE = 2;
    XintfRegs.XTIMING6.bit.XWRTRAIL = 1;
    // Zone read timing
    XintfRegs.XTIMING6.bit.XRDLEAD = 1;
    XintfRegs.XTIMING6.bit.XRDACTIVE = 3;
    XintfRegs.XTIMING6.bit.XRDTRAIL = 0;

    // don't double all Zone read/write lead/active/trail timing
    XintfRegs.XTIMING6.bit.X2TIMING = 0;

    // Zone will not sample XREADY signal
    XintfRegs.XTIMING6.bit.USEREADY = 0;
    XintfRegs.XTIMING6.bit.READYMODE = 0;

    // 1,1 = x16 data bus
    // 0,1 = x32 data bus
    // other values are reserved
    XintfRegs.XTIMING6.bit.XSIZE = 3;
    EDIS;

   //Force a pipeline flush to ensure that the write to
   //the last register configured occurs before returning.
   asm(" RPT #7 || NOP");
}

编译完成后,无法下载,点击Load program,立刻弹出下面提示(图片见附件)

Data verification failed at address 0x100000.Please verify target memory and memory map ”

 希望有人帮忙解答一下!不甚感激!

  • 外扩RAM验证过么?硬件是否正常?

  • 怎么验证外扩RAM是否正常?我使用TI例程中的xintf_run_from工程,发现下载后运行有问题。

    该工程部分代码如下:

    SECTIONS

    {

      /* Setup for "boot to SARAM" mode:

         The codestart section (found in DSP28_CodeStartBranch.asm)

         re-directs execution to the start of user code.  */

      codestart        : > BEGIN,     PAGE = 0

      ramfuncs         : > RAML0,     PAGE = 0  

      .text            : > RAML1,     PAGE = 0

      .cinit           : > RAML0,     PAGE = 0

      .pinit           : > RAML0,     PAGE = 0

      .switch          : > RAML0,     PAGE = 0

      xintffuncs       : LOAD = RAML1,

                         RUN = ZONE7A,

                         LOAD_START(_XintffuncsLoadStart),

                         LOAD_END(_XintffuncsLoadEnd),

                         RUN_START(_XintffuncsRunStart),

                         PAGE = 0

      .stack           : > RAMM1,     PAGE = 1

      .ebss            : > RAML4,     PAGE = 1

      .econst          : > RAML5,     PAGE = 1      

      .esysmem         : > RAMM1,     PAGE = 1

    // These two functions will be loaded into SARAM and copied to

    // XINTF zone 7 for execution

    #pragma CODE_SECTION(cpu_timer0_isr,"xintffuncs");

    #pragma CODE_SECTION(cpu_timer1_isr,"xintffuncs");

    可以下载,但是用CCS3.3观察cpu_timer0_isr、cpu_timer1_isr,没有进入中断,而cpu_timer2_isr有中断计数,

    是不是这样就可以说明外扩RAM没有工作,已经坏掉了。

    外扩RAM有这么脆弱吗?我一直都没使用过外扩RAM,而且这块28335学习板我保护的很好啊,这么一点小板子,就要2980元,很贵的。

    希望您能给予帮助,我该怎么测试外扩RAM是否良好。

    谢谢!

  • 您好!请问您这个问题解决了没有?我也遇到了同样的问题~求答案呀~