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
Solved! Go to Solution.
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
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