MKW41z connectivity software THCI interface over SPI

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

MKW41z connectivity software THCI interface over SPI

Jump to solution
1,385 Views
gbh
Contributor III

I'm trying to get communications going between a k64 and a MKW41z using the SPI interface. I've got the FSCI messages basically implemented, following the example of the windows/linux driver logic included in the connectivity software, and comparing that output to the output of the test tool. The messages look right when flattened into a byte array, and I'm able to parse them back out of that array. The question I have is: How are messages supposed to be retrieved from the KW41z, since it's not a master on the SPI bus?

previous post: https://community.nxp.com/message/881913?commentID=881913#comment-881913

Labels (3)
1 Solution
920 Views
jc_pacheco
NXP Employee
NXP Employee

Hello Ben, 

The KW41z Host Controlled Device is managed by the SerialManager module which includes THCI support for UART, USB and SPI.

You can select the interface in the file: middleware\wireless\nwk_ip_1.2.0\examples\host_controlled_device\config\config.h

#define THCI_UART_ENABLE 0   //Default is 1
#define THCI_SPI_ENABLE 1     //Default is 0, enable it for SPI‍‍

That will set the SPI interface (slave) for the Host Controlled Device project.

The slave will trigger the master for a TX(see gSerialMgrSlaveDapTxLogicOne_c and  mSpiSlaveDapCfg in SerialManager.c).

Every serial (THCI) packet has a header. When the slave indicates there's pending data, the master should transfer over the SPI the packet header, check in the header the packet length, and then transfer the remaining bytes.

-JC

View solution in original post

0 Kudos
1 Reply
921 Views
jc_pacheco
NXP Employee
NXP Employee

Hello Ben, 

The KW41z Host Controlled Device is managed by the SerialManager module which includes THCI support for UART, USB and SPI.

You can select the interface in the file: middleware\wireless\nwk_ip_1.2.0\examples\host_controlled_device\config\config.h

#define THCI_UART_ENABLE 0   //Default is 1
#define THCI_SPI_ENABLE 1     //Default is 0, enable it for SPI‍‍

That will set the SPI interface (slave) for the Host Controlled Device project.

The slave will trigger the master for a TX(see gSerialMgrSlaveDapTxLogicOne_c and  mSpiSlaveDapCfg in SerialManager.c).

Every serial (THCI) packet has a header. When the slave indicates there's pending data, the master should transfer over the SPI the packet header, check in the header the packet length, and then transfer the remaining bytes.

-JC

0 Kudos