EmbeddedRelated.com
Forums
Memfault Beyond the Launch

SPI & I2C....NOT GETTING CLOCK OUTPUT

Started by abhay October 14, 2006
hi,
i am trying with SPI code provided for LPC2138 provided on philips
site.but its strange that i am not able to observe the clock output on
CRO. i have tried with a resistor connected in series with clock
output before connecting on CRO probe.also i have provided high to the
SSEL pin of LPC2138 to configure to as master. now i m observing clock
output on its SPICLK pin with common ground.
but i am getting noise signal only.

same problem is with I2C also.
i think problem is not with the code .so please suggest any other
possibility of error that you suspect.

please help ................i am stuck with this problem for many
days.and i am thus not able to proceed with my application further.

is there a port configuration register which will set the alternate use of 
the pins you are trying to use? DO the default to the proper modes for your 
test?
"abhay" <abhaym244@gmail.com> wrote in message 
news:1160836765.842776.266330@f16g2000cwb.googlegroups.com...
> hi, > i am trying with SPI code provided for LPC2138 provided on philips > site.but its strange that i am not able to observe the clock output on > CRO. i have tried with a resistor connected in series with clock > output before connecting on CRO probe.also i have provided high to the > SSEL pin of LPC2138 to configure to as master. now i m observing clock > output on its SPICLK pin with common ground. > but i am getting noise signal only. > > same problem is with I2C also. > i think problem is not with the code .so please suggest any other > possibility of error that you suspect. > > please help ................i am stuck with this problem for many > days.and i am thus not able to proceed with my application further. >
hi
thanks for your reply
yes there is a configuration register for pinouts PINSEL that i hav
configured for my SPI operation.so i dont think there could be any
mistake as such

On Sat, 14 Oct 2006 23:51:48 -0700, abhay wrote:

> yes there is a configuration register for pinouts PINSEL that i hav > configured for my SPI operation.so i dont think there could be any > mistake as such
And is there also a data direction register in which you have set the appropriate pins to be outputs? ~Dave~

> And is there also a data direction register in which you have set the > appropriate pins to be outputs? >
yes there is also a data direction register IODIR .in that i hav configured spiclk pin as output.
Op Mon, 16 Oct 2006 06:23:14 +0200 schreef Dave <dave@comteck.com>:
> On Sat, 14 Oct 2006 23:51:48 -0700, abhay wrote: > >> yes there is a configuration register for pinouts PINSEL that i hav >> configured for my SPI operation.so i dont think there could be any >> mistake as such > > And is there also a data direction register in which you have set the > appropriate pins to be outputs?
Not relevant. PINSEL does that for you, as long as you don't select GPIO for these pins. -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
hi,

please help me out.

i am still not able to get the clock output of SPI.
 And i am not able to find its possible cause
thank you

On Mon, 16 Oct 2006 09:40:43 +0200, Boudewijn Dijkstra wrote:

> Op Mon, 16 Oct 2006 06:23:14 +0200 schreef Dave <dave@comteck.com>: >> And is there also a data direction register in which you have set the >> appropriate pins to be outputs? > > Not relevant. PINSEL does that for you, as long as you don't select GPIO > for these pins.
I don't think PINSEL selects the direction, only the function (at least on the data sheet I've seen). There has to be a way to mode the clock as an input or an output, depending on whether you have a bus master or a slave. OP: Do you have the SPI moded as a bus _master_? Are you using a scope that would show you a single event? Do you have it triggered correctly? Are you seeing any error status from the SPI? Are you getting a chip select? ~Dave~
> I don't think PINSEL selects the direction, only the function (at least > on the data sheet I've seen). There has to be a way to mode the clock as > an input or an output, depending on whether you have a bus master or a > slave.
yes there is IODIR register for that.
> OP: Do you have the SPI moded as a bus _master_? Are you using a scope > that would show you a single event? Do you have it triggered correctly? > Are you seeing any error status from the SPI? Are you getting a chip > select?
yes SPI is configured for master operation.yes the scope could be set to trace single events also. but what do you mean by triggering it correctly ?? what is the use for chip select when spi is configured for master operation already. what error status?? i am polling on master side.
Op Wed, 18 Oct 2006 08:04:20 +0200 schreef abhay <abhaym244@gmail.com>:
>> I don't think PINSEL selects the direction, only the function (at least >> on the data sheet I've seen). There has to be a way to mode the clock as >> an input or an output, depending on whether you have a bus master or a >> slave. > > yes there is IODIR register for that.
No! It isn't. LPC213x User Manual (rev. 01), page 74: "The direction control bit in the IO0DIR register is effective only when the GPIO function is selected for a pin."
>> Do you have it triggered correctly? > but what do you mean by triggering it correctly ??
To let the scope do the work of detecting interesting signal levels. -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/

Memfault Beyond the Launch