Page 1 of 1

How to initial SDRAM with AT91SAM9G20

Posted: Thu Mar 26, 2015 11:02 am
by BrilliantDT
I use J-Link to initial two SDRAMs with AT91SAM9G20. An example follows:
monitor writeu32 0xFFFFEF1C = 0x2 // Enable EBI chip select for the SDRAM
monitor writeu32 0xFFFFF870 = 0xFFFF0000 // Enable PC16-PC31 pins
monitor writeu32 0xFFFFF874 = 0x00000000 // Enable PC16-PC31 pins
monitor writeu32 0xFFFFF804 = 0xFFFF0000 // Enable PC16-PC31 pins
monitor writeu32 0xFFFFEA08 = 0xF7339375 // SDRAM configuration for 32MB: Change this one if the SDRAM Size changes
What does 0xFFFFEF1C, 0xFFFFF870, 0xFFFFF874, 0xFFFFF874, 0xFFFFEA08 refer to? I checked the datasheet of AT91SAM9G20, but can not find them. Thanks for detailed instructions.

Re: How to initial SDRAM with AT91SAM9G20

Posted: Fri Mar 27, 2015 9:27 pm
by blue_z
Those are memory addresses.
Study the memory map of the SoC datasheet, and you'll find that those particular addresses correlate to peripheral registers (as device registers are memory mapped in ARM processors).

Regards