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.

Can't access external memory

I found my dsp can't access external memory. It's TI VC33 dsp, but I think it should be similiar to TI 67XX.

As shown below, I wrote some short code to write and read external ram, internal ram, external flash, external cpld, but only internal ram works. 

I measure some pins such as read/write, strb pins with osilloscope, but no signal changing found.  

Maybe it's something wrong with my CMD? What's strange is that when I delet the key sentence marked in red in cmd. The code still make the same result. What's the problem? Thx.

1. CODE:

void main(void)

 

{

unsigned int a, b, c, *d, e, f;

 

  *(unsigned int *)0x808064 = 0x1038;                                         //set primary bus, ready=intrnl, 1 waits and external

 

  *(int*)0x200050 = 0x00000000;   //writ to external ram

  *(int*)0x400000 = 0xcccccccc;   //writ to external flash

  *(int*)0x780040 = 0x11111111; //writ to external cpld 

 *(int*)0x809c00 = 0x22222222;  //writ to internal ram

   b  = *(int*)0x200050;   // read external ram

   c  = *(int*)0x400000;   //read external flash

   f  = *(int*)0x809c00;   //read external cpld

   e  = *(int*)0x780040;   //read internal ram                         

 

   while(1)

   {   };

 

} /* End of Main */

 

2. Program reslute is given below. As you can see, only the internal ram is wroten correctly.

b=11111119

c=CCCCCCCC

f=CCCCCCCC

e=22222222

 

 

 

3. CMD

/* MEMORY MAP FILE FOR PVCA CARD */

 

MEMORY {

 

  PAGE 1: /* MP bit = 1 */

 

                   /* internal CPU ROM        */

 

  ROM     (R   ) : org = 0x000000, len = 0x01000

 

  PAGE 0: /* MP bit = 0 */

 

                   /* flash device Am29F400B -- Total 512k */

  RAMVECT (RWX ) : org = 0x200000, len = 0x00040

  SRAM    (RWX ) : org = 0x200040, len = 0x0FFC0

  BOOTMON (RWX ) : org = 0x400000, len = 0x10000 

  BOOTTBL (RWX ) : org = 0x410000, len = 0x23000

  SYMBOLS (RWX ) : org = 0x433000, len = 0x05000

  FLASH   (RWX ) : org = 0x438000, len = 0x08000

  FLASH2  (RWX ) : org = 0x440000, len = 0x20000   /*128k*/

 

                   /* C30 memory-mapped IO    */

                   /* internal CPU RAM        */

  CPLD   (RWX ) : org = 0x780000, len = 0x01000      

  IRAM2   (RWI ) : org = 0x800000, len = 0x06C00

  IRAM3   (RWI ) : org = 0x806C00, len = 0x01400   

  C30IO   (RWI ) : org = 0x808000, len = 0x01800 

  IRAM    (RWI ) : org = 0x809800, len = 0x00400 

} /* MEMORY */

 

 

SECTIONS

{

         .text:> IRAM2,        PAGE = 0

         .data:> IRAM2,        PAGE = 0

         .bss :> IRAM2,        PAGE = 0

         .cinit:> IRAM2,        PAGE = 0

         .stack:> IRAM,        PAGE = 0

         .const:> IRAM2,        PAGE = 0

 

  

} /* SECTIONS */

 

  • Xu,

    We are working on this issue and will get back.

    Thanks,
    Gaurav

  • How did you configure the external memory interface?

  • Thank you for your attention.

    I have sone new foundings during the debug process these days and wanna share with you.

    I use a CPLD to make the glue logic and control the MCBL/MP mode of the dsp.

    About the problem that the DSP doesn't change the read/write pins, etc, now I found that it's because that there is something wrong with the CPLD, thus it put the dsp into MCBL mode. (The right mode should be MP. Although I still feel strange that why the dsp can still write internal memory in the MCBL mode, now the dsp can make out changable signals after I replaced the CPLD)

    About the problem "What's strange is that when I delet the key sentence marked in red in cmd. The code still make the same result. What's the problem? Thx." TI tech support tell me that it's reasonable. The cmd file only deal with the section assignment. I can write and read the memory directly, no matter how I wrote the CMD.

    Now the dsp still can not communicate with external memory. Maybe there is still something wrong with the glue logic of the CPLD. I am debugging now. I will discuss with you guys if I found new problem. Thank you all.