Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

LPC2138 SPI Problem

LPC2138 SPI Problem

2006-02-09 by johnleerberg

Hi All
      I have been working with the LPC2138 for about 12 months on and 
off and have had NO problems with getting any of the peripherals 
working until now. 

I have two LPC2138's connected via SPI0 and am intending to setup one 
as a master and the other a slave that adds two serial ports to my 
master.

There are two issues:

1) With MOSI to MOSI, P1.24 (master) to SSEL0 (slave), SCLK0 to SCLK0 
and MISO floating i am seeing a mirror of what is being transmitted 
by the master on the MISO pin of the slave????? And i mean a perfect 
mirror with no time shift, with the 4 channel CRO i am using i can 
overlay one waveform ontop of the other and they match perfectly. Yes 
i have put a multimeter across the pins to check for conductivity and 
no there is no solder across the MOSI and MISO.

2) I can get the SPI interrupt the fire on both the master and the 
slave but randomly the master will just lock up (something i have 
never had happen before). Also the upon power reset the SPI wont 
start but the serial port start perfectly everytime.
My program has three basic sections
a) In main i call an init interrupt routine which initialises the SPI 
port on the master.
b) In my ISR i read the S0SPSR (clear it), write 0xA0 to S0SPCR, 
clear the interrupt by writing 0x01 to S0SPINT, clear the VicVectAddr.
c) In main i write 0x5A to S0SPDR then wait 4ms and repeat (while(1) 
loop)

If anyone can help me it would be greatly appreciated.

Emacs ASM mode

2006-02-09 by George M. Gallant, Jr.

I am looking for an emacs mode script that understands gnu arm
assembler.
The default asm-mode.elc does not highlight the comment "@" or process
lines that start with a label that does not start with an letter.

George


[Non-text portions of this message have been removed]

Re: [lpc2000] LPC2138 SPI Problem

2006-02-10 by Bill Knight

Make sure the SSEL0 pin on the MASTER is configured for SPI usage and
is pulled-up.

Regards
-Bill Knight
R O SOftWare &
http://www.theARMPatch.com
Show quoted textHide quoted text
On Thu, 09 Feb 2006 23:22:36 +0000, johnleerberg wrote:

>Hi All
>      I have been working with the LPC2138 for about 12 months on and 
>off and have had NO problems with getting any of the peripherals 
>working until now. 

>I have two LPC2138's connected via SPI0 and am intending to setup one 
>as a master and the other a slave that adds two serial ports to my 
>master.

>There are two issues:

>1) With MOSI to MOSI, P1.24 (master) to SSEL0 (slave), SCLK0 to SCLK0 
>and MISO floating i am seeing a mirror of what is being transmitted 
>by the master on the MISO pin of the slave????? And i mean a perfect 
>mirror with no time shift, with the 4 channel CRO i am using i can 
>overlay one waveform ontop of the other and they match perfectly. Yes 
>i have put a multimeter across the pins to check for conductivity and 
>no there is no solder across the MOSI and MISO.

>2) I can get the SPI interrupt the fire on both the master and the 
>slave but randomly the master will just lock up (something i have 
>never had happen before). Also the upon power reset the SPI wont 
>start but the serial port start perfectly everytime.
>My program has three basic sections
>a) In main i call an init interrupt routine which initialises the SPI 
>port on the master.
>b) In my ISR i read the S0SPSR (clear it), write 0xA0 to S0SPCR, 
>clear the interrupt by writing 0x01 to S0SPINT, clear the VicVectAddr.
>c) In main i write 0x5A to S0SPDR then wait 4ms and repeat (while(1) 
>loop)

>If anyone can help me it would be greatly appreciated.

>   





> 
>Yahoo! Groups Links



>

RTC Losing ~5 seconds per day

2006-02-10 by Sean

Hi All,

I've got an LPC2148 set up and the RTC is losing about 5 seconds per day, I 
am assuming that my 32.768kHz crystal isn't exact.

Are there any good ways to correct this?  I know this isn't major, but 
that's 2 minutes a month, a little outside of what I'd like to see.

Thanks,

-- Sean

Re: RTC Losing ~5 seconds per day

2006-02-10 by Guillermo Prandi

That's about 60 ppm (or worse). Have you checked your crystal's specs?

You might want to try another crystal. Citizen's CM200S32.768KDZFT 
($.88 at Digikey) is 20 ppm.

Guille

