SPI on lpcH2129

hello

I have a problem with the spi0 on a board lpcH2129, I work with µVISION,

the code seems to me correct, but does not work, I sees anything (noise) on the pines spi with the oscillo.

I you joint the code if somebody can help me

thank you


#include <LPC21xx.H> // LPC21xx definitions

static void Write(unsigned char val)

{

IOSET0 = 0x00000080; //

S0SPDR = val; // sent first byte

while(!(S0SPSR & 0x80)); // wait for end of transfer

IOCLR0 = 0x00000080; //

}

static void SPI_Init(void)

{

IODIR0 |= 0x00000080; // for SSEL

IOCLR0 = 0x00000080; //

PINSEL0 |= 0x00001500; // pin config, whithout SSEl

S0SPCCR = 12; // SCK = 1 MHz,

S0SPCR = 0x28; // master mode, MSB first, no interrupt

}

int main (void)

{

SPI_Init();

while(1)

{

Write(0x02);

}

}

From user manual:

Note: LPC2119/2129/2194/2292/2294 configured to operate as SPI master MUST select

SSEL functionality on an apropriate pin and have HIGH level on this pin in order to act

as a master.

Maybe this is your problem?

/Lars

I read that in the lpch2129 datacheet but, it is necessary to put pine SSEL in the high state by software or by puttingin it directly 5v

?

thank you for the assistance

it was necessary to put pine SSEL has 3.3V on the hardware and not by the software.