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 */