How to send more then 8 frames via SPI

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

How to send more then 8 frames via SPI

1,085 Views
Marconi_
Contributor I

Dear all,

Using LPCXPresso55S28 board I try to send 16 bit data via SPI.

I'm using FLEXCOMM2 and I connected my locical analyzer to the board using the pins:

- P18 [15] -> MOSI

- P18 [18] -> SSEL0

- P18[8] -> SCK

Marconi__0-1714293127402.png

 

Using MCUXpressoIDE peripherals configurator I configured FLEXCOMM2 as shown in the picture

Marconi__1-1714293262161.png

I wrote a very simple program to test SPI functionality. It uses an infinite loop where the variable dato is incremented by one and the following routine is called each iteration to send the incremented value over SPI.

 

 

 

SPI_WriteData(FLEXCOMM2_PERIPHERAL, dato,	kSPI_FrameDelay | kSPI_FrameAssert); 

 

 

Then I compiled my program successfully and flashed it to the evaluation board. I observed the output SPI signals using my logic analyzer and noticed that only 8 frames were sent correctly.

Marconi__2-1714294172945.png

The clock of the 9th is not correct, the CS signal remains low and MOSI remains high.

Marconi__0-1714296799382.png

 

 

 

I'm using MCUXpresso IDE v11.8.1_1197 whith SDK_2.x__LPCXpresso55S28 version 2.13.0

Did you have a similar problem?

How did you fixed it ?

Thank you very much for your help and cooperation

regards

0 Kudos
Reply
2 Replies

1,056 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Marconi_ 

How about firstly test the SPI demo under SPI. Does it can work well on your board?

Please contact us if have any issue.

 

BR

Alice

 

0 Kudos
Reply

1,051 Views
Marconi_
Contributor I

SPI SDK demo example works fine. Unfortunately it doesn't use SPI_WriteData function,

 

regards

0 Kudos
Reply