EmbeddedRelated.com
Forums
Jacob Beningo
Live online course · Jacob Beningo
AI for Embedded Developers
$100 off for EmbeddedRelated readers until Dec 6 · 5 live sessions, Dec 7-11
Discount ends in
26days 01hrs 40min 35sec
Learn More →

LPC2138: Strange SSP Behavior

Started by tah2k ●January 10, 2005

I'm writing the driver for the LPC2138 SSP block and I am
encountering some strange behavior:

First of all, the user manual states SSPCR1, SSPCPSR, and SSPIMSC
are all reset to 0x0 upon powerup.

I am finding the following values in these registers after reset:
SSPCR1 (0xE005C004): 0xF8
SSPCPSR (0xE005C010): 0x04
SSPIMSC (0xE005C014): 0x04

The processor ignores any writes of any data value to these
locations.

Any ideas?

-Tim




An Engineer's Guide to the LPC2100 Series


Hi

Have you selected the SSP function in PINSEL0 or PINSEL1 ? best regards

John

--- In , "tah2k" <tah2k@y...> wrote:
>
> I'm writing the driver for the LPC2138 SSP block and I am
> encountering some strange behavior:
>
> First of all, the user manual states SSPCR1, SSPCPSR, and SSPIMSC
> are all reset to 0x0 upon powerup.
>
> I am finding the following values in these registers after reset:
> SSPCR1 (0xE005C004): 0xF8
> SSPCPSR (0xE005C010): 0x04
> SSPIMSC (0xE005C014): 0x04
>
> The processor ignores any writes of any data value to these
> locations.
>
> Any ideas?
>
> -Tim





Yes, but it doesn't seem to matter.

--- In , "johnnorgaard2003" <john_2005@c...>
wrote:
>
> Hi
>
> Have you selected the SSP function in PINSEL0 or PINSEL1 ? > best regards
>
> John
>
> --- In , "tah2k" <tah2k@y...> wrote:
> >
> > I'm writing the driver for the LPC2138 SSP block and I am
> > encountering some strange behavior:
> >
> > First of all, the user manual states SSPCR1, SSPCPSR, and
SSPIMSC
> > are all reset to 0x0 upon powerup.
> >
> > I am finding the following values in these registers after reset:
> > SSPCR1 (0xE005C004): 0xF8
> > SSPCPSR (0xE005C010): 0x04
> > SSPIMSC (0xE005C014): 0x04
> >
> > The processor ignores any writes of any data value to these
> > locations.
> >
> > Any ideas?
> >
> > -Tim




Hi,

Do you have the slave select pin pull high? Charles
-----Original Message-----
From: tah2k [mailto:]
Sent: Tuesday, January 11, 2005 9:59 AM
To:
Subject: [lpc2000] Re: LPC2138: Strange SSP Behavior

Yes, but it doesn't seem to matter.

--- In , "johnnorgaard2003" <john_2005@c...>
wrote:
>
> Hi
>
> Have you selected the SSP function in PINSEL0 or PINSEL1 ? > best regards
>
> John
>
> --- In , "tah2k" <tah2k@y...> wrote:
> >
> > I'm writing the driver for the LPC2138 SSP block and I am
> > encountering some strange behavior:
> >
> > First of all, the user manual states SSPCR1, SSPCPSR, and
SSPIMSC
> > are all reset to 0x0 upon powerup.
> >
> > I am finding the following values in these registers after reset:
> > SSPCR1 (0xE005C004): 0xF8 SSPCPSR (0xE005C010): 0x04
> > SSPIMSC (0xE005C014): 0x04
> >
> > The processor ignores any writes of any data value to these
> > locations.
> >
> > Any ideas?
> >
> > -Tim
Yahoo! Groups Links




It is pulled high, but the issue I am having is the memory locations
themselves.

