Host Interface
29
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Device
•
Enables communication interface (SPI or UART) with the device
•
Registers the asynchronous events handler
•
Enables the SimpleLink Wi-Fi device
•
Waits for a host IRQ
•
Reads the INIT-complete event
The SimpleLink Wi-Fi device determines one active host interface during this phase (SPI or UART) and
disables the other.
3.4
Host Interface
The SimpleLink Wi-Fi device provides comprehensive networking functionality. To simplify the integration
and development of networking applications a simple, a user-friendly host driver is provided. The
SimpleLink Wi-Fi host driver is responsible for the following:
•
Provide a simple API to the user application
•
Handle communication with the device
•
Build and parse commands
•
Handle asynchronous events
•
Handle flow control for the data path
•
Provide serialization of concurrent commands
•
Work with the existing UART or SPI physical communication interface drivers
•
Provide the ability to work with or without an OS
•
Enable porting to any platform
The SimpleLink Wi-Fi host driver is written in strict ANSI C89 for full compatibility with most embedded
platforms and development environments.
The following information is relevant for the SimpleLink Wi-Fi CC3120 wireless network processor, which
must implement a communication interface with a selected MCU.
The device supports the SPI and UART standard communication interfaces. Binding the communication
interface to the host driver is done by defining the interface functions through the following defines in
user.h:
•
sl_IfOpen
•
sl_IfClose
•
sl_IfRead
•
sl_IfWrite
•
sl_IfRegIntHdlr
More information regarding these functions is in
3.4.1 SPI Interface
The SimpleLink Wi-Fi device runs as a SPI slave and supports a 4-wire SPI interface.
lists the required SPI settings.
Table 3-2. SPI Configuration
Attribute
Value
Clock rate
Up to 20 MHz
Word length
8-bit, 16-bit, 32-bit
Mode
0 (CPOL=0, CPHA=0)
Other
CS required, and cannot be tight to active state
Additional IRQ line required for indicating asynchronous events
from the device