cancel
Showing results for 
Search instead for 
Did you mean: 

32bit data is written into external SRAM

lillian_200601
Associate II
Posted on September 15, 2009 at 18:07

32bit data is written into external SRAM

1 REPLY 1
lillian_200601
Associate II
Posted on May 17, 2011 at 09:59

Hi,

I am using STR912FAW44 to develop my project. I try to write a 32-bit data into external 16bit width SRAM. The issue is only low 16bit data is written into external SRAM. I monitor the ALE, Chip select, and WR signal in the oscilloscope, and ALE only triggers one time(see attachment). Can anyone give me some suggestions what wrong with my program.

void EMI_Configuration_SRAM(void)

{

/**************************EMI configuration*********************************/

EMI_InitTypeDef EMI_InitStruct;

/* EMI default configuration : Reset configuration*/

EMI_DeInit();

EMI_StructInit(&EMI_InitStruct);

/* Number of bus turnaround cycles added between read and write accesses.*/

EMI_InitStruct.EMI_Bank_IDCY = 0x3 ;

/* Number of wait states for read accesses*/

EMI_InitStruct.EMI_Bank_WSTRD = 0x3 ;

/* Number of wait states for write accesses*/

EMI_InitStruct.EMI_Bank_WSTWR = 0x3 ;

/*Output enable assertion delay from chip select assertion*/

EMI_InitStruct.EMI_Bank_WSTROEN = 0x2;

/*Write enable assertion delay from chip select assertion*/

EMI_InitStruct.EMI_Bank_WSTWEN = 0x2;

/*This member Controls the memory width*/

EMI_InitStruct.EMI_Bank_MemWidth = EMI_Width_HalfWord;

/*Write protection feature */

EMI_InitStruct.EMI_Bank_WriteProtection = EMI_Bank_NonWriteProtect;

/*Use Bank1 (CS0)*/

EMI_Init( EMI_Bank0, &EMI_InitStruct);

}

Greatly appreciate any suggestions.

Lillian

[ This message was edited by: lillian_200601 on 15-09-2009 21:41 ]