--- In , "Charles R. Grenz"
<charles.grenz@s...> wrote:
> Hi,
>
> Do you have the slave select pin pull high? > Charles >
> -----Original Message-----
> From: tah2k [mailto:tah2k@y...]
> Sent: Tuesday, January 11, 2005 9:59 AM
> To:
> Subject: [lpc2000] Re: LPC2138: Strange SSP Behavior >
>
> Yes, but it doesn't seem to matter.
>
> --- In , "johnnorgaard2003"
<john_2005@c...>
> wrote:
> >
> > Hi
> >
> > Have you selected the SSP function in PINSEL0 or PINSEL1 ?
> >
> >
> > best regards
> >
> > John
> >
> > --- In , "tah2k" <tah2k@y...> wrote:
> > >
> > > I'm writing the driver for the LPC2138 SSP block and I am
> > > encountering some strange behavior:
> > >
> > > First of all, the user manual states SSPCR1, SSPCPSR, and
> SSPIMSC
> > > are all reset to 0x0 upon powerup.
> > >
> > > I am finding the following values in these registers after
reset:
> > > SSPCR1 (0xE005C004): 0xF8 SSPCPSR (0xE005C010): 0x04
> > > SSPIMSC (0xE005C014): 0x04
> > >
> > > The processor ignores any writes of any data value to these
> > > locations.
> > >
> > > Any ideas?
> > >
> > > -Tim >
> Yahoo! Groups Links




Hi

Was just wondering. I have seen strange behavior from the SPI on a
2106 from time to time related to the slave select (may have also been the
programmer!).

I would double check all your clock and divider settings. Any other
registers you are having trouble with as well? Have you tried writing or
reading from the standard SPI?

I'm interested in this because I will be using the SSP very soon
myself.

Regards,
Charles

-----Original Message-----
From: tah2k [mailto:]
Sent: Tuesday, January 11, 2005 11:16 AM
To:
Subject: [lpc2000] Re: LPC2138: Strange SSP Behavior

It is pulled high, but the issue I am having is the memory locations
themselves.

--- In , "Charles R. Grenz"
<charles.grenz@s...> wrote:
> Hi,
>
> Do you have the slave select pin pull high? > Charles >
> -----Original Message-----
> From: tah2k [mailto:tah2k@y...]
> Sent: Tuesday, January 11, 2005 9:59 AM
> To:
> Subject: [lpc2000] Re: LPC2138: Strange SSP Behavior >
>
> Yes, but it doesn't seem to matter.
>
> --- In , "johnnorgaard2003"
<john_2005@c...>
> wrote:
> >
> > Hi
> >
> > Have you selected the SSP function in PINSEL0 or PINSEL1 ?
> >
> >
> > best regards
> >
> > John
> >
> > --- In , "tah2k" <tah2k@y...> wrote:
> > >
> > > I'm writing the driver for the LPC2138 SSP block and I am
> > > encountering some strange behavior:
> > >
> > > First of all, the user manual states SSPCR1, SSPCPSR, and
> SSPIMSC
> > > are all reset to 0x0 upon powerup.
> > >
> > > I am finding the following values in these registers after
reset:
> > > SSPCR1 (0xE005C004): 0xF8 SSPCPSR (0xE005C010): 0x04 SSPIMSC
> > > (0xE005C014): 0x04
> > >
> > > The processor ignores any writes of any data value to these
> > > locations.
> > >
> > > Any ideas?
> > >
> > > -Tim >
> Yahoo! Groups Links
Yahoo! Groups Links



I would check the addresses for the SSP control registers. The user
manual I have (11/22/04) has the following addresses:
SSPCR1 : 0xE0068004
SSPCPSR : 0xE0068010
SSPIMSC : 0xE0068014

The addresses you specify map to the I2C port.

0xE005C004 = I2C1STAT; 0xF8 at reset
0xE005C010 = I2C1SCLH; 0x04 at reset
0xE005C014 = I2C1SCLL; 0x04 at reset

I think this explains your problem.