--- In lpc2000@yahoogroups.com, Sean <embeddedrelated@...> wrote:
>
> Hi All,
> 
> I've got an LPC2148 set up and the RTC is losing about 5 seconds 
per day, I 
> am assuming that my 32.768kHz crystal isn't exact.
> 
> Are there any good ways to correct this?  I know this isn't major, 
but 
Show quoted textHide quoted text
> that's 2 minutes a month, a little outside of what I'd like to see.
> 
> Thanks,
> 
> -- Sean
>

RE: [lpc2000] RTC Losing ~5 seconds per day

2006-02-10 by Dan Beadle

Usually, this is because the tank capacitors are too big.  Look at the spec
sheet for the crystal and see what they recommend.  Or try a different spec
crystal. 


The average should be close to dead on once you get the loading right.  But,
you will see some variation from unit to unit, depending upon the accuracy
of components.

 

  _____  
Show quoted textHide quoted text
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf Of
Sean
Sent: Thursday, February 09, 2006 4:28 PM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] RTC Losing ~5 seconds per day

 

Hi All,

I've got an LPC2148 set up and the RTC is losing about 5 seconds per day, I 
am assuming that my 32.768kHz crystal isn't exact.

Are there any good ways to correct this?  I know this isn't major, but 
that's 2 minutes a month, a little outside of what I'd like to see.

Thanks,

-- Sean




SPONSORED LINKS 


Microcontrollers
<http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2
=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.s
ig=mfaAujKZXA2Z_vxre9sGnQ>  

Microprocessor
<http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=M
icroprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig
=9jjd2D3GOLIESVQssLmLsA>  

Intel
<http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrolle
rs&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=
95&.sig=OMnZuqMZX95mgutt4B-tDw>  microprocessors 


Pic
<http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontroller
s&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=9
5&.sig=Malspbd0T4Rq3M4Q0nHrfw>  microcontrollers 

 

 

 

  _____  

YAHOO! GROUPS LINKS 

 

*	 Visit your group "lpc2000 <http://groups.yahoo.com/group/lpc2000> "
on the web.
  
*	 To unsubscribe from this group, send an email to:
 lpc2000-unsubscribe@yahoogroups.com
<mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  
*	 Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service. 

 

  _____  



[Non-text portions of this message have been removed]

Re: [lpc2000] RTC Losing ~5 seconds per day

2006-02-10 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: "Sean" <embeddedrelated@...>
To: <lpc2000@yahoogroups.com>
Sent: Friday, February 10, 2006 12:28 AM
Subject: [lpc2000] RTC Losing ~5 seconds per day


> Hi All,
>
> I've got an LPC2148 set up and the RTC is losing about 5 seconds per day, 
> I
> am assuming that my 32.768kHz crystal isn't exact.
>
> Are there any good ways to correct this?  I know this isn't major, but
> that's 2 minutes a month, a little outside of what I'd like to see.

I've just bought some 32 kHz xtals. They seem to come in two types, 6 pF and 
12 pF load capacitance, that could be the cause of your problem. Also, when 
used in watches they have a trimmer to set the frequency exactly.

Leon

Re: [lpc2000] LPC2138 SPI Problem

2006-02-13 by jk jlkj

Hi John,
   
  Your mail has releived me. I thought i was the only one to face problems with the SPI of phillips. I was facing a similar problem like yours. I have been able to solve the problem partly.
  i.e.
  1. The miror image problem. can be solved by using the opposite modes in the master and slave side i.e if master is MSB the slave should be LSB.
   
  I am still facing a similar problem like yours, which i have not been able to solve as yet.
  I am unable to get the SPI working on power up reset, i.e all the other peripherals work perfect other than SPI. I have used SPI interrupts, & I have to short the reset pin momentarily to ground and reset the controller to make the SPI start working. I hope some one can help me with this problem. 
   
  SPI is really nagging me. Its been over a month now, and i have not been able to get the SPI work on power UP.
   
  Regards,
  Jerome
   
  

johnleerberg <johnleerberg@...> wrote:
  Hi All
      I have been working with the LPC2138 for about 12 months on and 
off and have had NO problems with getting any of the peripherals 
working until now. 

I have two LPC2138's connected via SPI0 and am intending to setup one 
as a master and the other a slave that adds two serial ports to my 
master.

There are two issues:

