SPI config

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

SPI config

1,033 Views
bensonyeung
Contributor I

I was using FRDM-KL25Z SPI example code but it seems like it is only limited to 8 or 16-bit data. Is there any other way I can use other method maybe using GPIO and create a 24 or 32bit data instead?

Benson

0 Kudos
4 Replies

581 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Benson,

I think you have to use the GPIO to simulate the SPI if you want to achieve the 24 or 32 bit serial frame size.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

581 Views
bensonyeung
Contributor I

Do you know any example code that use GPIO to simulate SPI?

Benson

0 Kudos

581 Views
egoodii
Senior Contributor III

I put some optimized full GPIO SPI code in:

Confirming K22F Clock Frequency

0 Kudos

581 Views
egoodii
Senior Contributor III

You should be able to use the SPI hardware/code like it is, EXCEPT you just control the slave Chip Select with manual GPIO commands to enclose 'as many transfer sections' as need to be considered by the slave as 'one transaction'.

0 Kudos