SPI Driver question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI Driver question

949 Views
liuruowen
Contributor I

ProcessorExpert.pe:

pastedImage_2.png

pastedImage_3.png

Code:   

LPSPI_DRV_MasterInit(LPSPICOM1,&lpspiCom1State,&lpspiCom1_MasterConfig0);
LPSPI_DRV_MasterSetDelay(LPSPICOM1,10,10,10);

unsigned char test_rx[4];
unsigned char test_tx[4] = {0x33,0x55,0xaa,0xcc};
LPSPI_DRV_MasterTransferBlocking(LPSPICOM1,&test_tx[0],&test_rx[0],4,1000);

Result(use Kingst Logic Analyzer tool): OK

pastedImage_1.png

but,i use 

ProcessorExpert.pe:

pastedImage_7.png

pastedImage_8.png

Code:   

LPSPI_DRV_MasterInit(LPSPICOM1,&lpspiCom1State,&lpspiCom1_MasterConfig0);
LPSPI_DRV_MasterSetDelay(LPSPICOM1,10,10,10);

unsigned char test_rx[4];
unsigned char test_tx[4] = {0x33,0x55,0xaa,0xcc};
LPSPI_DRV_MasterTransferBlocking(LPSPICOM1,&test_tx[0],&test_rx[0],4,1000);

Result(use Kingst Logic Analyzer tool): NOK

pastedImage_9.png

So,why is this happening? Are there any configuration issues?

0 Kudos
2 Replies

792 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

Configuration looks fine. Can you share your project?

Razvan

0 Kudos

792 Views
liuruowen
Contributor I

Hello,

   I have found the problem because the MISO port of the DEMO board is damaged. 

    Thank you!

0 Kudos