Staging:CC3120 SPI Debug Tool

Overview
This is a sample test application for verifying/validating the porting of CC3120 host-driver to a new MCU platform. This applications checks the SPI configuration with CC3120 and confirms the mapping of the SPI interface pins.

Assumption and Knowledge base

 * User will have to build his own project for the platform and need to add the provided files to use the tool.
 * Sample project is provided with CCS for MSP432 LaunchPad.

Environment setup
The user need to build their own project to use the tool to validate the SPI porting. Using the tool will require creating a new project and compiling it.

Using tool with CCS or IAR

 * Open the compiler and create a new project.


 * Add Debugging tool files to the project.
 * Add "main.c" from "spi_debug_tool" folder.


 * Write and add interface communication driver functions to "user.h".
 * sl_DeviceEnable : Enables the device by setting the appropriate GPIO pin high.
 * sl_DeviceDisable : Disables the device by setting the appropriate GPIO pin low.
 * _SlFd_t : Descriptor for SPI interface.
 * sl_IfOpen : Open a SPI interface to communicate with a simplelink device.
 * sl_IfClose : Close the opend SPI interface.
 * sl_IfRead : Read data from the opened SPI communication interface.
 * sl_IfWrite : Write data to opend SPI communication interface.
 * sl_IfRegIntHdlr : Register an interrupt handeler routine for host IRQ.


 * Write and add Board configuration function along with UART interface function to "daignostic.h"
 * UartConfig : Open the application UART channel.
 * UartWrite : Write data to opend UART channel.
 * Init_Clk : Initialize the system clock.
 * StopWDT : Stops the Watch Dog Timer.


 * Add SPI, UART and board configuraton files to the project.


 * Include header file path to the project.
 * Include SPI, UART and Board header file path to project.
 * Include "SimpleLink->Include" and "SimpleLink->Source" path to the project.

Validating the SPI Configuration

 * Connect the board to PC and configure the terminal program for seeing the logs - Detailed instructions are available at http://processors.wiki.ti.com/index.php/CC31xx_&_CC32xx_Terminal_Setting


 * Compile the run the project. On successful testing you will see the below output on the terminal.

Limitations/Known Issues
None