In my project I use SPI to UART converter IC. In lpc2387 I connect SSP! pins to
that IC. I check my SSP communication it work properly. But in normal mode I
always get 0xFF value from IC. Below is my code
PINSEL0 = 0x005A8000; // uart2,ssp
chip select worl as GPIO it is always 0
ssp ini
PCONP |= (1 << 10); /* by default, it's enabled already, for safety reason
*/
SSP1CR0 = 0x0707; //select 8 bit
SSP1CPSR = 0x08; // select clock
SSP1CR1 = 0x02; // SSP enable
ssp read
while(!(SSP1SR & SSPSR_TNF));
SSP1DR=(unsigned int)send_data;
while ( !(SSP1SR & SSPSR_RNE) );
ssp_return_data=(unsigned int)SSP1DR;
LPC2387 ssp module
Started by ●September 10, 2015
Reply by ●September 10, 20152015-09-10
—
Sent from Mailbox
On Thu, Sep 10, 2015 at 6:36 AM, s...@yahoo.com [lpc2000]
wrote:
> In my project I use SPI to UART converter IC. In lpc2387 I connect SSP! pins to that IC. I check my SSP communication it work properly. But in normal mode I always get 0xFF value from IC. Below is my code
> PINSEL0 = 0x005A8000; // uart2,ssp
> chip select worl as GPIO it is always 0
> ssp ini
>
> PCONP |= (1 << 10); /* by default, it's enabled already, for safety reason */
>
> SSP1CR0 = 0x0707; //select 8 bit
> SSP1CPSR = 0x08; // select clock
> SSP1CR1 = 0x02; // SSP enable
>
> ssp read
> while(!(SSP1SR & SSPSR_TNF));
> SSP1DR=(unsigned int)send_data;
> while ( !(SSP1SR & SSPSR_RNE) );
> ssp_return_data=(unsigned int)SSP1DR;
>
Sent from Mailbox
On Thu, Sep 10, 2015 at 6:36 AM, s...@yahoo.com [lpc2000]
wrote:
> In my project I use SPI to UART converter IC. In lpc2387 I connect SSP! pins to that IC. I check my SSP communication it work properly. But in normal mode I always get 0xFF value from IC. Below is my code
> PINSEL0 = 0x005A8000; // uart2,ssp
> chip select worl as GPIO it is always 0
> ssp ini
>
> PCONP |= (1 << 10); /* by default, it's enabled already, for safety reason */
>
> SSP1CR0 = 0x0707; //select 8 bit
> SSP1CPSR = 0x08; // select clock
> SSP1CR1 = 0x02; // SSP enable
>
> ssp read
> while(!(SSP1SR & SSPSR_TNF));
> SSP1DR=(unsigned int)send_data;
> while ( !(SSP1SR & SSPSR_RNE) );
> ssp_return_data=(unsigned int)SSP1DR;
>
Reply by ●September 10, 20152015-09-10
Reply by ●September 10, 20152015-09-10