SPI config

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI config

1,057 次查看
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

标记 (2)
0 项奖励
4 回复数

605 次查看
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 项奖励

605 次查看
bensonyeung
Contributor I

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

Benson

0 项奖励

605 次查看
egoodii
Senior Contributor III

I put some optimized full GPIO SPI code in:

Confirming K22F Clock Frequency

0 项奖励

605 次查看
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 项奖励