MKW41z connectivity software THCI interface over SPI

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

MKW41z connectivity software THCI interface over SPI

跳至解决方案
2,418 次查看
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

标签 (3)
1 解答
1,953 次查看
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 项奖励
回复
1 回复
1,954 次查看
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 项奖励
回复