Good luck,
Ben --- In , "tah2k" <tah2k@y...> wrote:
>
> It is pulled high, but the issue I am having is the memory locations
> themselves.
>
> --- In , "Charles R. Grenz"
> <charles.grenz@s...> wrote:
> > Hi,
> >
> > Do you have the slave select pin pull high?
> >
> >
> > Charles
> >
> >
> >
> > -----Original Message-----
> > From: tah2k [mailto:tah2k@y...]
> > Sent: Tuesday, January 11, 2005 9:59 AM
> > To:
> > Subject: [lpc2000] Re: LPC2138: Strange SSP Behavior
> >
> >
> >
> >
> > Yes, but it doesn't seem to matter.
> >
> > --- In , "johnnorgaard2003"
> <john_2005@c...>
> > wrote:
> > >
> > > Hi
> > >
> > > Have you selected the SSP function in PINSEL0 or PINSEL1 ?
> > >
> > >
> > > best regards
> > >
> > > John
> > >
> > > --- In , "tah2k" <tah2k@y...> wrote:
> > > >
> > > > I'm writing the driver for the LPC2138 SSP block and I am
> > > > encountering some strange behavior:
> > > >
> > > > First of all, the user manual states SSPCR1, SSPCPSR, and
> > SSPIMSC
> > > > are all reset to 0x0 upon powerup.
> > > >
> > > > I am finding the following values in these registers after
> reset:
> > > > SSPCR1 (0xE005C004): 0xF8 SSPCPSR (0xE005C010): 0x04
> > > > SSPIMSC (0xE005C014): 0x04
> > > >
> > > > The processor ignores any writes of any data value to these
> > > > locations.
> > > >
> > > > Any ideas?
> > > >
> > > > -Tim
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links





Yes! Your right. My User Manual is dated August 25, 2004 and both
the I2C and SSP have the same base address!

Thanks a bunch-
Tim --- In , "beedward2" <ben.edwards@u...> wrote:
>
> I would check the addresses for the SSP control registers. The
user
> manual I have (11/22/04) has the following addresses:
> SSPCR1 : 0xE0068004
> SSPCPSR : 0xE0068010
> SSPIMSC : 0xE0068014
>
> The addresses you specify map to the I2C port.
>
> 0xE005C004 = I2C1STAT; 0xF8 at reset
> 0xE005C010 = I2C1SCLH; 0x04 at reset
> 0xE005C014 = I2C1SCLL; 0x04 at reset
>
> I think this explains your problem.
>
> Good luck,
> Ben > --- In , "tah2k" <tah2k@y...> wrote:
> >
> > It is pulled high, but the issue I am having is the memory
locations
> > themselves.
> >
> > --- In , "Charles R. Grenz"
> > <charles.grenz@s...> wrote:
> > > Hi,
> > >
> > > Do you have the slave select pin pull high?
> > >
> > >
> > > Charles
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: tah2k [mailto:tah2k@y...]
> > > Sent: Tuesday, January 11, 2005 9:59 AM
> > > To:
> > > Subject: [lpc2000] Re: LPC2138: Strange SSP Behavior
> > >
> > >
> > >
> > >
> > > Yes, but it doesn't seem to matter.
> > >
> > > --- In , "johnnorgaard2003"
> > <john_2005@c...>
> > > wrote:
> > > >
> > > > Hi
> > > >
> > > > Have you selected the SSP function in PINSEL0 or PINSEL1 ?
> > > >
> > > >
> > > > best regards
> > > >
> > > > John
> > > >
> > > > --- In , "tah2k" <tah2k@y...> wrote:
> > > > >
> > > > > I'm writing the driver for the LPC2138 SSP block and I am
> > > > > encountering some strange behavior:
> > > > >
> > > > > First of all, the user manual states SSPCR1, SSPCPSR, and
> > > SSPIMSC
> > > > > are all reset to 0x0 upon powerup.
> > > > >
> > > > > I am finding the following values in these registers after
> > reset:
> > > > > SSPCR1 (0xE005C004): 0xF8 SSPCPSR (0xE005C010): 0x04
> > > > > SSPIMSC (0xE005C014): 0x04
> > > > >
> > > > > The processor ignores any writes of any data value to these
> > > > > locations.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > -Tim
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links