AnsweredAssumed Answered

LPC54102 SPI0 & SPI1 Communication issue?

Question asked by Ratheesh T on Mar 24, 2017
Latest reply on Jun 13, 2017 by Ratheesh T

Hi,

       I have LPCXpresso 54102 LQFP64 Rev A (OM13077) development board & using LPCXpresso_8.1.0_597 IDE.

It is running with Cortex M4 processor at 96MHz.

I am executing the default example program "periph_spi_sm_int" to validate SPI protocol with master and slave.

 

I have connected spi0 & spi1 with wire in connector J3 & J1 like below 

     SPI0 SSEL to SPI1 SSEL
     SPI0 CLK to SPI1 CLK
     SPI0 MISO to SPI1 MOSI
     SPI0 MOSI to SPI1 MISO

 

 

SPI communication is working with error(return error C). The below show the o/p which is received in UART terminal

 

 SLAVE [txDoneCount = 16, rxDoneCount = 15]                                     
 MASTER [txDoneCount = 16, rxDoneCount = 16]                                    
                                                                                
TRANSFER COMPLETE: errors = c                                                   
Master total transfer time = 16953uS                                            
Showing data from : Master TX data                                              
            0x0001 0x0002 0x0003 0x0004 0x0005 0x0006 0x0007 0x0008                         
            0x0009 0x000a 0x000b 0x000c 0x000d 0x000e 0x000f 0x0010                         
Showing data from : Master RX data                                              
            0xfffe 0xfffe 0xfffd 0xfffc 0xfffb 0xfffa 0xfff9 0xfff8                         
            0xfff7 0xfff6 0xfff5 0xfff4 0xfff3 0xfff2 0xfff1 0xfff0                         
Showing data from : Slave  TX data                                              
            0xfffe 0xfffd 0xfffc 0xfffb 0xfffa 0xfff9 0xfff8 0xfff7                         
            0xfff6 0xfff5 0xfff4 0xfff3 0xfff2 0xfff1 0xfff0 0xffef                         
Showing data from : Slave  RX data                                              
            0x0001 0x0003 0x0004 0x0005 0x0006 0x0007 0x0008 0x0009                         
            0x000a 0x000b 0x000c 0x000d 0x000e 0x000f 0x0010 0x0000

1. On Master RX data , 0XFFFE received two times & last byte is not received (0xffef)

2. On Slave  RX data , 0x0002 is missed , received only 15 bytes i.e. why last bytes as 0x0000

 

I am running default example only, and didn't modified anything regarding SPI.

 

What will be the problem ?

Can you suggest your ideas to solve this ?

 

 

 

 

 

 

Outcomes