From: Bhavik on
Hello,

I am working on an embedded device in which I need to configure LPDDR
memory.
Since LPDDR does not always support SRR (status register read)
function, I need to find the data width of the memory manually, and
configure the system memory controller accordingly.

Can someone suggest a way to find this?

Thanks for help in advance.
From: larwe on

> Since LPDDR does not always support SRR (status register read)
> function, I need to find the data width of the memory manually, and
> configure the system memory controller accordingly.

Configure it for 32 bits. Do a test write of 0xaaaabbbb. Look at the
first 4 bytes, if they're not aaaabbbb then it's not 32 bits wide.
From: Bhavik on
> Configure it for 32 bits. Do a test write of 0xaaaabbbb. Look at the
> first 4 bytes, if they're not aaaabbbb then it's not 32 bits wide.

I am sorry, I did not give proper informatio in my mail.
I have already tried this, but what happens is that the data gets
written even thogh it is 16bits wide.
The memory controller seems to perform 2 writes of 16 bits.
Anyway, I need to figure out how many Rows and Column lines should be
used to address the memory, and this configuration depends on whether
memory is 16 bits or 32 bits wide, and also on the size of the memory
(as per JEDEC standard for LPDDR).

Please take this information also into account.

Thanks.
From: Marc Jet on
Please elaborate about the problem.

You say that "the memory controller seems to perform 2 writes of 16
bits". However you also say that you're the one to "configure the
system memory controller".

Can't you just configure it for 32 bit access, and then do the
suggested 0xaaaabbbb test in 32 bit mode, and then configure the
controller AGAIN according to the test result?

Or, if it comes (magically) preconfigured, can't you just read the
configuration registers and thus know what type of memory is currently
configured?

Marc
From: larwe on
On May 13, 6:46 am, Marc Jet <jetm...(a)hotmail.com> wrote:

> You say that "the memory controller seems to perform 2 writes of 16
> bits".  However you also say that you're the one to "configure the

I kind of gave up after reading the OP's second response. If the
memory controller is splitting one 32-bit access into two 16-bit
accesses, then either it's configured for 16 bit mode or it's broken.