What is the recommended implementation of 3-wire SPI on Kinetis K24F with SDK v2.4.0?

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

What is the recommended implementation of 3-wire SPI on Kinetis K24F with SDK v2.4.0?

736 Views
minibix
Contributor II

I have to integrate a device with 3-wire SPI (CS, SCK and S-IO pins).

I am using the Kinetis K24F chips (specifically, MK24FN1M0VDC12) and MCUX SDK v2.4.0.

What would be the recommended way to implement 3-wire SPI on the hardware and using the SDK?

  • Does the SPI module support bi-directional S-IO pins?
  • Is it acceptable to connect both MCU SIN and SOUT pins to the device's single S-IO pin directly?
  • Does the v2.4.0 SDK support this configuration easily?

Thanks!

0 Kudos
1 Reply

614 Views
miduo
NXP Employee
NXP Employee

Hi,

Yes, the K24 SPI communication is full duplex supported. There has specific register bit to configure in 3-wire mode.

See RM description as follows.

Typical master to slave connections are shown in the following figure.When a data transfer operation is performed, data is serially shifted a predetermined number of bit positions.Because the modules are linked, data is exchanged between the master and the slave. The data that was in the master shift register is now in the shift register of the slave, and vice versa.

So when you just use three wire, the POPR register is getting dummy data when its associated pin is floating. 

pastedImage_1.png

This is from hardware perspective, the 3-wire is working. I am not quite sure if the SDK 2.4 support this feature or not, I will help to double check.

0 Kudos