Yahoo Groups archive

Lpc2000

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

Message

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.


---- 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]

Attachments

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.