STM32F767 and external SDRAM addressing issue
Hello!
I have my custom board with STM32F767 and external SDRAM (MT48LC4M32B2 - 128MBit) on it.
Basically the connection between them works fine, because I'm able to write and to readout the data. The problem is, that if I try to access an address above the half of my external SDRAM, the the program crash...
Here is the connection between the MCU and SDRAM:
My settings in CubeIDE:
When I read the datasheet of the STM32F7x then it says, that the starting address for the external SDRAM connection shall be the 0xC000 0000:
So I have used this as the starting address for my SDRAM. By this I shall have a maximum address space of 0xC000 0000 - 0xCFFF FFFF.
The connected SDRAM has 4 banks with 4096 rows x 256 columns x 32Bit cell width.
So one bank shall have 1.048.576 cells x 32Bit = 4.194.304Byte and so = 4.194.304 addresses.
This also means that one bank has an address space of 0x0040 0000 (4.194.304Byte) and the whole SDRAM shall have an address space of 0x100 0000 (4 x bank address space).
When I use the memory viewer during debugging, then I can see, that addresses only up to 0x0080 0000 are mapped:
This means, that only 2 banks are mapped. I have set the CubeMX for 4 internal banks, so I'm wondering what I did wrong?
Why the mapping is going only up to the 0xC080 0000?
Thank you for any help on that!
Regards,
Gregor