1) With MOSI to MOSI, P1.24 (master) to SSEL0 (slave), SCLK0 to SCLK0 
and MISO floating i am seeing a mirror of what is being transmitted 
by the master on the MISO pin of the slave????? And i mean a perfect 
mirror with no time shift, with the 4 channel CRO i am using i can 
overlay one waveform ontop of the other and they match perfectly. Yes 
i have put a multimeter across the pins to check for conductivity and 
no there is no solder across the MOSI and MISO.

2) I can get the SPI interrupt the fire on both the master and the 
slave but randomly the master will just lock up (something i have 
never had happen before). Also the upon power reset the SPI wont 
start but the serial port start perfectly everytime.
My program has three basic sections
a) In main i call an init interrupt routine which initialises the SPI 
port on the master.
b) In my ISR i read the S0SPSR (clear it), write 0xA0 to S0SPCR, 
clear the interrupt by writing 0x01 to S0SPINT, clear the VicVectAddr.
c) In main i write 0x5A to S0SPDR then wait 4ms and repeat (while(1) 
loop)

If anyone can help me it would be greatly appreciated.

   





  SPONSORED LINKS 
        Microcontrollers   Microprocessor   Intel microprocessors     Pic microcontrollers 
    
---------------------------------
  YAHOO! GROUPS LINKS 

    
    Visit your group "lpc2000" on the web.
    
    To unsubscribe from this group, send an email to:
 lpc2000-unsubscribe@yahoogroups.com
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

    
---------------------------------
  



				
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[Non-text portions of this message have been removed]

Re: [lpc2000] LPC2138 SPI Problem

2006-02-13 by sig5534@hotmail.com

I had problems with the SPI port months ago as well.  I gave up and wrote my own bit banging code to do the same thing.  SPI is very easy to implement manually.  All I recall right now is that it did not seem to handle 8, 16,  and/or 24 bit data correctly.  Different word sizes seemed to be a problem.  I was very unhappy with the SPI port overall and finally dumped it, switched the pins to I/O, and handled it myself.  That worked right from the start so I never went back to the built-in SPI mode.

Chris.
Show quoted textHide quoted text
---- Original Message ----- 
  From: jk jlkj 
  To: lpc2000@yahoogroups.com 
  Sent: Sunday, February 12, 2006 8:44 PM
  Subject: Re: [lpc2000] LPC2138 SPI Problem


  Hi John,
     
    Your mail has releived me. I thought i was the only one to face problems with the SPI of phillips. I was facing a similar problem like yours. I have been able to solve the problem partly.
    i.e.
    1. The miror image problem. can be solved by using the opposite modes in the master and slave side i.e if master is MSB the slave should be LSB.
     
    I am still facing a similar problem like yours, which i have not been able to solve as yet.
    I am unable to get the SPI working on power up reset, i.e all the other peripherals work perfect other than SPI. I have used SPI interrupts, & I have to short the reset pin momentarily to ground and reset the controller to make the SPI start working. I hope some one can help me with this problem. 
     
    SPI is really nagging me. Its been over a month now, and i have not been able to get the SPI work on power UP.
     
    Regards,
    Jerome
     
    

  johnleerberg <johnleerberg@...> wrote:
    Hi All
        I have been working with the LPC2138 for about 12 months on and 
  off and have had NO problems with getting any of the peripherals 
  working until now. 

  I have two LPC2138's connected via SPI0 and am intending to setup one 
  as a master and the other a slave that adds two serial ports to my 
  master.

  There are two issues:

  1) With MOSI to MOSI, P1.24 (master) to SSEL0 (slave), SCLK0 to SCLK0 
  and MISO floating i am seeing a mirror of what is being transmitted 
  by the master on the MISO pin of the slave????? And i mean a perfect 
  mirror with no time shift, with the 4 channel CRO i am using i can 
  overlay one waveform ontop of the other and they match perfectly. Yes 
  i have put a multimeter across the pins to check for conductivity and 
  no there is no solder across the MOSI and MISO.

  2) I can get the SPI interrupt the fire on both the master and the 
  slave but randomly the master will just lock up (something i have 
  never had happen before). Also the upon power reset the SPI wont 
  start but the serial port start perfectly everytime.
  My program has three basic sections
  a) In main i call an init interrupt routine which initialises the SPI 
  port on the master.
  b) In my ISR i read the S0SPSR (clear it), write 0xA0 to S0SPCR, 
  clear the interrupt by writing 0x01 to S0SPINT, clear the VicVectAddr.
  c) In main i write 0x5A to S0SPDR then wait 4ms and repeat (while(1) 
  loop)

  If anyone can help me it would be greatly appreciated.

     





    SPONSORED LINKS 
          Microcontrollers   Microprocessor   Intel microprocessors     Pic microcontrollers 
      
  ---------------------------------
    YAHOO! GROUPS LINKS 

      
      Visit your group "lpc2000" on the web.
      
      To unsubscribe from this group, send an email to:
  lpc2000-unsubscribe@yahoogroups.com
      
      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

      
  ---------------------------------
    



                          
  ---------------------------------
  Jiyo cricket on Yahoo! India cricket
  Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

  [Non-text portions of this message have been removed]



  SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
        Pic microcontrollers  


