From: Rob Gaddi on
On 5/12/2010 8:42 AM, Bhavik wrote:
> 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.

Wait, what kind of embedded device don't you already know what the data
width of the memory is? Don't you have a line item on a BOM somewhere
that tells you everything you need to know about the RAM?

--
Rob Gaddi, Highland Technology
Email address is currently out of order
From: D Yuniskis on
Marc Jet wrote:
> 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

-----------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That's the key. *EXPLICITLY* set it to 32b wide. Probe
the memory (taking care to understand how a "floating bus"
will be read!!) and determine if it is, in fact, 32b wide.

If not, configure for 16b.

I suspect the OP's problem is the controller defaults to
16b mode. So, the 32b write gets broken into two contiguous
16b writes. Regardless of the actual RAM installed, both
of these writes will succeed -- and read back properly.

BECAUSE THERE IS ALWAYS AT LEAST 16b WIDE MEMORY PRESENT!

The OP needs to *deliberately* force the controller to
operate in 32b mode *before* making his first probe...

> 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?
From: D Yuniskis on
Hi Rob,

Rob Gaddi wrote:

> Wait, what kind of embedded device don't you already know what the data
> width of the memory is? Don't you have a line item on a BOM somewhere
> that tells you everything you need to know about the RAM?

<grin> I often design flexible memory configurations in
products and probe for "what's available" during bootstrap.
I had one design that supported single *bit* increments
in memory widths! :>
From: rickman on
On May 13, 11:39 am, Rob Gaddi <rga...(a)technologyhighland.com> wrote:
> On 5/12/2010 8:42 AM, Bhavik wrote:
>
> > 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.
>
> Wait, what kind of embedded device don't you already know what the data
> width of the memory is?  Don't you have a line item on a BOM somewhere
> that tells you everything you need to know about the RAM?

Maybe the guy writing the software doesn't know who is buying the
hardware next year?


Rick
From: Bhavik on
On May 13, 11:40 pm, rickman <gnu...(a)gmail.com> wrote:
> On May 13, 11:39 am, Rob Gaddi <rga...(a)technologyhighland.com> wrote:
>
>
>
> > On 5/12/2010 8:42 AM, Bhavik wrote:
>
> > > 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.
>
> > Wait, what kind of embedded device don't you already know what the data
> > width of the memory is?  Don't you have a line item on a BOM somewhere
> > that tells you everything you need to know about the RAM?
>
> Maybe the guy writing the software doesn't know who is buying the
> hardware next year?
>
> Rick

Lot of replies!!
The reason why I want to know about data width of the memory is
because I need to setup number of Rows and Columns in the memory
controller.
And these settings depend on the data width of the memory. It can
still work if I setup a bigger value of rows and columns, but It would
create memory aliasing problem (or feature!), which I want to avoid.

And I want to write a generic code which can be used for different
memory sizes and data widths, since my code is going to run on the
same platform with different memory configurations. I already have
devices with different memory configuration on different chip selects,
and there might be more such devices. FYI, I am writing code for
Qualcomm qsd8250 platform.