STM32H747 SDRAM write problem
HI,
I have a strange issue with our STM32H747 board using the IS42S16400J SDRAM chip.
We have been reading the "How to set up the FMC peripheral to interface with... - STMicroelectronics Community" page and this all seems OK.
The differences between the system described and our board is that we have 8 MB RAM instead of 32 MB and we do not use the byte lane select signals (LDQM and UDQM from the SDRAM chip are routed to ground).
When writing to SDRAM, we see (random) writes to the other 32 bits word within the same 64 bits. This is true for both 16 and 32 bits write from the CM7 core.
So writing 0x12345678 to address 0 in the SDRAM results in a random value being written to address 4. Same applies when writing to address 4 - there I see a random value appearing at address 0.
If I first write 0x12345678 to address 0 and then 0xaa55aa55 to address 0x14, I see the value 0x12345678 being writting to address 0x10.
This is almost as if the processor performs a 64 bits write with the lower or upper 32 bits getting the value that has been written to a previous location.
If I write multiple times within the same 64 bits, the values are OK. So if I first read (64 bits) from address 0x10 and write that same value back to 0x10, I can write to any 16 or 32 bits word within the same 64 bits.
It is almost as if the SDRAM writes are almost 64 bits with some data being cached within the CM7/cache/AXI bus/FMC. I checked to see that the SDRAM is set to non-buffered and non cachable. A similar project on the STM32H747 Discovery board works perfectly well so I must be overlooking something.
Any tips or hints on where to look would be great.
Cheers, Rob