------------------------------------------------------------------------------
  YAHOO! GROUPS LINKS 

    a..  Visit your group "lpc2000" on the web.
      
    b..  To unsubscribe from this group, send an email to:
     lpc2000-unsubscribe@yahoogroups.com
      
    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


------------------------------------------------------------------------------



[Non-text portions of this message have been removed]

Re: LPC2138 SPI Problem

2006-02-13 by Guillermo Prandi

I've been using SPI0 in master mode to control a MAX3100 serial port 
with no problems at all. Never used it in slave mode, though.

Guille

--- In lpc2000@yahoogroups.com, jk jlkj <njad2002@...> wrote:
>
> Hi John,
>    
>   Your mail has releived me. I thought i was the only one to face 
problems with the SPI of phillips. I was facing a similar problem 
like yours. I have been able to solve the problem partly.
>   i.e.
>   1. The miror image problem. can be solved by using the opposite 
modes in the master and slave side i.e if master is MSB the slave 
should be LSB.
>    
>   I am still facing a similar problem like yours, which i have not 
been able to solve as yet.
>   I am unable to get the SPI working on power up reset, i.e all the 
other peripherals work perfect other than SPI. I have used SPI 
interrupts, & I have to short the reset pin momentarily to ground and 
reset the controller to make the SPI start working. I hope some one 
can help me with this problem. 
>    
>   SPI is really nagging me. Its been over a month now, and i have 
not been able to get the SPI work on power UP.
>    
>   Regards,
>   Jerome
>    
>   
> 
> johnleerberg <johnleerberg@...> wrote:
>   Hi All
>       I have been working with the LPC2138 for about 12 months on 
and 
> off and have had NO problems with getting any of the peripherals 
> working until now. 
> 
> I have two LPC2138's connected via SPI0 and am intending to setup 
one 
> as a master and the other a slave that adds two serial ports to my 
> master.
> 
> There are two issues:
> 
> 1) With MOSI to MOSI, P1.24 (master) to SSEL0 (slave), SCLK0 to 
SCLK0 
> and MISO floating i am seeing a mirror of what is being transmitted 
> by the master on the MISO pin of the slave????? And i mean a 
perfect 
> mirror with no time shift, with the 4 channel CRO i am using i can 
> overlay one waveform ontop of the other and they match perfectly. 
Yes 
> i have put a multimeter across the pins to check for conductivity 
and 
> no there is no solder across the MOSI and MISO.
> 
> 2) I can get the SPI interrupt the fire on both the master and the 
> slave but randomly the master will just lock up (something i have 
> never had happen before). Also the upon power reset the SPI wont 
> start but the serial port start perfectly everytime.
> My program has three basic sections
> a) In main i call an init interrupt routine which initialises the 
SPI 
> port on the master.
> b) In my ISR i read the S0SPSR (clear it), write 0xA0 to S0SPCR, 
> clear the interrupt by writing 0x01 to S0SPINT, clear the 
VicVectAddr.
> c) In main i write 0x5A to S0SPDR then wait 4ms and repeat (while
(1) 
> loop)
> 
> If anyone can help me it would be greatly appreciated.
> 
>    
> 
> 
> 
> 
> 
>   SPONSORED LINKS 
>         Microcontrollers   Microprocessor   Intel 
microprocessors     Pic microcontrollers 
>     
> ---------------------------------
>   YAHOO! GROUPS LINKS 
> 
>     
>     Visit your group "lpc2000" on the web.
>     
>     To unsubscribe from this group, send an email to:
>  lpc2000-unsubscribe@yahoogroups.com
>     
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
>     
> ---------------------------------
>   
> 
> 
> 
> 				
> ---------------------------------
>  Jiyo cricket on Yahoo! India cricket
> Yahoo! Messenger Mobile Stay in touch with your buddies all the 
time.
Show quoted textHide quoted text
> 
> [Non-text portions of this message have been removed]
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.