TMS570LC4357: Accessing external Asynchronous SRAM through EMIF

Part Number: TMS570LC4357

hi,

I am trying to read/write to/from an external SRAM through TMS570LC4357

Below is the brief of code:

_mpuInit_();
_mpuEnable_();
sciInit();
emif_ASYNC2Init();


EMMIFdataWrite(0x1000,0xAAAA);
EMMIFdataWrite(0x1002,0xAABB);

Data = EMMIFdataRead(0x1000);
sciDisplayData(sciREG3,&Data,2);
sciSendByte(sciREG3, '.');
Data = EMMIFdataRead(0x1002);
sciDisplayData(sciREG3,&Data,2);
sciSendByte(sciREG3, '.');

The Data write seems to be unsuccessful. If i read the location 0x1000 from above code, the data read is some random value. 

I have used the 128K x 16 STATIC RAM (part # IS62WV12816ALL) as the external memory.

The EMIF address lines (A1-A16) and the data lines (D0-D15) of the microcontroller are connected to the external memory address and data lines respectively.

I have attached the HALCOgen configuration file EMIF.hcg. Let, me know if the HALCOgen configurations are wrong.

Please, do the needful.

emif.zip

1 Reply

  • Hello Vivek,

    How do you connect MCU address lines to SRAM chip? The correct connection should be:
    1. EMIF_A[x:0] -- SRAM_A[x+1 : 1]
    2. EMIF_BA[1] -- SRAM_A[0]

    Regards,
    QJ

    Thanks and Regards,
    QJ Wang