Yahoo Groups archive

Lpc2000

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

Message

RE: [lpc2000] Re: SPI Performance

2005-02-28 by Ronnie Leighty

I go it to work! But I had to select SSEL other words:

PINSEL0 = 0x00005505;

Boy that blows. I can't use multiple peripherals on that bus unless I
neglect leave SSEL open and use other IO!

Regards

Ronnie Leighty
Principle Engineer
2802 Leslie Rd
Tampa, FL 33619
voice (813) 630-1229 ext. 111
fax     (813) 630-2619


-----Original Message-----
From: haack0815 [mailto:lpc_arm@...]
Sent: Monday, February 28, 2005 10:16 AM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] Re: SPI Performance




--- In lpc2000@yahoogroups.com, "Ronnie Leighty" <rleighty@a...> wrote:
> SPI Related question:
>
> I'm having trouble getting the SPI running on a LPC2119. I have the
below
> setup routines and running in RAM. I'm waiting to probe the clocks but
> nothing is happening. My design is called out to read another uC's
IO that's
> bit bagging byte data out where its sync to operate as a slave
device so its
> IO is tied to the LPC2119 MISO. I don't have my MOSI tied to
anything other
> than a pull-up.
>
> Any help would be greatly appreciated..
>
> Regards
>
>
> 1. SET PORT DIRECTION FOR SPI EVEN THOUGH I THOUGHT SELECTING THE MODULE
> WILL OVERRIDE IT!
> IO0DIR |= (SEQ1 | SEQ3 | VOLTAGEFLT | BYPASS | OVERRIDE | TP3  | RW422 |
> DETRSTn | SCK0 | MOSI0 | SSEL0);
>
> 2. SELECT MODULE
> PINSEL0	0x00001505	turning SPI0 and SSEL0 on!
>
> 3. INIT FUNCTION TO ENABLE SPI AT 25Khz GIVEN 20MHz CLOCK WITH VPB = 0!
> void InitSPI0()
> {
>
>   PINSEL0 |= (SCK_0 | MISO_0 | MOSI_0);
>
>   //Set module as Master
>   S0SPCR |= 0x20; //(MSTR);
>
>   //Set Control Register
>   //S0SPCR |= 0x80; //Enable hardware spi interrrupt
>
>   //Set Clock rate
>   S0SPCCR = 200;  //20Mhz/4 = 5Mhz/200 = 25Khz.
>
> }
>
> 4. SEND BYTE OUT PORT
> void SPI0ByteWrite(char byte)
> {
>   S0SPDR = byte;
> }
>
> Nothing happens! Any clues...
>
> Ronnie Leighty
> Principle Engineer
> 2802 Leslie Rd
> Tampa, FL 33619
> voice (813) 630-1229 ext. 111
> fax     (813) 630-2619
>
>
> -----Original Message-----
> From: James Dabbs [mailto:jdabbs@t...]
> Sent: Monday, February 28, 2005 9:34 AM
> To: lpc2000@yahoogroups.com
> Subject: RE: [lpc2000] Re: SPI Performance
>
>
>
> > The SPI of the LPC213x is 4 times faster (max 30MHz).
>
> OK.  Thanks.  Can you really make use of this speed without a FIFO or
> DMA?
>
>
>
>
> Yahoo! Groups Links

Hi Ronnie,

what have you done with the SSEL0 pin ?
It must be logical high to enable the SPI.

Andreas






Yahoo! Groups Links

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.