cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 external sdram strange problem

lbguan
Associate
Posted on August 12, 2016 at 07:27

STM32 external SDRAM(32bit width,FSMC interface) 16bit and 32bit writing OK,but 8bit writing is not OK, shown below,source file is also attached.

 

Test Results

 

uint8_t  write_buf1[100];

write_buf1[0] = 0x01;  //0xC0000000 is 0x01

write_buf1[1] = 0x02;  //0xC0000001 is 0x02

write_buf1[2] = 0x03;  //0xC0000003(not 0xC0000002) is 0xFF !

write_buf1[3] = 0x04;  //0xC0000002 is 0xFF !  

write_buf1[4] = 0x05;  //0xC0000004 is 0x05 

write_buf1[5] = 0x06;  //0xC0000005 is 0x06 

write_buf1[6] = 0x07;  //0xC0000007(not 0xC0000006) is 0xFF !

write_buf1[7] = 0x08;  //0xC0000006 is 0xFF !  

......

Test Conditions

MCU, STM32F746IGTx

SDRAM, Micron MT48LC4M32B2

IDE, MDK 5.15

where might I go wrong? any advice is greatly appreciated!

#sdram-fmc
2 REPLIES 2
troy1818
Senior
Posted on August 13, 2016 at 11:14

Hi,

I would suggest that you revisit the FSMC configuration for the memory chip. Also, take a look at the initiation code for the sdram. Perhaps you can disclose it in this thread ?

If you are using ST HAL library it is the structures in FMC_SDRAM_CommandTypeDef, FMC_SDRAM_TimingTypeDef and SDRAM_HandleTypeDef that are of interest.

Posted on August 15, 2016 at 04:25

Is this a standard board or one you created? You might want to double check the wiring of the Byte-Lane signals. Look for shorts or cross-connections.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..