Can FlexIO only simulate the CLK and MOSI of the SPI bus

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

Can FlexIO only simulate the CLK and MOSI of the SPI bus

Jump to solution
505 Views
LijieDu
Contributor II

I now need to communicate with external devices. The communication protocol is very simple, which is to input the data on the data line into the external communication device at the rising edge of the clock for communication. That is to say, I only need one clock line and data line. Can FlexIO simulate it?

 

something like this below

1693115759964.jpg

 

 

Tags (1)
0 Kudos
1 Solution
458 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @LijieDu 
yes, FlexIO can do this job. We have this application note which describes how to configure the FlexIO for SPI:
https://www.nxp.com/docs/en/application-note/AN12174.pdf
https://www.nxp.com/webapp/Download?colCode=AN12174SW&location=null

There are drivers in SDK and RTD packages for S32K but those are not configurable. You can select only typical modes like SPI, UART etc. Own configuration of FlexIO is not supported by the drivers, you would have to write own code. So, easiest option is to use FlexIO SPI driver in SDK or RTD and just do not use remaining signals.

Regards,
Lukas

View solution in original post

0 Kudos
2 Replies
459 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @LijieDu 
yes, FlexIO can do this job. We have this application note which describes how to configure the FlexIO for SPI:
https://www.nxp.com/docs/en/application-note/AN12174.pdf
https://www.nxp.com/webapp/Download?colCode=AN12174SW&location=null

There are drivers in SDK and RTD packages for S32K but those are not configurable. You can select only typical modes like SPI, UART etc. Own configuration of FlexIO is not supported by the drivers, you would have to write own code. So, easiest option is to use FlexIO SPI driver in SDK or RTD and just do not use remaining signals.

Regards,
Lukas

0 Kudos
440 Views
LijieDu
Contributor II

Thanks! @lukaszadrapa 

I will first run through the SDK and then try writing my own code.

0 Kudos