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.

VC5505 EMIF problem

Hi,

We are testing the asynchronous SRAM connectected to VC5505 through EMIF CS4 space on our own DSP board. We are using a simple loop to write to SRAM but the CPU often stops running unexpectedly in the middle of the loop although there was no breakpoint set at the place. And after that, the emulator (XDS100v2) usually behaves weirdly and we have to power cycle the board. Some observations related to the problem:

1.  The same problem shows up even if we try to write some other EMIF CS space where there were no chips connected.

2.  The DSP seems to behave normally if we are writting to the internnal memory.

3. The DSP seems to behave normally if we use VC5505 usbstick instead of our own board, with the same code.

4. We are able to fill / load  the SRAM  with "Fill memory" and "Save memory" function in the CCS4. (We are using CCS4.2.1).

5. The EMIF WAIT pins on our board are tied to ground and following is the EMIF register setting:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CSL_SYSCTRL_REGS->ESCR = (CSL_SYS_ESCR_BYTEMODE_FULL << CSL_SYS_ESCR_BYTEMODE_SHIFT);

 

CSL_SYSCTRL_REGS->ECDR = (CSL_SYS_ECDR_EDIV_FULLFRATE << CSL_SYS_ECDR_EDIV_SHIFT);

 

CSL_SYSCTRL_REGS->PSRCR = 0x20;

 

CSL_SYSCTRL_REGS->PRCR = (1u << CSL_SYS_PRCR_PG1_RST_SHIFT);  

//Reset EMIF

 

for  (i=0; i< 0xfff; i++) asm(" nop");

 

CSL_EMIF_REGS->EIMCR = 0x003F;

//Disable all EMIF interrupt

CSL_EMIF_REGS->AWCCR1 = 0x0;

//maximum wait cycle = 0;

CSL_EMIF_REGS->AWCCR2 = 0xF0E4;

//Wait PIN active high, Use default wait mapping

CSL_EMIF_REGS->NANDFCR = 0x0;

//Not using NAND for all CS space

 

//CS4 configuration

CSL_EMIF_REGS->ACS4CR1 = 0xFFFD;

CSL_EMIF_REGS->ACS4CR1 = 0x3CFE;

Can someone help to point out the possible resons of this problem? Or which place we should look into? Thanks a lot!.

A Shen

  • Hello,

    Can you provide your project so that we can try here? We may be able to get a clue from your code. 

  • Hi Peter,

    Attached is the project file. Thanks for helping!.

     

    0451.tb_emif.zip

    A shen

  • Hi,

    I have just tried your code on my VC5505 eZdsp, and it ran to completion without getting stuck.

    I will take a closer look at your code and get back to you.

    Is it possible that an interrupt is occurring, and there is no ISR? What is the value of the program counter (PC) after execution stops? Is it consistent? Expected?

    Regards,
    Mark

  • Hi Mark,

    I have tried disabling all the interrupts (IER0,IER1,DBIER0,DBIER1) and the problem still exists.  After execution  stops, the PC looks normal (some place within the loop). But I have also noticed sometime the excution will not stops but it can never reach the next break point (it's like it is taking forever to finish the loop). In these cases, if I stop CPU manually, it either stops in the loop or some emulation errors will show up.  In any of these cases, emulation can not continue afterwards. I am now suspecting is it because when accessing EMIF, the toggling of address / data bus will cause some gliches on the JTAG interface (TDI/TDO/TCK/RTCK etc) and then cause the emulation failure? Just to make it clear, all the problems I am mentioning only happen to our own designed VC5505 board. Since I am not sure the underling mechanics of the emulation, any input on the possible reason that cause the emaultion faiure are very welcome.

    Thanks

     

    A shen

     

  • A shen,

    It is hard for us to figure out what is wrong with your board. A couple of tips, please make sure to pull down the TRST pin, pull up the EMU0 and EMU1 pins.

    You can get the C5515 EVM schematic from this link: http://support.spectrumdigital.com/

    Regards,

    Peter Chung