SPI config

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SPI config

1,280件の閲覧回数
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 件の賞賛
返信
4 返答(返信)

828件の閲覧回数
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 件の賞賛
返信

828件の閲覧回数
bensonyeung
Contributor I

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

Benson

0 件の賞賛
返信

828件の閲覧回数
egoodii
Senior Contributor III

I put some optimized full GPIO SPI code in:

Confirming K22F Clock Frequency

0 件の賞賛
返信

828件の閲覧回数
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 件の賞賛
返信