Home
CC3200 Programmer`s Guide
Contents
1. a App Center Texas Instruments A 3 install Software cc3200 Code Composer Studio Add ONS see more SimpleLink WE CC3200 Ki ei TI RTOS pr E el ink INSTRUMENTS for SimpleLink TEXAS CC3200 Add On TI RTOS for Simple Selected Selected Figure 21 CCS App Center 42 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow 5 3 2 2 Install Tl PinMux Tool The user can install the Tl Pinmux Tool from http www ti com tool pinmuxtoo or as specified in Figure 22 B Getting Started J CCS App Center 53 a App Center Texas Instruments A tool All v Standalone Software sese TI PinMux Tool Figure 22 Tl PinMux Tool SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 43 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated A Texas INSTRUMENTS Foundation SDK Development Flow www ti com 5 3 2 3 Importing a Project The current version of the SDK supports Copy Projects into Workspace allowing the user to modify the example source as per requirement without touching the SDK repository Figure 23 Select CCS Projects to Import KEE Leena Select CCS Projects to
2. driverlib a Available under the driverlib ewarm Release Exe folder simplelink a Available under simplelink ewarm OS simplelink ewarm NON_OS simplelink ewarm NON_OS_PM and simplelink ewarm PM_Framework folder for the OS Non OS Non OS with power management hook and power management configuration for OS environment respectively 38 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow free_rtos a Available under os ib ewarm free_rtos Exe folder tirtos a H application uses TI RTOS then the TI RTOS library is available under the oslib ewarm ti_rtos Exe folder Figure 17 CC3200 IAR Linker Config Category Factory Settings General Options Runtime Checking C C Compiler Assembler Config Library Input Optimizations Advanced Output List AM Po Output Converter Linker configuration file custom Build Override default Build Actions Debugger Simulator Edit Angel CMSIS DAP Configuration file symbol definitions one per line GDB Server c3200_E5_1_2 1 0 IAR ROM monitor I jet ITAGjet J Link J Trace TI Stellaris Macraigor PE micro RDI ST LINK Third Party Driver XDS100 200 ICDI Linker
3. D Ido not accept the agreement lt Back Next gt cancer e Choose an appropriate path to place the package else default is chosen Do you acceptthis license Figure 5 CC3200 SDK Installation 2 ei Setup W A Texas INSTRUMENTS Please specify the directory where CC3200 SDK will be installed Installation Directory 4 EE lt version gt 8 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Getting Started e Proceed with the installation and click Finish once done Figure 6 CC3200 SDK Installation 3 TEXAS INSTRUMENTS Please wait while Setup installs CC3200 SDK on your computer Installing Directory already exi C3200SDK cc3200 sdk example email lib ccs exe a SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 9 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Getting Started www ti com 2 2 Package Components Overview Table 1 Package Contents Directory Name Information docs CC3200 Programmer s Guide Documentation for hardware details present in Hard
4. UART GPIO Timer Hibernate Application This application showcases hibernate as a power saving tool in a networking context in this case a UDP client Networking Low power modes HIB UART GPIO Timer Info Center Get Time Application The application connects to an SNTP server and requests for time information Networking Internet Info Center Get Weather Application The application connects to Open Weather Map and requests for weather data Networking Internet Email Application The email application on the CC3200 sends emails via SMTP Networking GPIO UART Timer XMPP Reference Application The application demonstrates the connection scenario with an XMPP server Networking Internet Provisioning WPS This application demonstrates how to use WPS Wi Fi Networking Provisioning GPIO Application provisioning with CC3200 Mode Configuration This application configures the device either to a station or an Networking STA AP mode Application AP mode Serial Wi Fi Application Serial Wi Fi is a capability designed to provide easy self contained terminal access behavior over a UART interface Networking Connection Policy Application The application demonstrates the connection policies in CC3200 The connection policies determine how the CC3200 is connected to AP Networking STA Mode ENT WLAN Application The example demonstrates the conn
5. e To use common interface APIs Include example common folder path CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated JA TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 28 CC3200 CCS Compiling Project 2 sperties Tor wian statio type Filter text gt Resource General 4 Build 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 4 Advanced Options Advanced Debug Options Language Options Predefined Symbols Diagnostic Options Runtime Model Options Advanced Optimizations Entry Exit Hook Options Library Function Assumption Assembler Options File Type Specifier Directory Specifier Default File Extensions Command Files gt ARM Linker ARM Hex Utility Disabled Debug Im gt Parser Preprocessing Option Predefined Symbols Configuration Release Active D Manage Configurations Pre define NAME define D 2820854 USE_TIRTOS SL_PLATFORM_MULTI THREADED Undefine NAME undefine U AH AlL Show advanced settings O Pre define NAME e USE_TIRTOS To use TI RTOS OS APIs e USE_FREERTOS To use Free RTOS OS APIs e SL_PLATFORM_MULTI_THREADED If application uses any OS e ccs For CCS based application SWRU369B June 2014 Revised Mar
6. Crypto UART ADC Demo Application This application showcases the functionality of CC3200 ADC module by ADC UART using the Driverlib APIs PWM Demo Application This application showcases the PWM mode of CC3200 GPTs The general Timer GPIO purpose timers GPTs support a 16 bit pulse width modulation PWM mode with software programmable output inversion of the PWM signal Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 19 Foundation SDK Components 3 4 20 A TEXAS INSTRUMENTS www ti com Application Demo Description Peripheral Feature exercised SDHost Demo Application This application showcases the functionality of SDHost module in CC3200 The Secure Digital Host SD Host controller on CC3200 provides an interface to standard SD memory cards in 1 bit transfer mode and handles the SD protocol and data packing at transmission level with minimum CPU intervention UART SDHOST SDHost FatFS Demo Application This application uses the FatFS to provide the block level read write access to SD card using the SD Host controller on CC3200 UART SDHOST SPI Demo Application The demo application shows the required initialization sequence to enable UART SPI the CC3200 SPI module in full duplex 4 wire master and slave mode s UART dma Application The demo app
7. TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow 5 143 Code Flow Connection void main Starting SimpleLink lRetVal sl_Start 0 0 0 lRetVal WlanConnect lRetVal sl_WlanConnect Wait for WLAN Event while IS_CONNECTED g_ulStatus IS_IP_ACQUIRED g_ulStatus Py following calls depend on user s input at runtime Before proceeding please make sure to have a server waiting on PORT_NUM lRetVal BsdUdpClient PORT_NUM After calling this function you can start sending data to CC3200 IP address on PORT_NUM lRetVal BsdUdpServer PORT_NUM UDP Client int BsdUdpClient unsigned short usPort Open a socket with standard parameters iSockID sl_Socket SL_AF_INET SL_SOCK_DGRAM 0 if 1S0ckID lt 0 error ASSERT_ON_ERROR UCP_CLIENT_FAILED Send packet using the sl_Send API call iStatus sl_SendTo iSockID g_cBsdBuf sTestBufLen 0 SlSockAddr_t amp sAddr iAddrSize if iStatus lt 0 FF error ASSERT_ON_ERROR UCP_CLIENT_FAILED Close the socket sl_Close iSockID SUCCESS Sending the UDP packets is a three step process 1 Open the socket 2 Send the packets 3 Close the socket SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 31 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorpo
8. Description See General for changing tool versions and device settings Restore Defaults Apply SS Geass SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 53 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated A TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com 5 3 2 9 Executing a Project Click on the target configuration under View Figure 33 CC3200 CCS Executing 1 ree TlResource Explorer Project 4 GUI Composer A Y bas Applications Grace Snippets Project Explorer Outline Advice Problems Console Scripting Console Target Configurations Debug Memory Browser PrP rr pp pn PY oF OPONE E Right Click on the User Defined click on Import Target Configuration and select CC3200 ccxml from tools ccs Figure 34 CC3200 CCS Executing 2 m CO AN eo St a type filter text 2 Projects b les User Defined New Target Configuration Import Target Configuration Xx Delete Delete Rename F2 amp Refresh F5 Launch Selected Configuration rr Set as Default Link File To Project gt k Properties Alt Enter Ex Set this new configuration as the default Right click on this configuration and select Launch Selected Configuration 54 CC3200 SimpleLink Wi Fi and loT Solution a Si
9. Development Flow A TEXAS INSTRUMENTS www ti com 5 1 5 Raw Socket Application 5 1 5 1 Application Details The transceiver mode application in the SDK showcases the use of raw socket usage in CC3200 This example demonstrates how to build a proprietary protocol on top of a Wi Fi PHY layer with the user given full flexibility to build their own packet The first two bytes of the raw data are Wi Fi PHY layer specific e 1st byte Wi Fi rate Definition for rate options can be found in wlan h Ratelndex_e structure e 2nd byte 4 bits of power level and 4 bits of preamble type Defining a ping packet as a raw data structure char RawData_Ping wlan header start a 0x88 version type sub type 0x02 Frame control flag 0x2C 0x00 0x00 Ox23 Ox75 0x55 0x55 0x55 destination 0x00 0x22 0x75 0x55 0x55 0x55 bssid 0x08 0x00 0x28 0x19 0x02 0x85 source 0x80 0x42 0x00 0x00 OxAA OxAA 0x03 0x00 0x00 0x00 0x08 0x00 LLC ip header start S 0x45 0x00 0x00 0x54 0x96 OxAl 0x00 0x00 0x40 0x57 OxFA checksum Oxc0 Oxa8 0x01 0x64 ere ip 0xc0 Oxa8 0x01 0x02 dest ip payload ping icmp 0x08 0x00 OxA5 0x51 Ox5E 0x18 0x00 0x00 0x41 0x08 OxBB 0x8D 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0
10. Import wv Select a directory to search For existing CCS Eclipse projects A 0 Select search directory i CC3200SDK_1 0 0 cc3200 sdk Browse Select archive file Browse Discovered projects Y adc CA ti CC3200SDK_1 0 0 cc3200 sdk exam El aes C ti CC3200SDK_1 0 0 cc3200 sdk exam LJ antenna_selection ae oe i C ti CC3 cc3200 sdk exe UY blinky C ti ein cc3200 sdk ex J camera_application C ti CC3200SDK_1 0 0 c EI connection_policy C ti CC3200SDK_1 0 0 cc cre C ti CC3200SDK_1 0 0 cc3200 sdk exam EI deepsleep_nw C ti CC3200SDK_1 0 0 cc3200 E des C ti CC3200SDK_1 0 0 cc3200 sdk exam ET driverlib C ti CC3200SDK_1 0 0 cc3200 sdk c Y email C ti CC3200SDK_1 0 0 cc3200 sdk exa 4 mt S 9 a S S a S S S S E Automatically import r EE projects found in same search directory v Copy projects into workspac Open the Resource Explorer and browse available example projects o If the user copies any library project such as driverlib simplelink or netapps to the workspace and modifies it ensure that the concerning application connects to the latest and modified gt library gt a available in the workspace see Figure 30 MACRO ini This file is used when the user copies any example folder to their working directory and tries to build a CCS project Edit macro
11. Processors 7 6 4M 2B140228 cus Copyright lt C gt 2613 Free Software Foundation Inc License GPLv3 GNU GPL version 3 or later lt http gnu org licenses gpl html gt This is free software you are free to change and redistribute it There is NO WARRANTY to the extent permitted by law Type show copying and show warranty for details This GDB was configured as host i686 w64 mingw32 target arm none eabi For bug reporting instructions please see lt http www gnu org softuare gdb bugs gt Reading symbols from C ti CC32668DK cc3266 sdk example blinky gcc exe blinky ax f done Open On Chip Debugger 0 7 0 2614 05 62 61 43 gt Licensed under GNU GPL v2 For bug reports read http openocd sourceforge net doc doxygen bugs html 6x6666230c in lt gt Loading section text size BxfBB Ima Bx20004000 Loading section data size 6x10 Ima 6x26664f AA Start address x26604788 load size 3856 Transfer rate 46 KB sec 1928 bytes write Breakpoint 1 at 6x20064470 file main c line 172 Main C gt at main c 172 BoardInit gt lt gdb gt continue Continuing Figure 40 Blinky GCC Application On the gdb prompt give a continue command GDB Quick Guide 5 3 4 Setup the Terminal Application To view the UART based application output on the terminal screen the user should setup the terminal application Such as HyperTerminal or TeraTerm Serial port settings e Baud
12. Table 2 CC3200 Prerequisite continued Tools Remarks Location 3 1 3 1 1 CC32xx Programmer Utility Uniflash Tool to download firmware application image and http www ti com tool uniflash certificate to CC3200 device Support Tools HyperTerminal or Teraterm Serial communication tool to communicate over the UART with the CC3200 device Iperf A useful tool for measuring TCP and UDP bandwidth performance FTDI Driver FTDI Windows drivers need to be installed for a tools ftdi successful connection to the CC3200 LP over USB This FTDI connection can be used for debugging over JTAG SWD and communicating over UART Foundation SDK Components The CC3200 Foundation SDK package includes two main building blocks e SimpleLink Library This library hosts APIs that serve the connectivity features e Peripheral Driver Library This library hosts APIs to access MCU peripherals This section also lists the sample and reference applications packaged in the Software Development Kit SimpleLink Component Library SimpleLink Modular Decomposition Figure 7 SimpleLink Modular Composition TI SimpleLink Framework provides a wide set of capabilities including basic device management through wireless network configuration BSD socket services and more For better design granularity these capabilities are segregated into individual modules Each module represents different functionality
13. Texas INSTRUMENTS Foundation SDK Development Flow www ti com Figure 27 CC3200 CCS Compiling Project 1 Properties for wlan_station o 1 Si ez type filter text Include Options AS gt Resource General 4 Build Configuration Release Active D Manage Configurations 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 4 Advanced Options Advanced Debug Options Language Options Add dir to include search path include_path D 2820854 S CG TOOL _ROOT Vinclude CC3200_SDK_ROOT simplelink CC3200_SDK_ROOT simplelink include P rson Preproc ssina Option CC3200_SDK_ROOT simplelink source CC3200_SDK_ROOT example common Predefined Symbols CC3200_SDK_ROOT oslib Diagnostic Options CC3200_SDK_ROOT driverlib Runtime Model Options CC3200_SDK_ROOT inc Advanced Optimizations Entry Exit Hook Options Library Function Assumption Assembler Options File Type Specifier Specify a preinclude file preinclude AH gt 2 Directory Specifier Default File Extensions Command Files gt ARM Linker ARM Hex Utility Disabled Debug 4 m gt 48 O seems Add dir to include search path e To use Driverlib APIs Include driverlib and inc folder path e To use Simplelink APIs Include simplelink simplelink source and simplelink include folder path e To use TI RTOS APIs Include oslib folder path
14. acknowledges and agrees that it is solely responsible for compliance with all legal regulatory and safety related requirements concerning its products and any use of TI components in its applications notwithstanding any applications related information or support that may be provided by TI Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which anticipate dangerous consequences of failures monitor failures and their consequences lessen the likelihood of failures that might cause harm and take appropriate remedial actions Buyer will fully indemnify Tl and its representatives against any damages arising out of the use of any TI components in safety critical applications In some cases TI components may be promoted specifically to facilitate safety related applications With such components TI s goal is to help enable customers to design and create their own end product solutions that meet applicable functional safety standards and requirements Nonetheless such components are subject to these terms No Tl components are authorized for use in FDA Class III or similar life critical medical equipment unless authorized officers of the parties have executed a special agreement specifically governing such use Only those TI components which TI has specifically designated as military grade or enhanced plastic are designed and intended for use in military aerospace applications or environments Bu
15. an AP access point with the SSID for AP stored as a macro in the application Initially the application implements a TCP client and sends 1000 TCP packets to a socket address port number and IP address specified as macros Zero is the expected return code A different return code indicates that a socket error has occurred The default setting is defined as in the following macros which can be changed either in the source code or at runtime define SSID_NAME cc3200demo define IP_ADDR Oxc0a8006E define PORT_NUM 5001 define TCP_PACKET_COUNT 1000 5 1 3 2 Source Files Briefly Explained e main c Main file calls SimpleLink APIs to connect to the network creates a socket and uses it to communicate over TCP by acting as a TCP client or server e pinmux c Pinmux file to mux the device to configure a UART peripheral e startup_ccs c CCS specific vector table implementation for interrupts e uart_if c Common interface file for UART prints e udma_if c Common interface file for UDMA functionalities e startup_ewarm c IAR workbench specific vector table implementation for interrupts Supporting folders files The ewarm folder contains IAR workspace The ccs folder contains CCS Project the driverlib folder contains all the driver files and the simplelink folder contains Simple Link Host Files 5 1 3 3 Code Flow Connection 26 void main Starting SimpleLink lRetVal sl_Start 0 0 0 lRetVal W
16. ee eee ence enna ee eee cease eneenaee eee eneeeeeaeeeaeees 12 e Added Watchdog System Demo TFTP Client and WebSocket Camera to table eeeee cece eee eeeeeeeeeeneeeneeee 19 Deleted security Macro vico ai ic a da ja 22 Added pinmux gpio and uart values EE 22 Updated Code Flow Connect viiicsscinsrievvetidaetvareasedsBadenceaedacsede ceubiadubasdw sdeeesiancdavedseatenssereasabencesaed ees 24 e erer Bes EE 24 Added piInMux And Wart VAES cisco ii cc ci 24 Updated Code Flow COMMECHON ranas a a ii 25 e Updated Application Details section ooocooncccccnncccnncnncccnncnnnonnnnnnccnnnnnncnnnnnnncrnnnnnrrrnnnnrernnnnnnrrrnnnnnnnnnoss 26 Added Uart andiudma MS a 26 s Updated Code Flow Connection sesiririracirinin ni ci A a aaa 27 lt Updated Applicatiom Details oia 30 Added uart and UdMa ValUGS EEN 30 Updated Code Flow Connection ssassn AER ged RARA ARA a a 32 e Added pinmux startup_ccs and startup_ewarM values cece eee eee eee eee eee eee ee eee eee nese eeeeeeeeeeeeeeee 35 v Added NOTERM bullet point eege geess Geeks Se deele bie 38 E e Bi Le 41 Added Importing a Project section EE 44 Added Macro ini paragraph ex er he nn rh ee ee ENEE NN NEEN NR ee 44 sz Added MADE eee ne eh ee ENN 45 Updated lune 46 Updated lee 47 E EE Bee 48 Updated le 51 e Added RAM range for different variants EE 62 Deleted Changed from0x0000042C to OxO000041C nann n nnen n nennen 63 e Changed f
17. ini and assign CC3200_SDK_ROOT to the SDK root path and import the project into the workspace so that the example can connect to the SDK libraries and common files CC3200_SDK_ROOT C TI CC3200SDK_1 0 0 cc3200 sdk 44 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow 5 3 2 4 Creating a Project File gt New gt CCS Project e Target gt Wireless Connectivity MCU e Device gt Variant gt CC3200 e Open Project Option and follow the settings as given in the snapshots For the application to work with TI RTOS ti_rtos_config project must be imported into the CCS workspace Refer to docs CC3200 TI RTOS User Guide pc or http processors wiki ti com index php CC32xx_TI RTOS Figure 24 CC3200 CSS Editing Existing Project r S Properties for wlan_station GE eS type filter text Linked Resources y vv 4 Resource Linked Resources Path Variables Linked Resources Resource miters Path variables specify locations in the file system including other path variables with the syntax S VAR erte The locations of linked resources may be specified relative to these path variables ARM Compiler Defined path variables for resource wlan_station d ARM Linker i Name Value Dee AA E CC3200_SD
18. non OS or power management for OS based applications respectively ti_rtos a and free_rtos a are present under the oslib ccs ti_rtos and oslib ccs free_rtos folders respectively SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 51 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated A Texas INSTRUMENTS Foundation SDK Development Flow www ti com 5 3 2 7 Dependency to Other Project Figure 31 TI RTOS OS Dependency type filter text Build ey vv Resource General 4 Build Configuration Release Active y Manage Configurations 4 ARM Compiler Processor Options Optimization a Builder 2 Behaviour JS Steps oa Variables PS Environment gt Link Order ofS Dependencies Include Options MISRA C 2004 Referenced Project Referenced Build configuration Add 4 Advanced Options Advanced Debug Options i Remove Language Options Parser Preprocessing Opti Predefined Symbols Diagnostic Options Runtime Model Options Advanced Optimizations Entry Exit Hook Options Library Function Assumpt Assembler Options File Type Specifier Directory Specifier Default File Extensions Command Files ARM Linker ARM Hex Utility Disabled Debug m t See General for changing tool versions and device settings Restore Defaults Apply 0 Sh
19. on a connected device such as a PC or Smartphone WebSocket Camera Demonstrates Websocket HTTP Server functionality by transmitting continuous JPEG frames to a websocket client This application requires a camera boosterpack and a connected PC or smartphone with a browser supporting HTML 5 Application Bootloader Showcases the secondary bootloader operations to manage updates to application image HTTP Client Demo Illustrates the usage of HTTP Client library to enable the device as an HTTP client Idle Profile Non OS Exercises the low power modes LPDS using Power Management Framework in a Non OS environment MOTT Client Showcases the device acting as a MQTT client in a fully functional MQTT network MQTT Server Showcases the device acting as an MQTT server capable of managing multiple local clients and allowing the local clients to communicate with remote MQTT clients SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 11 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Getting Started www ti com Table 1 Package Contents continued Directory Name Information e OTA Update Illustrates Over The Air OTA update of service pack user application and user files example Dynamic Library Loader Exercises an approach to enable dynamic loading of an app
20. or capability of the SimpleLink Framework The following list enumerates the different components in the SimpleLink Framework SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 13 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS Foundation SDK Components www ti com Components Functionality device Initializes the host e Controls the communication with the Network Processor wlan Connection to the access point Scan access points e Add Remove access point profiles e WLAN Security socket UDP TCP Client Socket e UDP TCP Server Socket UDP TCP Rx Tx netapp DNS Resolution Ping remote device Address Resolution Protocol netcfg IP MAC address configuration fs File system Read Write 3 1 2 Using the TI SimpleLink Framework TI SimpleLink Framework provides a rich yet simple set of APIs For detailed information on the APIs and their usage refer to the document docs simplelink_api programmers_guide html available in the SDK TI SimpleLink Framework has a ready to use port available in the CC3200 Foundation SDK The source code is also shared if further customization is desired by the developer The following note describes simple possible customizations and the associated procedure Note All modifications and adjustments to the driver should be made in the user
21. scan in the device Networking Scan policies UDP Socket Application This application showcases the device s communication over network using TCP protocols Networking Basics SSL Demo Application This application showcases SSL implementation on CC3200 device Networking SSL NWP Filter Application This application showcases the Rx Filter feature on CC3200 device Networking MAC Filters Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 17 Foundation SDK Components A TEXAS INSTRUMENTS www ti com Application Demo Description Peripheral Feature exercised File Operations Application This application showcases the file operation on the serial flash of the device SFlash File operations Transceiver mode Application The RX Statistics feature inspects the medium in terms of congestion and distance validates he RF hardware and help using the RSSI information Networking Raw sockets GPIO UART Timer Provisioning Smart Config Application The application demonstrates how to associate connect CC31xx CC32xx to any access point Networking Provisioning Deep Sleep Application This application showcases the deepsleep as a power saving tool in a networking context of CC3200 device Networking Low power modes DeepSleep
22. the device will enumerate with one com port CC3200LP Dual Port as in this snapshot Figure 10 CC3200 Programmer Guide Device Manager File Action View Help e m B m E gt gt JE Computer D a Disk drives gt ME Display adapters 4 Human Interface Devices b 4g IDE ATA ATAPI controllers Keyboards a 8 Mice and other pointing devices D HID compliant mouse Aa Monitors S Network e E Intel R Active Management Technology SOL COM3 gt a Processors gt E Sound video and game controllers p JE System devices D e Universal Serial Bus controllers To configure the device into SWD JTAG mode refer to cc3200 sdk docs hardware CC3200 LP_User s guide pdf SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 21 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com 5 5 1 5 1 1 Foundation SDK Development Flow This section familiarizes the developer with the typical development flow using the building blocks hosted in Foundation SDK and emphasizes more of the network aspects of the CC3200 For this purpose a suite of Getting Started applications are presented in the SDK Start with a comprehensive description of these applications build and execute procedure with the IDEs and finally burn the application image in the non
23. the usage of mDNS functionality in CC3200 The application showcases both mDNS advertise and mDNS listen functionality Provisioning AP Demonstrates the AP provisioning feature Mode config Used to switch the CC3200 LP from STA to AP and Vice Versa LED Blink Application Showcases the usage of GPIO DriverLib APIs The LEDs connected to the GPIOs on the LP are used to indicate the GPIO output Timer Demo Application Showcases the usage of Timer DriverLib APIs This application uses 16 bit timers to generate interrupts which in turn toggle the state of the GPIO driving LEDs Watchdog Demo Application Showcases the usage of Watchdog timer WDT DriverLib APIs The objective of this application is to showcase the watchdog timer functionality to reset the system whenever the system fails 10 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Getting Started Table 1 Package Contents continued Directory Name Information example e UART Demo Application Showcases the usage of UART DriverLib APIs The application demonstrates a simple echo of anything the user types on the terminal Interrupt Application Showcases the usage of Interrupt DriverLib APIs This is a sample application to showcase interrupt preemption a
24. the user to interface with a rich repertoire of peripheral systems Refer to the CC3200 Launch Pad user manual SWRU372 for more details Figure 3 CC3200 LaunchPad Platform IDE IAR or TICCS with CC3200 Foundation SDK SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 7 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated A Texas INSTRUMENTS Foundation SDK Getting Started www ti com 2 Foundation SDK Getting Started This section familiarizes the user with installation process and the directory structure of CC3200 Foundation SDK 2 1 Installation Run the installer by double clicking the CC3200 SDK installer e Read and accept the license agreement to proceed Figure 4 CC3200 SDK Installation 1 ES TEXAS INSTRUMENTS Please read the following License Agreement You must accept the terms of this agreement before continuing with the installation Cc3200 SDK with Tools a Source and Object Code Evaluation Development and Demonstration Software License Agreement for Integrators 7 IMPORTANT PLEASE CAREFULLY READ THE FOLLOWING LICENSE AGREEMENT WHICH IS LEGALLY BINDING AFTER YOU READ IT YOU WILL BE ASKED WHETHER YOU ACCEPT AND AGREE TO ITS TERMS DO NOT CLICK I ACCEPT UNLESS 1 YOU WILL USE THE LICENSED MATERIALS FOR YOUR OWN BENEFIT AND PERSONALLY ACCEPT AGREE TO AND INTEND TO BE BOUND at
25. 3200 IAR Download and Run Lag A a File Deg Sele YA NED OIR DAA AA If the application uses UART to print the output on the terminal then the user must setup a terminal application such as HyperTerminal or TeraTerm These are the serial port settings e Baud Rate 115200 e Data 8 bits e Parity none e Stop 1 bit e Flow control none Note To enable UART prints in any application e Add UART_if c h to project and do pinmux for UART peripheral refer to example mode_config pinmux c SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 41 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated IA TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com Disable the NOTERM macro and call InitTerm examplelcommonluart_if c to initialize UART at the start of the application program 5 3 2 Development Environment TI Code Composer Studio Current SDK supports CCS 6 0 1 version The following are the steps to create a new project in CCS environment 5 3 2 1 TI RTOS 2 0 in CCSv6 To install TI RTOS under a CCS environment e Start the CCS and open the app center from the Help gt Getting Started screen e Search CC3200 in the app center which results in CC3200 Add on and TI RTOS for SimpleLink e Select and install in CCS 6 0 1 Figure 21 Fj Getting Started J CCS App Center 52
26. 3200 Peripheral Driver Library Services in HDOM eee e eens seen eeeeeeeeeenenee 63 7 Additional El 65 REVISION HIST Void 66 Revision HiSloM id 66 2 Table of Contents SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated IA TEXAS INSTRUMENTS www ti com List of Figures 1 CC3200 Overview of Peripherals EEN ENEE 2 CC3200 Software Componerts EE 3 ee E LH La nehPad RTE elt LN A CC3200 SDK Installation WE 5 C3200 EELER 6 GC3200 SDK Installation isis ido E es 7 SimpleEink Modular COMpoOSItIOMN xiii ide is 8 GC3200 SimpleLink IAR Contig Switch sic SEENEN EENS EEN 9 63200 CCS SiIMplELINK CONG WI CN a 10 CC3200 Programmer Guide Device Manager 11 TOP Socket Terminal siii A NENNEN A cewe NEE EEGEN g ee E 12 RI E UL 13 CC3200 Transceiver Application on the Hvperterminal eee eee e ence eee renee eee tees seen eeeeeeeeeeee 14 CC3200 Programmer Guide IAR Project Options ooccoccccccncnncnoncncnnncnncnnncnnnnncnncnnnnnnrnnrnnnrnnannnnns 15 CC3200 JAR Compiling Oe Nessert Seat Sg Ge dE ee alates 16 CC3200 JAR Linker Project ociosas e 17 GC3200 1AR Linker Conosco eege ee EENEG eN E EAEE 18 CC3200 JAR Generating Bin aly EE 19 CCS200jIARJEXCCUIING E 20 GG3200 IAR Downloadiatid RU 21 GCS App Gerais 22 TIEPINMUX Ah Ke E 23 Select COS Projects to IMPO rin si NS SN ENEE dee a a 24 03200 CSS Editing Existing Projects iiicici o i 25 GE3200 CCS Creating dE 26
27. CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU Programmer s Guide di TEXAS INSTRUMENTS Literature Number SWRU369B June 2014 Revised March 2015 13 TEXAS INSTRUMENTS Contents 1 UPTO He 113 5 EE 5 1 1 A rae o a e EE E E a AGA S 1 2 Software COMPONSMS e seustieuigeeg cence eege ER ee geE ES EE eebe een 5 1 3 GCS200 LatuinchPad Platform incacinicnin a ii dagegen 7 2 Foundation SDK Getting Started ociicodinicicninn ii id EEN en 8 2 1 Installation A a ca 8 2 2 Package GOMPONEMS EWEN Eege Ee GENEE E 10 2 3 Prerequisite Tools to be Installed AA 12 3 Foundation SDK Components eee ee eee entree eee eee ee ea eee essa ea eee aes sae seen eeeee 13 3 1 simpleLink Component HID Ary electro EN Nee ee d e NE 13 3 2 Peripheral Driver Library EE 16 3 3 Reference Applications 0ccecececeneseneeecereneneneneeeneeneneneneeeneneneeeseneeeneesenesqnanecerenanennenes 17 3 4 EEGEN 20 4 Getting Started with CC3200 Launchpad A 21 5 Foundation SDK Development Flow eee eee e eee e eee ee ee ence eae ea ea esa eseeaeee ea eseeaeseeaees 22 5 1 Simple Networking Applications swiss scecceniccdwicwedcetiicivawindiaie cittaidicaindabiee ecicincainieeind 22 5 2 SIMP ENS E ENEE OSa 36 5 3 Compilation Build and Execution Procedure ooocococccocccnnncnnnccnnccnnnrnnnrrnnnrrnnnrnnnnrnrrrnnnrnnnrranenos 36 5 4 Flashing and Running the bin using Uniflash Tool EN 61 6 CC3200 el 62 6 1 CC3200 Ee el EE 62 6 2 CC
28. ENTS CC3200 ROM Services www ti com 6 6 1 6 1 2 62 CC3200 ROM Services The CC3200 ROM hosts the boot loader and peripheral driver library The peripheral driver library is a collection of routines that abstract the peripheral programming refer to accompanying doxygen output in the CC3200 SDK packages This library is provided in the ROM to let the developer reduce the RAM footprint of the application Boot loader services allow the user to update the application binary image along with other user files in the serial flash and are also responsible for loading the user application from the serial flash to MCU RAM CC3200 Boot Loader The CC3200 boot loader resides in the ROM of the application processor e Update Download The boot loader downloads an application image from the PC to the CC3200 device The Bootloader DNLD functionality is only triggered when the board is in UARTLOAD Sense On Power SOP mode e Bootstrap The boot loader is responsible for scanning a valid application image binary in the serial flash for the CC3200R device Subsequently the image is loaded to internal memory and execution control is passed on to the user program Boot Loader Modes Impact of Device Sense On Power SOP Pin The CC3200 device has three SOP pins A detailed explanation of the functionality is described in the data sheet SWRS166 In the context of the boot loader there are two modes e A setting correspon
29. EXAS INSTRUMENTS www ti com Foundation SDK Development Flow EN cygdrive c ti CC3200SDK cc3200 sdk toals gcc_scripts mk 5 openocd f cc32BB cfy Open On Chip Debugger 0 7 0 lt 20814 B5 62 M1 43 gt Licensed under GNU GPL v2 For bug reports read http openocd sourceforge net doc doxygen bugs Info only one transport option autoselect jtag speed 1060 kHz cc3266_dbginit device 4 2232C deviceID 72467242 SerialNumber cc31B1A Description USB lt gt JTAG SWD A clock speed 1006 kHz JTAG tap cc3200 jrc tap device found x b97cB2F lt mfg BxB17 part Bxh ver BxB gt JTAG tap cc32B88 dap enabled cc3266 cpu hardware has 6 breakpoints 4 watchpoints Figure 39 Connection Output Screen To start debugging using GDB on CC3200 go to lt cc3200 sdk gt tools gcc_scripts and run the following command at the Cygwin prompt arm none eabi gdb x gdbinit lt app axf gt SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 59 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com See for the debugging result of a blinky application from GCC fcygdrive c tifCC3200SDK cc3200 sdk tools gcc_scripts o lem 5 arm none eabi gdb x gdbinit example blinky gcc exe blinky axf GNU gdb lt GNU Tools for ARM Embedded
30. G63200 6ES Gompiling Project sirarin ra 27 GE3200 CCS Compiling Prod a 28 GC3200 CCS Compiling dree 29 Selektioun 30 GC3200 CCS Linking Odre 31 WERTOS OS Dependent EE 32 GC8200 CCS Generating O ai 33 GC3200 Ee Du e E 34 GC3200 CCS Executing Lic ciemaiiainineiaininin a eege ee ege 35 GC3200 CCS Launch Config amic a Se deet ege Ve een end meinen EE eebe a e EN e 36 Target CONIQUTAMON it A AE EEES 37 GE3200 CCS Executing Arrancar 38 GC3200 CCS EXeCutin Dira Es OENE EEE EE EEE E 39 Connection Qutp t SM a 40 Blinky GCC Application ge ica A A SWRU369B June 2014 Revised March 2015 List of Figures Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated A I TEXAS INSTRUMENTS www ti com List of Tables 1 Package Comments consecer cc ewacaevs ges evades dde dee 10 2 GCCS200 PrerequiSite gees deeg es sty Eesen SNE Ee ES ENEE ERKENNEN EES 12 3 Endi ORAM aaneen so 63 4 ROM AP Susini a aa a a a a 63 5 le E 63 List of Tables SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated Programmer s Guide l TO n SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 1 Introduction The CC3200 SimpleLink Wi Fi is the industry s first single chip microcontroller MCU with built in Wi Fi connectivity created for the Internet of Things loT The CC3200 device is a wirel
31. I 1 Add an entry in the file driverlib rom_patch h for all APIs to be patched 2 For example to patch MAP_UARTCharPut and MAP_UARTBreakCtl entries in file rom_patch h e undef ROM_UARTCharPut e undef ROM_UARTBreakCtl 3 Rebuild all the relevant projects that use driver lib APIs Linking with RAM based Peripheral Driver Library To de link all ROM driver lib APIs and use the RAM driver lib APIs follow these steps 1 Remove the global preprocessor define TARGET_IS_CC3200 from all project files that use driver lib APIs 2 Rebuild all the relevant projects that use driver lib APIs CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Additional Resources 7 Additional Resources Visit these links for additional resources on the SimpleLink Wi Fi CC3200 and loT Solution a single chip wireless MCU device e CC32xx Wiki All additional resources e Tl Product Folder for CC32xx e CC32xx SimpleLink Host Driver APIs and CC32xx Peripheral Drivers APIs e CC32xx Technical Reference Manual SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 65 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated IA TEXAS INSTRUMENTS Revision Histo
32. K_ROOT SEEOIECT LOCH CCS_BASE_ROOT D ti ccsv6 ccs_base CCS_INSTALL_ROOT D ti ccsv6 Edit an Existing Path Variable Edit variable s name and path value Name Ko sox ROOT Location Ge Folder Variable Resolved Location C ti CC3200SDK_1 0 0 cc3200 sdk o KA Show advanced settings Add a path variable CC3200_SDK_ROOT in the CCS project which locates to the root folder of the current SDK The user can change this path to point to the desired version of the SDK path This variable can be used to include paths link libraries and common source files SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 45 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated Foundation SDK Development Flow I Texas INSTRUMENTS www ti com Figure 25 CC3200 CCS Creating Project type filter text gt Resource General 4 Build 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 gt Advanced Options gt ARM Linker ARM Hex Utility Disabled Debug General e y E E Main Device Family ARM v Loan mune gt Connection v applies to whole project Manage the project s target configuration automatically Advanced settings Output type Executable v Device endianness Linker command file cc3200v1
33. Link library startup_ewarm c IAR workbench specific vector table implementation for interrupts pinmux c Contains the configurations to mux the device pins uart_if c Common interface file for UART prints Supporting folders files The ewarm folder contains IAR workspace The ccs folder contains CCS Project the driverlib folder contains all the driver files the oslib folder contains the project to build the TI RTOS Free RTOS library and the simplelink folder contains SimpleLink Host Files 24 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow 5 1 2 3 Code Flow Connection void WlanAPMode void pvParameters lRetVal sl Start NULL NULL NULL Configure the networking mode ssid name for AP mode ConfigureMode lRetVal lRetVal sl_WlanSetMode ROLE_AP set SSID name lRetVal sl_WlanSet while IS_IP_ACQUIRED g_ulStatus looping till ip is acquired get network configuration lRetVal sl_NetCfgGet SL_IPV4_STA_P2P_CL_GET_INFO ucDHCP len unsigned char amp ipV4 while IS_IP_LEASED g_ulStatus wating for the STA to connect Ping to connected client iTestResult PingTest ulIpAddr Using the CC3200 as an AP is a two step pr
34. M4_0 Suspended Add Symbols 0x0000230 no symbols are defined for 000002306 g Verify Program Remove All Symbols The execution will stop at the main function Click the Go button or F8 to run For UART based applications configure the terminal application e Baud Rate 115200 e Data 8 bits e Parity none e Stop 1 bit 5 3 3 Development Environment Open Source GCC GDB This platform enables open source tool chains In this section developers can learn how to get started with GCC GDB using the CC3200 LaunchPad including the dependencies associated with the environment setup for Windows OS under Cygwin Included are a few validated sample applications with GCC including building block libraries such as SimpleLink library and peripheral driver library 5 3 3 1 Cygwin Installation Windows Cygwin can be installed by downloading setup x86 exe from http cygwin com install hAtml and running it locally Set the proxy setting in the Cygwin installation window and proceed further CC3200 SDK is ported and tested with the Cygwin 32 bit version only Include the following packages in the Cygwin installation in addition to the base installation The latest versions of all packages should be acceptable Archive unzip Archive zip Devel autoconf Devel automake Devel libtoo Devel make Devel subversion Note if you plan to use TortoiseSVN Windows7 skip this Devel gcc core 9 Devel gcc g 10 Dev
35. OS Simplelink for Non OS Index Build All 2 NON_OS_PM Simplelink for Non_OS with Power Management hook Debug As gt Clean All Y 205 Simplelink with OS config er k Build Selected 4 PM_Framework Simplelink for Power Management framework Compare With D Restore from Local History Properties Alt Enter Description Resource Path Location Type 3 2 Peripheral Driver Library 16 The CC3200 ROM contains the peripheral driver library DriverLib and the boot loader DriverLib can be utilized by applications to reduce their flash footprint allowing the flash or RAM to be used for other purposes such as additional features in the application The Driverlib supports APIs for the modules listed below CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated l TEXAS INSTRUMENTS www ti com 3 3 3 3 1 SWRU369B June 2014 Revised March 2015 e ADC_Analog_to_Digital_Converter_api e AES Advanced_Encryption_Standard_api e Camera ap e CRC_Cyclic_Redundancy_Check_api e DES Data _Encryption_Standard_api e Flash_api e GPIO_General_Purpose_InputOutput_api e HwSpinLock_api e 12C api e 12S api e Interrupt_api e Pin_api e PRCM_Power_Reset_Clock_Module_api e Secure_Digital_Host_api e SHA_Secure_Hash_Algorithm_api e SPI_Serial_Peripheral_Interface_api e Sys
36. Rate 115200 e Data 8 bits e Parity none e Stop 1 bit 60 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow 5 4 Flashing and Running the bin using Uniflash Tool Once finalized the binary images are flashed onto the non volatile serial flash SFlash of the LaunchPad The application starts the execution when the LaunchPad device is powered on The Uniflash tool flashes the binaries onto the SFlash The utility is available at http processors wiki ti com index php Category CCS_UniFlash Follow the Uniflash Quick Start Guide to download the bin file to the CC3200 device Note Connect the SOP 2 jumper on LaunchPad before flashing any image to the device After the flashing is done remove the SOP 2 jumper and reset the board to boot up the application The bin files for the reference examples are available in the folder example lt referenceapp gt ccs Release as generated by CCS and examplel lt referenceapp gt lewarmlReleaselexe as generated by IAR The application image filename must be sys mcuimg bin SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 61 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 Texas INSTRUM
37. SimpleLink by calling the sl_Start API Connect to the AP by calling the sl WlanConnecit API Ping to the AP and external host by calling the sl_ NetAppPingStart API Refer to the main c file of the reference application for more details 5 1 1 4 L 2 3 5 1 2 5 1 2 1 Usage Run the application getting_started_with_wlan_sta from lAR CCS or flash the bin file to the device The device switches to STA mode if it is in the other mode The device tries to connect to open a pre defined AP cc3200demo The red LED glows upon a successful connection The device pings to AP If the ping is successful the green LED glows The device checks for an internet connection by pinging to www ti com If this ping is successful the orange LED glows Getting Started with WLAN AP Application Details This application aims to exhibit the CC3200 device as an AP Developers and users can refer or re use the function while writing a new application The device comes up as an AP access point then waits for a station to connect to it If the connection is successful it pings to that station Zero is the expected return value A different return code indicates that the ping to the station was unsuccessful 5 1 2 2 Source Files Briefly Explained main c Main file creates the SimpleLink task which handles most of the network related operations while a WlanStationMode task makes calls to the network related APIs of the Simple
38. Socket sl_SendTo Sends a Welcome message to the destination IP address given as input The destination IP address is taken from Input 200 packets will be sent to the specific destination address if the address is mentioned in the input If the destination address is not mentioned the message is broadcasted Once this is complete an alert will be given on UART While the device is sending messages Led2 will be on to indicate the device status sl_Bind Binds socket The reception port is taken as 5002 in this application sl_RecvFrom Receives message from Client The device will be waiting for 200 packets to receive Once the device receives 200 packets an alert indicating the same and the source address of the packets will be shown on UART While receiving messages Led4 will be on to indicate the device status sl Close Closes the socket Note Number of packets and port depend on application implementation 5 3 Compilation Build and Execution Procedure Refer to the IAR CCS help documentation that contains detailed information on compiling building and executing user applications The following sections highlight key projects exercised during the development process The basic Wi Fi application is taken up as a reference to demonstrate the development environment Similar procedures apply for any reference application or new developments Most of the steps mentioned here are already performed for all
39. T Watchdog Demo Application This application showcases the watchdog timer functionality to reset the system whenever the system fails WDT GPIO UART UART Demo Application This application showcases the use of UART UART Interrupt Demo Application A sample application showcasing interrupt preemption and tail chaining NVIC UART capabilities DC Demo A sample application showing i2c read write read from features on CC3200 12C UART device MCU Sleep DeepSleep This application exercises the Sleep and DeepSleep functionality of the MCU Low power modes Sleep DeepSleep UART uDMA Application This application showcases different DMA modes of transfer uDMA UART Autorun non OS Application This application showcases the basic packet send and receive functionality of CC3200 in a non OS environment 0 2 AES Demo Application This application showcases the AES Encryption feature on CC3200 device Crypto UART DES Demo Application This application showcases the DES Encryption feature on CC3200 device Crypto UART CRC Demo Application This application showcases the CRC feature on CC3200 device Crypto UART FeeRTOS Demo Application This application showcases the FreeRTOS features like Multiple task creation Inter task communication using queues UART SHA MD5 Demo Application This application showcases the SHA MD5 Hash Algorithm on CC3200 device
40. Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow To receive TCP packets from a TCP client Si H Se GO NS 5 1 3 4 Open the socket Create a TCP server Listen for connection Accept a connection Receive packets Close the socket Usage 1 Setup a serial communication application HyperTerminal TeraTerm For detailed information visit the Setup Terminal on the host PC The settings are Port Enumerated COM port CC3200LP Dual port Baud rate 115200 Data 8 bit Parity None Stop 1 bit Flow control None 2 Run the application tcp_socket from IAR CCS or flash the bin file to device w Connect a PC to the same AP that the device is connected to 4 Get the IP address of the PC and fill this value for the IP_ADDR macro or change the setting as specified in Figure 11 e W COM42 115200baud Tera Term VT File Edit Setup Control Window Help CC3200 TCP Socket Applicat ion onnect ing to AP cc320Ddeno CC3200 device IP address Connecte AP Deng Default settings Default settings SSID Hane cc3200deno PORT 5001 Packet Count 1000 Destination IP 192 168 0 110 Send TCP packets 2 Receive TCP packets B Sett ings Enter the option to use 3 Option to change setting Setti
41. ach supported API Access is made through two levels the main table contains one pointer per peripheral which points to a secondary table that contains one pointer per API associated with that peripheral The main table is located at address 0x0000040C in the ROM The following table shows a small portion of the API tables in a graphical form to illustrate the arrangement of the tables Table 4 ROM APIs ROM_API TABLE at 0x0000040C 0 RESERVED 1 pointer to ROM_UARTTABLE 2 pointer to ROM_TIMERTABLE 3 pointer to ROM_WATCHDOGTABLE 4 pointer to ROM_INTERRUPTTABLE 5 pointer to ROM_UDMATABLE 6 pointer to ROM_PRCMTABLE 7 pointer to ROM_I2CTABLE Table 5 ROM Interrupts ROM_INTERRUPT TABLE 0 pointer to ROM_IntEnable 1 pointer to ROM_IntMasterEnable 2 pointer to ROM_IntMasterDisable The address of the ROM_INTERRUPTTABLE table is located in the memory location at 0x0000041C The address of the ROM_IntMasterEnable function is contained at offset 0x4 from that table In the function documentation ROM_APITABLE is an array of pointers located at 0x0000040C ROM_INTERRUPTTABLE is an array of pointers located at ROM_APITABLE 4 ROM_IntMasterEnable is a function pointer located at ROM_INTERRUPTTABLE 1 SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 63 Table 3 End of RAM END of RAM Exclusively for application Application should be part o
42. art or 0 to quit Common interface files Common interface files are available under the example common folder SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 35 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com 5 2 SimpleLink APIs APIs Description WLAN APIs sl Start This function starts the SimpleLink Networking device This function initializes the communication interface Once this is complete LED1 starts blinking to indicate SI_start is complete and waiting to complete SI_Wlanconnect s _WlanConnect This function connects the device to AP that is specified as parameter Once the connection status is set LED1 will be ON until the device is disconnected from the AP After a successful WLAN connect the name of the AP to which the device is connected is displayed on the terminal sl_lpConfigGet While in DHCP mode this function is used to get an IP address from the associated AP The IP address will be displayed on the terminal so that the client machine iperf PC can make use of this address to connect to the device s _WlanDisconnect This function prompts the device to relinquish the connection hence the association with the AP Note LED functionality depends on application implementation Network APIs sl Socket Creates UDP
43. ch 2015 Submit Documentation Feedback CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 49 Copyright O 2014 2015 Texas Instruments Incorporated Foundation SDK Development Flow 5 3 2 6 Linking a Project I Texas INSTRUMENTS www ti com Figure 29 CC3200 CCS Linking Project 1 type filter text Resource General 4 Build 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 gt Advanced Options 4 ARM Linker Basic Options File Search Path gt Advanced Options ARM Hex Utility Disabled Debug Basic Options D Manage Configurations Configuration Release Active ProjName out romanas Heap size for C C dynamic memory allocation heap_size heap 0x800 Specify output file name output file 0 Input and output sections listed into lt file gt map_file m Set C system stack size stack_size stack 0x800 KA Show advanced settings e Set heap and stack size as per the application requirements 50 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 30 CC3200 CCS Linking Project 2 type filter text File Search Path Py vv gt Resource General 4 Build Config
44. configuration file e Link to IAR linker file By default IAR links to CC3200 icf available in IAR installation The developer can change this as per application requirement Symbol definitions e Define CC3200_ES 1 _2 1 1 only for the XCC3101GZ device and CC3200_ES_1_2 1 0 for other devices SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 39 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated A Texas INSTRUMENTS Foundation SDK Development Flow www ti com 5 3 1 4 Generating the Binary bin Figure 18 CC3200 IAR Generating Binary Options for node wlan_station Category Factory Settings General Options C C Compiler Assembler Output Converter Output Custom Build z Build Actions V Generate additional output Linker Output format Debugger 7 Simulator binay Angel Output file CMSIS DAP FA steen Override default IAR ROM monitor I jet ITAGjet J Link J Trace TI Stellaris Macraigor PE micro RDI ST LINK Third Party Driver XD5100 200 ICDI vwlan_station bin To generate additional output select the output format a current SDK user must select the binary option and override the bin path In CC3200 SDK IAR generates bin file in the lt example gt ewarm Release Exe folder 5 3 1 5 Executing a Project To use the JTAG ov
45. d write access to SD card using the SD Host controller on CC3200 SPI Demo Application Displays the required initialization sequence to enable the CC3200 SPI module in full duplex 4 wire master and slave mode s Wi Fi Audio App Demonstrates Bi directional Audio Application on a CC3200 LaunchPad setup This application requires the audio boosterpack Camera Application Demonstrates the camera feature on CC3200 device User can invoke the image capture command on the web browser hosting on the CC3200 device This application requires the camera boosterpack UART DMA Application Showcases use of UART along with uDMA and interrupts Antenna Selection Gives the option to select an antenna with more signal for APs using a web browser Out of Box Application Demonstrates how the user can view different demo and SDK web links on their web browser Peer to Peer Application Demonstrates the Wi Fi direct feature on CC3200 device Timer Count Capture Showcases Timer s count capture feature to measure the frequency of an external signal Idle Profile Exercises hibernation using Power Management Framework middleware Sensor Profile Exercises low power modes Ipds using Power Management Framework middleware Watchdog System Demo Illustrates full system recovery using watchdog including the network subsystem TFTP Client Demonstrates file transfer using TFTP Trivial File Transfer Protocol Requires a TFTP Server running
46. ding to SOP 2 0 06100 makes the boot loader enter the DOWNLOAD mode in this mode an external intervention triggers an operation for example a break signal on UART from the SimpleLink programming application followed by a sequence to push the application image to the device serial flash e A setting corresponding to SOP 2 0 0b000 instructs the boot loader to load the application image from the SFLASH to the internal MCU RAM Boot Loader User Application Sharing MCU RAM In DOWNLOAD mode the boot loader requires memory resources acquired from the MCU RAM The amount of RAM used by the boot loader is 16 KB This implies that for the production variant of a CC3200 device the user application image must be restricted to 240 KB for the 256 KB MCU RAM variant of the CC3200 There are several key points for developers e MCU RAM address range 0x20000000 0x20003FFF This area is shared between the application and the boot loader The developer can only locate application data sections as data sections are not part of the application image this ensures that when the boot loader is loading the application image from serial flash to RAM this memory region is made exclusive to the boot loader Once the boot loader launches the application this memory region can be used by the application for its data sections e 0x20004000 to END of RAM This RAM area is exclusively for the application The application image should always be withi
47. e camera boosterpack Networking AP mode Peer to Peer Application This example demonstrates the Wi Fi direct feature on CC3200 device Networking p2p mode Idle Profile This application exercises hibernation using Power Management Framework middleware Networking STA Mode Sensor Profile This application exercises low power modes Ipds using Power Management Framework middleware Networking STA Mode File Download Application This application demonstrates file downloading from the web server and stores it to the device memory feature on the CC3200 device Networking STA Mode 18 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU Copyright O 2014 2015 Texas Instruments Incorporated SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback 1 TEXAS INSTRUMENTS www ti com 3 3 2 SWRU369B June 2014 Revised March 2015 Foundation SDK Components Application Demo Description Peripheral Feature exercised Watchdog System Demo This application illustrates a full system recovery using watchdog including the network subsystem Networking STA Mode TFTP Client This application demonstrates file transfer using TFTP Trivial File Transfer Protocol Requires a TFTP Server running on a connected device such as PC or smartphone Networking STA Mode WebSocket Camera This application demonstrates Websock
48. e socket 2 Connect to the server 3 Send the packets 4 Close the socket SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 27 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated Foundation SDK Development Flow 28 TCP Server int BsdTcpServer unsigned short usPort iSockID sl_Socket SL_AF_INET SL_SOCK_STREAM 0 LEI 1S06ckID lt 0 error ASSERT_ON_ERROR TCP_SERVER_FAILED iStatus sl_Bind iSockID SlSockAddr_t amp amp sLocalAddr if iStatus lt 0 error ASSERT_ON_ERROR TCP_SERVER_FAILED iStatus sl_Listen iSockID 0 if iStatus lt 0 ASSERT_ON_ERROR TCP_SERVER_FAILED A TEXAS INSTRUMENTS www ti com iAddrSize iStatus sl_SetSockOpt iSockID SL_SOL_SOCKET SL_SO_NONBLOCKING amp lNonBlocking sizeof 1lNonBlocking iNewSockID SL_EAGAIN while iNewSockID lt 0 iNewSockID sl_Accept iSockID struct SlSockAddr_t amp sAddr SlSocklen_t amp iAddrSize if iNewSockID SL_EAGAIN UtilsDelay 10000 else if iNewSockID lt 0 error ASSERT_ON_ERROR TCP_SERVER_FAILED iStatus sl_Recv iNewSockID g_cBsdBuf iTestBufLen 0 if iStatus lt 0 error ASSERT_ON_ERROR TCP_SERVER_FAILED sl_Close iNewSockID sl_Close iSockID SUCCESS CC3200 SimpleLink
49. ecific vector table implementation for interrupts e startup_ewarm c IAR workbench specific vector table implementation for interrupts Supporting folders files The ewarm folder contains IAR workspace The ccs folder contains CCS Project the driverlib folder contains all the driver files and the simplelink folder contains Simple Link Host Files 5 1 5 3 Usage e Setup a serial communication application HyperTerminal TeraTerm Port Enumerated COM port CC3200LP Dual Port Baud rate 115200 Data 8 bit Parity None Stop 1 bit Flow control None e Run the reference application Flashing the bin IAR CCS e Observe the status messages on the host over serial port in response to the user s selection of either sending packets or Collect statistics of received packets to understand the sequence of operations performed by the application Terminal snapshot when application runs on device Figure 13 CC3200 Transceiver Application on the Hyperterminal W COM34 115200baud Tera Term VT Lal k File Edit Setup Control Window Help HEHEHE HE HHH HHI HII HII KHIR III IIE a CC3266 Transceiver Application EEN Options 1 Send packets 2 Collect statistics about received packets Enter the option to use 1 Enter the channel to use 1 13 11 Enter the number of packets to send 166 Enter the rate 11 Enter the Tx power 8 15 16 Transmitting data Transmission complete Enter 1 to rest
50. ected return code A different return code indicates that a socket error has occurred The default setting is defined in the following macros changed either in the source code or at runtime define SSID_NAME cc3200demo define IP_ADDR Oxc0a8006E define PORT_NUM 5001 define UDP_PACKET_COUNT 1000 5 1 4 2 Source Files Briefly Explained The application source can be found in example udp_ socket e main c Main file calls SimpleLink APIs to connect to the network creates a socket and uses it to communicate over UDP by acting as a UDP client or server e pinmux c Pinmux file to mux the device to configure the UART peripheral e startup_ccs c CCS specific vector table implementation for interrupts e uart_if c Common interface file for UART prints e udma_if c Common interface file for UDMA functionalities e startup_ewarm c IAR workbench specific vector table implementation for interrupts Supporting folders files The ewarm folder contains IAR workspace The ccs folder contains CCS Project the driverlib folder contains all the driver files the os ib folder contains the project to build free_rtos library the third_party folder contains FreeRTOS files and the simplelink folder contains Simple Link Host Files 30 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1
51. ection to an enterprise network using the flashed certificate Certificate is flashed in SFLASH Networking STA mode HTTP Server Application The application demonstrates the Http server capability of CC3200 Networking STA Mode mDNS Application The application demonstrates the usage of mDNS functionality in CC3200 The application showcases both mDNS advertise and mDNS listen functionality Networking STA Mode UART Provisioning AP Application This application demonstrates the AP provisioning feature CC3200 AP Provisioning is method by which user can configure the AP information on the CC3200 device from a Browser Networking AP Mode Out of Box Application This application demonstrates the how the user can view different demo and SDK web links on a web browser Networking AP STA mode 12C GPIO Wi Fi Audio Application This example demonstrates Bi directional Audio Application on a CC3200 LaunchPad setup The system is comprised of two LPs in STA mode Audio is streamed from one LP and rendered on another LP over Wi Fi This application requires the audio boosterpack Networking STA AP mode Antenna Selection Application This example allows the user to select the antenna with the highest signal for APs using a web browser Networking AP mode Camera Application This example demonstrates the camera feature on CC3200 device This application requires th
52. el gcc mingw core 11 Devel gcc mingw g 12 Devel mingw runtime ONOaARWN gt After a successful Cygwin installation add its path c cygwin bin to the Windows environment variable SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 57 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated A TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com 5 3 3 2 GNU Tools for ARM Embedded Processors Download the latest version of gcc arm none eabi lt version gt win32 exe from https launchpad net gcc arm embedded and install it under the Cygwin root directory Default c cygwin 5 3 3 3 Open On Chip Debugger OpenOCD Open on chip debugger OpenOCD can be downloaded in source form from http sourceforge net projects openocd files openocd 0 7 0 and compiled locally To build OpenOCD for FTDI interface download the FTDI driver library x86 32 bit zip version from http www ftdichip com Drivers D2XX htm To compile OpenOCD with FTDI support Cygwin bash shell 1 Extract OpenOCD source into the Cygwin directory c cygwin This creates a directory called openocd lt version gt under the Cygwin directory which contains all OpenOCD source contents 2 Extract FTDI source into the openocd lt version gt directory This creates a directory called CDM 2 04 06 WHQL Certified rename it to ftd2xx 3 Change the direc
53. er FTDI the TI Stellaris driver must be selected The user can configure IAR to work with JTAG SWD by choosing the option available in Options gt Debugger gt T1 Stellaris gt Interface On the CC3200 Launchpad e JTAG Mode connect SOP 2 jumper only e SWD mode connect SOP 0 jumper only NOTE The 4 Wire JTAG will work without connecting the SOP 2 jumper However TI recommends connecting the SOP 2 jumper to prevent the already flashed code from executing while debugging 40 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 19 CC3200 IAR Executing Category Factory Settings General Options C C Compiler Assembler Output Converter Setup Download Images Extra Options Multicore Plugins Custom Build Build Actions Driver Run to Debugger Simulator Setup macros Angel E Use macro file s CMSIS DAP GDB Server IAR ROM monitor I jet ITAGjet J Link J Trace TI Stellaris Macraigor PE micro RDI ST LINK Third Party Driver XD5100 200 ICDI Device description file E Override default Click on the Download and Debug button to start the execution The execution stops at the main function Click the Go button or F5 to run Figure 20 CC
54. ess MCU that integrates a high performance ARM Cortex M4 MCU allowing customers to develop an entire application with a single IC This document introduces the user to the environment setup for the CC3200 SimpleLink Wi Fi along with programming examples from the software development kit SDK This document explains both the platform and the framework available to enable further application development 1 1 Overview The Texas Instruments royalty free CC3200 Embedded Wi Fi Foundation software development kit is a complete software platform for developing Wi Fi applications It is based on the CC3200 a complete Wi Fi SoC System on Chip solution The CC3200 solution combines a 2 4 GHz Wi Fi PHY MAC and TCP IP networking engine with a microcontroller up to 256 kB on chip RAM In XCC3200HZ and XCC3101GZ devices only 176 kb of RAM is available for applications and a comprehensive range of peripherals Refer to the CC3200 Product Preview and Data Sheet SWAS032 for more details on the CC3200 chip Figure 1 CC3200 Overview of Peripherals Oscillators 5 DC2DC E BAT Monitor ES E Hiberate RT DOTVNY_ SSOVAYSLNI JH Wi Fi NWP 1 2 Software Components The CC3200 platform includes a user programmable host along with a comprehensive networking solution combined with a Wi Fi engine The CC3200 Foundation Software Development Kit provides an easy to use framework hosted in the on chip microcontroller to use the WLAN networking serv
55. et HTTP Server functionality by transmitting continuous JPEG frames to a websocket client This application requires camera boosterpack and a connected PC or smartphone with a browser supporting HTML 5 Networking AP Mode HTTP Client Demo This application illustrates the usage of HTTP Client library to enable the device as an HTTP client Networking STA mode Idle Profile Non OS This application exercises the low power modes LPDS using Power Management Framework in a Non OS environment Networking STA mode MQTT Client This application showcases the device acting as a MQTT client in a fully functional MQTT network Networking STA mode MQTT Server This application showcases the device acting as an MQTT server capable of managing multiple local clients and allowing the local clients to communicate with remote MQTT clients Networking STA mode OTA Update This application illustrates Over The Air OTA update of service pack user application and user files Networking STA mode MCU Only Reference Examples for the CC3200 LP Application Demo Description Peripheral Feature exercised LED Blink Application This application showcases the blinking feature of available LEDs GPIO connected over GPIO on LP Timer Demo Application This application showcases the usage of 16 bit timers to generate interrupts which toggle the state of the GPIO Timer GPIO UAR
56. f this region and start at 0x20004000 0x20004000 16 KB Shared between boot loader and application 0x20000000 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS CC3200 ROM Services www ti com 6 2 2 6 2 3 6 2 4 64 Linking User Application with ROM APIs Using the ROM driver lib APIs for devices before ES 1 32 is not recommended as the number of APIs that would need to be patched would be higher Nevertheless below are the steps to use ROM driver lib APIs instead of the RAM APIs These APIs could be used with the production version of a CC3200 device These steps apply to all relevant source and project files that use driver lib APIs such as the SimpleLink and oslib library 1 All the c files which use driver lib APIs should include these header files in order e include rom h e include rom_map h 2 All the project files should add the global preprocessor define TARGET_IS_CC3200 3 All driver lib APIs should be invoked by MAP_apiname instead of apiname For example use MAP_UARTCharPut instead of UARTCharPut Any changes or additions should follow this approach 4 Rebuild all relevant projects Patching ROM APIs Follow these steps to selectively patch the ROM driver lib APIs Note that patch in this description means using the RAM driver lib API instead of the ROM driver lib AP
57. h header file only to ensure a smooth transaction to future versions of the driver Modify user h file Modify the user h file that includes the default configurations and adjustments Select the capabilities set required for your application TI has focused on building a set of predefined capability sets that fit most target applications TI recommends trying and choosing one of these predefined capabilities sets before building a customized set Once a compatible set is found skip the rest of this step The available sets are e SL_TINY Compatible with platforms with very limited resources Provides the best in class footprint in terms of code and data consumption e SL_ SMALL Compatible with most common networking applications Provides the most common APIs with a balance between code size data size functionality and performance e SL_FULL Provides access to all SimpleLink functionalities Memory management model The SimpleLink driver supports two memory models e Static default e Dynamic The CC3200 default configuration is Static In the dynamic model the configuration uses the malloc and free as defined by the operating system If the user wishes to define their own memory management they can define these interfaces Asynchronous event handlers routines The SimpleLink device generates asynchronous events in several situations These asynchronous events could be masked Provide handler routines t
58. ices and a comprehensive listing of drivers for peripherals interfaced with the microcontroller The kit also includes a reference code for peripheral usage and a few simple applications for networking services SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 5 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS Introduction www ti com Figure 2 illustrates the various software components and their form in the CC3200 Foundation SDK Figure 2 CC3200 Software Components Host Micro Controller Networking Engine CC3200R System on Chip Hardware amp TI ROM Code TI ROM Code Source and Library is Shared Ti Code Source and Library is shared Reference Code Components Provided By TI PC Based Tools Windows binaries viz Flashing Pin Configuration etc 6 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Introduction 13 CC3200 LaunchPad Platform The CC3200 LaunchPad board is the default hardware companion for the foundation SDK This board hosts the CC3200 device with interfaces designed for application software development and debugging The CC3200 LaunchPad also supports the TI Booster Pack interface allowing
59. ick_C_0 New E Bypass 4 a subpath_0 Add ode E a ES CS_DAP_O E initialization script A ernulation gel cc3200 gel 4 KI mm Delete E Slave Processor ortex_M4 Up JTAG Frequency Hz 500000 Port Dowr Test Connectior Basid Source In the Debug window right click on Connect Target Figure 36 Target Configuration Figure 37 CC3200 CCS Executing 4 A 0 eae g e D Debug X A 4 ve CC3200 ccxml Code Composer Studio Device Debugging A TEXAS INSTRUMENTS www ti com 2 Target Configurations 3 type filter text 12 Projects a amp User Defined 2 CC3200 ccxml Default Click the New button to create a new targ ma Stellaris In Circuit Debug Interface_0 Cortex_M4_0 Disconnected Unknown Once connected load the out file by selecting the appropriate application binary Load Program 56 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 38 CC3200 CCS Executing 5 not found Code Composer Studio ect Tools Scripts Run Window Help Te rS EH 2 EES KE AE 42 Load Prograrn Ctrl Alt L dr Debug X BEER GE a vn CC3200 ccxml Code Composer Studio Device Debugging amp Load Symbols 4 of Stellaris In Circuit Debug Interface_0 Cortex_
60. k APIs Include simplelink simplelink Source and simplelink Include folder paths To use Free RTOS TI RTOS APIs Include oslib path Defined symbols MACRO definition e USE _FREERTOS If application uses Free RTOS OS e USE_TIRTOS If application uses TI RTOS OS e ewarm Define for AP based application e SL_PLATFORM_MULTI_THREADED If application uses any OS Free RTOS TI RTOS e NOTERM If application does not need UART prints 5 3 1 3 Linking a Project Figure 16 CC3200 IAR Linker Project Options for node vwlan_station Category Factory Settings General Options Runtime Checking C C Compiler Assembler Config Library Input Optimizations Advanced Output List lr Output Converter Custom Build Build Actions V Automatic runtime library selection Additional libraries one per line Debugger PROJ_DIRS simplelink ewarm OS Exe simplelink a i Simulator PROJ_DIR 4 driverlib ewarm Release E xe driverlib a Angel PROJ_DIR 4 oslib ewarm free_ttos Exe free_ttos a CMSIS DAP Y GDB Server IAR ROM monitor Override default program entry Ejet ITAGjet 3 Entry symbol lar_program_start J Link J Trace Defined by application TI Stellaris Macraigor PE micro RDI ST LINK Third Party Driver XDS100 200 ICDI Cancel Additional libraries e Add library path as per application needs
61. lanConnect lRetVal sl_WlanConnect Wait for WLAN Event while IS_CONNECTED g_ulStatus IS_IP_ACQUIRED g_ulStatus bois following calls depend on user s input at runtime Before proceeding please make sure to have a server waiting on PORT_NUM lRetVal BsdTcpClient PORT_NUM After calling this function you can start sending data to CC3100 IP address on PORT_NUM lRetVal BsdTcpServer PORT_NUM CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow TCP Client int BsdTcpClient unsigned short usPort Open a socket with standard parameters iSockID sl_Socket SL_AF_INET SL_SOCK_STREAM 0 if iSockID lt 0 error ASSERT_ON_ERROR TCP_CLIENT_FAILED Connect to the server IP and port number iStatus sl Connect iSockID SlSockAddr_t amp sAddr iAddrSize if iStatus lt 0 error ASSERT_ON_ERROR TCP_CLIENT_FAILED Send packet using the sl_Send API call iStatus sl_Send iSockID g_cBsdBuf sTestBufLen 0 if Status lt 0 error ASSERT_ON_ERROR TCP_CLIENT_FAILED Close the socket sl_Close iSockID SUCCESS Sending the TCP packets is a four step process 1 Open th
62. lication binary from non volatile memory while the program is being executed Inc e Contains the register definition header files Oslib Contains the interface file to configure Free RTOS or TI RTOS Middleware Contains power management framework to provide a simple infrastructure for developers to create a power aware solution NetApps http Contains the HTTP Hyper Text Transfer Protocol client and server library smtp Contains the SMTP Simple Mail Transfer Protocol client library e tftp Contains the TFTP Trivial File Transfer Protocol client library xmpp Contains the XMPP Extensive Messaging and Presence Protocol client library json Contains JSON parser library e matt Contains the MQTT Message Queue Telemetry Transport client and server library Simplelink Contains SimpleLink Host Driver code Simplelink_extlib Contains the OTA Over the Air library Documents Documentation for netapps libraries ae FatFS Contains the FatFS source files i Contains the FreeRTOS source files Current SDK supports FreeRTOS v8 0 1 Ti_rtos Contains the Ti RTOS config file and CCS IAR GCC project to support TI RTOS with all three IDEs Current SDK supports TI RTOS v2 1 0 03 Tools ccs_patch Contains the files required for CCS FTDI LP connection e ar_patch Contains the files required for IAR FTDI LP connection e ftdi Contains FTDI PC driver gcc_scripts Contains the scripts t
63. lication showcases use of UART along with uDMA and UART DMA interrupts Timer Count Capture This application showcases Timer s count capture feature to measure TIMER Application frequency of an external signal Application Bootloader This application showcases the secondary bootloader operations to manage updates to application image SPI for serial flash access Dynamic Library Loader This application exercises an approach to enable dynamic loading of an application binary from non volatile memory while the program is being executed CC3200 PinMux Utility The CC3200 pinmux utility provides a convenient interface to select the personality of the general purpose pins available at the CC3200 device boundary The tool generates the source files based on the information selected using the tool and can be directly included in the project Refer to the CC3200 PinMux tool wiki page for further details Refer to Section 5 3 2 2 for getting the new Tl Pinmux Tool CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated IA Texas INSTRUMENTS www ti com Getting Started with CC3200 Launchpad 4 Getting Started with CC3200 Launchpad To start with CC3200 Launchpad e Connect the CC3200 Launchpad to PC e As the FTDI driver is auto installed from the SDK installer
64. n this region and start at 0x20004000 e RAM range for different variants CC3200R1M1 0x20004000 0x20020000 XCC3200JR CC3200R1M2 0x20004000 0x20040000 XCC3200HZ 0x20004000 0x20030000 Note Refer to the Blinky Linker command file CCS IAR GCC which defines 240 KB of RAM for the XCC3200JR and CC3200R1M2 devices CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com CC3200 ROM Services 6 2 CC3200 Peripheral Driver Library Services in ROM Peripheral driver routines are used in the CC3200 MCU ROM for linking with user applications Entire source codes of the peripheral driver routines are available in the CC3200 SDK The developer could choose to build an application with the library while instructing the linker to use routines directly from RAM The focus of this section is to appraise the developer on how to use these routines and the procedure to patch or extend any existing routines 6 2 1 Peripheral Library Access in ROM ROM APIs are invoked using the following re direction flow to allow future extensions while retaining backward compatibility of location of access functions in the ROM memory map While the API locations may change in future versions of the ROM the API tables will not Two tables in the ROM resolve to the entry point of e
65. nd tail chaining capabilities DC Demo Showcases the usage of 12C DriverLib APIs It provides a user interface to read from or write to the 12C devices on the Launch Pad MCU Sleep DS Exercises the Sleep and Deepsleep functionality of the MCU uDMA Application Showcases the usage of UDMA DriverLib APIs Various DMA mode functionalities are shown in this application FreeRTOS Demo Application Showcases the FreeRTOS features like multiple task creation and inter task communication using queues AES Demo Application Showcases the usage of AES Driverlib APIs Provides a user interface to exercise various AES modes DES Demo Application Showcases the usage of DES Driverlib APIs Provides a user interface to exercise various DES modes CRC Demo Application Showcases the usage of CRC Driverlib APIs Provides a user interface to exercise various CRC modes SHA MD5 Demo Application Showcases the usage of SHA MD5 Driverlib APIs Provides a user interface to exercise various SHA MD5 modes ADC Demo Application Showcases the functionality of CC3200 ADC module by using the Driverlib APIs PWM Demo Application Showcases general 16 bit pulse width modulation PWM mode feature supported by purpose timers GPTs SD Host Application Showcases the basic use case of initializing the controller to communicate with the attached card reading and writing SD card block SD Host FatFS Application Uses the FatFS to provide the block level rea
66. ng Options PORT 2 Packet Count B Dest ination IP 4 Hain Henu nter Destination IP 192 168 0 132 Enter new Destination PC IP address Setting Opt ions PORT 2 Packet Count 3 Dest ination IP 4 Hain Henu nter the option to use J Figure 11 TCP Socket Terminal 5 Change the other setting port SSID name packet count as required SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 29 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com 6 Choose the options e Send TCP packets e Receive TCP packets 7 After selecting one of the above options run the iperf command on the PC command prompt as given in the TeraTerm HyperTerminal screen 8 Observe the execution flow to understand the results Note Disable PC anti virus while running Gert 5 1 4 UDP Socket Application 5 1 4 1 Application Details This application illustrates how to use the device as a client or server for UDP communication Developers and users can refer or re use the function while writing new applications The device connects to an AP access point with the SSID for the AP stored as a macro in the application Initially the application implements a UDP client and sends 1000 UDP packets to a socket address port number and IP address specified as macros Zero is the exp
67. ngle Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 35 CC3200 CCS Launch Config 2 Target Configurations 3 K S EB type filter text Projects 4 5 User Defined cc3101 jtag ccxml Default ly d New Target Configuration Import Target Configuration MK Delete Delete Rename F2 Se Refresh FS se Launch Selected Configuration Set as Default Link File To Project Properties Alt Enter To switch between JTAG SWD mode from CCS follow the steps specified in Figure 36 On the CC3200 LaunchPad configure the board for either e JTAG Mode connect SOP 2 jumper only SWD mode connect SOP 0 jumper only NOTE 4 Wire JTAG works without connecting the SOP 2 jumper However TI recommends connecting the SOP 2 jumper to prevent the already flashed code from executing while debugging SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 55 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated Foundation SDK Development Flow 2 CC3200 cexml 7 Target Configuration All Connections Cpu Properties a T Stellaris In Circuit Debug Interface_0 Import corte Macey a MY CC3200_0 Set the properties of the selected cpu a amp IceP
68. o catch these events If a handler routine was not provided and the event is received the driver will drop this event without any indication of a drop Interface communication driver The CC3200 host driver implements SPI communication interface The interface for this communication channel includes four simple access functions 1 open 2 close 3 read CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Components 4 write The CC3200 SPI implementation uses DMA to increase the utilization of the communication channel OS adaptation The SimpleLink driver can run on two kinds of platforms e Non OS Single Threaded default e Multi Threaded The CC3200 SimpleLink host driver is ported on both Non OS and Multi Threaded OS environments The host driver is made OS independent by implementing an OS Abstraction layer Reference implementation for OS Abstraction is available for FreeRTOS and TI RTOS To work in a multi threaded environment under a different operating system provide some basic adaptation routines to allow the driver to protect access to resources for different threads locking object and to allow synchronization between threads sync objects In addition the driver support runs without a dedicated thread allocated s
69. o use GCC and openocd with CC3200 2 3 Prerequisite Tools to be Installed Table 2 CC3200 Prerequisite Tools Remarks Location Development Environment IAR IAR version 7 20 onwards must be installed After the Installation installation follow the tools iar_patch readme txt to be http Awww iar com Products IAR able to debug over FTDI Embedded Workbench ARM Or and CCS CCS 6 0 1 version and TI v5 1 6 compiler version Installation After the installation follow the http www ti com tool ccstudio tools ccs_patch readme txt to be able to debug over FTDI CC3200 Support package in Though CCS 6 0 1 provides an option to install this Refer to Section 5 3 2 1 CCSv6 0 add on during installation the user must check and install if a newer version is available Or and GCC To enable CC3200 SDK development on Linux Refer to Section 5 3 3 environment CC32xx PinMux Utility CC32xx PinMux Utility exe Utility to assign a desired personality to the general Installation purpose pins available at the CC3200 device boundary http processors wiki ti com index php T PinMux_Tool or refer to Section 5 3 2 2 12 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated l TEXAS INSTRUMENTS www ti com Foundation SDK Components
70. ocess a Start the SimpleLink by calling the sl_Start API b Wait until the device gets an IP address After the device comes up in AP mode follow these steps to ensure the device can act as an AP 1 Wait for a station to connect to the device the user must connect a machine to the device 2 Ping the station machine Refer to the main c file of the reference application for more details NOTE If the device is not able to ping to the connected machine try disabling the antivirus on the machine 5 1 2 4 Usage 1 Run the application getting_started_with_wlan_ap from IAR CCS or flash to the device 2 Application will switch to AP mode if it is not in AP mode 3 After the client connects to the device the device AP pings the client and prints the result over UART 4 All results can be viewed on the terminal screen 5 Observe the execution flow to understand the result SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 25 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com 5 1 3 5 1 3 1 TCP Socket Application Application Details This application illustrates how to use the device as a client or server for TCP communication Developers and users can refer or re use the function while writing new applications The device connects to
71. older contains the CCS Project the driverlib folder contains all the driver files the os ib folder contains the project to build the Tl RTOS Free RTOS library and the simplelink folder contains SimpleLink host files 5 1 1 3 Code Flow Connection void WlanStationMode void pvParameters Start the SimpleLink lRetVal sl_Start 0 0 0 Connecting to WLAN AP lRetVal WlanConnect lRetVal sl_WlanConnect Wait for WLAN Event while IS_CONNECTED g_ulStatus IS_IP_ACQUIRED g_ulStatus ay Checking the Lan connection by pinging to AP gateway lRetVal CheckLanConnection Check for LAN connection lRetVal sl_NetAppPingStart wait for Ping report event while IS_PING_DONE g_ulStatus Checking the internet connection by pinging to external host lRetVal CheckInternetConnection Get external host IP address lRetVal sl_NetAppDnsGetHostByName Try to ping HOST_NAME lRetVal sl_NetAppPingStart Wait for Ping done event while IS_PING_DONE g_ulStatus xf SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 23 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated I TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com Using the CC3200 as a STA is a three step process 1 2 3 Start the
72. olely to the SimpleLink driver To work in this mode supply a spawn method that enables functions to run on a temporary context SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 15 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 Texas INSTRUMENTS Foundation SDK Components www ti com 3 1 3 Switch Between OS and NON OS Configuration IAR Choose configuration options from menu Project gt Edit configurations gt 0S NON_OS PM_Framework NON_OS_PM as indicated in the snapshot below Figure 8 CC3200 SimpleLink IAR Config Switch B simplelink IAR Embedded Workbench IDE File Edit View Project Simulator Tools W Duga Workspace x NON_OS PM_Framework NON_OS_PM FH rec pal pm device c driver c flowcont c fs c netapp c netcfg c Ea R nanns r CCS Choose configuration options from menu Project gt Build Configurations gt Set active or as indicated in Figure 9 Figure 9 CC3200 CCS SimpleLink Config Switch R gt Project Explorer 53 kW SI Nw 57 EN Add Files D a B Copy ciec e PN Paste Ctrl V L cc X Delete Delete Le dei Refactor D gq dri Source D l Vo Move G 3 Rename F2 l ne Import D G E K Export l sP4 Show Build Settings ei i Build Project Clean Project Rebuild Project Refresh FS Close Project Build Configurations Manage l Make Targets Set Active H 1 NON
73. ow advanced settings Dependencies e Ifthe application uses TI RTOS OS add ti_rtos_config project as dependency for the application ti_rtos_config project should be imported in CCS workspace for TI RTOS based application Current SDK supports TI RTOS 2 1 0 x 5 3 2 8 Generating a Binary bin e Add the following script to generate a bin file S CCE_INSTALL_ROOT utils tiobj2bin tiobj2bin S BuildArtifactFileName S BuildArtifactFileBaseName bin CG_TOOL_ROOT bin armofd S CG_TOOL_ROOT bin armhex S CCE_INSTALL_ROOT utils tiobj2bin mkhex4bin 52 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 32 CC3200 CCS Generating Binary type filter text b Resource General a Build 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 b Advanced Options gt ARM Linker ARM Hex Utility Disabled Debug Build ey Configuration Release Active v Manage Configurations RK Steps Ka Variables PE Environment Link Order ei Dependencies Pre build steps lt Description Post build steps farmofd CG_TOOL_ROOT bin armhex CCE_INSTALL_ROOTutils tiobj2bin mkhex4bin 4
74. p32 cmd X Runtime support library lt automatic gt X KA Show advanced settings Linker command file e c3200v1p32 cmd for XCC3200JR CC3200R1M2 and XCC3200HZ devices e c3200v1p21 cmd for XCC3101GZ device CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com 5 3 2 5 Compiling a Project Foundation SDK Development Flow Figure 26 CC3200 CCS Compiling Project type Filter text gt Resource General 4 Build 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 gt Advanced Options gt ARM Linker ARM Hex Utility Disabled Debug Processor Options Configuration Release Active Designate code state 16 bit thumb or 32 bit code_state Specify floating point support float_support Target processor version silicon_version mv Application binary interface See General page to edit abi eabi V Little endian code See General page to edit little_endian me SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback KA Show advanced settings CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 47 Copyright 2014 2015 Texas Instruments Incorporated I
75. rated A TEXAS INSTRUMENTS Foundation SDK Development Flow www ti com UDP Server int BsdUdpServer unsigned short usPort iSockID sl_Socket SL_AF_INET SL_SOCK_STREAM 0 LEI 1S06ckID lt 0 error ASSERT_ON_ERROR UCP_SERVER_FAILED iStatus sl_Bind iSockID SlSockAddr_t amp sLocalAddr iAddrSize if iStatus lt 0 error ASSERT_ON_ERROR UCP_SERVER_FAILED iStatus sl_RecvFrom iNewSockID g_cBsdBuf iTestBufLen 0 amp sAddr amp iAddrSize sl_Close iSockID SUCCESS Steps for receiving UDP packets as a UDP server are as follows 1 Open the socket 2 Create a UDP server 3 Receive packets 4 Close the socket 5 1 4 4 Usage 1 Set up a serial communication application HyperTerminal TeraTerm For detailed information visit the Setup Terminal on the host PC The settings are e Port Enumerated COM port CC3200LP Dual port Baud rate 115200 Data 8 bit e Parity None e Stop 1 bit Flow control None 2 Run the application udp_socket from IAR CCS or flash the bin file to the device 3 Connect a PC to the same AP that the device is connected to 4 Get the IP address of the PC and fill this value for IP_ADDR macro or change the setting as specified in Figure 12 32 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texa
76. rom ROM_APITABLE 5 to ROM_APITABLE 4 ccococcccccnnccnnnnncnncnnncnnannnnncnnnnnrannnnnrnnnrnrannnnnennnans 63 66 Revision History SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries Tl reserve the right to make corrections enhancements improvements and other changes to its semiconductor products and services per JESD46 latest issue and to discontinue any product or service per JESD48 latest issue Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete All semiconductor products also referred to herein as components are sold subject to Tl s terms and conditions of sale supplied at the time of order acknowledgment TI warrants performance of its components to the specifications applicable at the time of sale in accordance with the warranty in Tl s terms and conditions of sale of semiconductor products Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty Except where mandated by applicable law testing of all parameters of each component is not necessarily performed Tl assumes no liability for applications assistance or the design of Buyers products Buyers are responsible for their products and applications using TI components To minimize the ri
77. ry www ti com Revision History Changes from July 1 2014 to March 11 2015 Page Added Application Bootloader HTTP Client Demo Idle Profile Non OS MQTT Client MQTT Server OTA Updated Dynamic Library Loader to examples in Package Contents table cceeeeee eee ee cece nese eee ee eee ee nese eeeeeaeeeeeeenes e Added http json and matt to NetApps in Package Contents table 12 e Added Simplelink_extlib and Documents values to Package Contents table cceeceeeeeeeee eens eee eeeeeeeeeeeeeeeeeees 12 e Updated IMAGE 2 eueusgeeegkge ege Ne NENNEN ERR EK AEN E NEEN EEN E SNE dE EEN EN EN ete de Ed ENER eves veils TREK VUEN E ERR SNE enone 16 s Updated nee 16 e Added HTTP Client Demo Idle Profile Non OS MQTT Client MQTT Server and OTA Update to table 19 e Added Application Bootloader and Dynamic Library Loader to Table 20 e Updated Simple Networking Applications section 0cceeee ee eee eee ee eee eee e eee ene e enna eee enna eee ea ee eaeeeneeeneeeeeeeeee 22 Added Nole EE 40 VE e et Wie Le 55 e Updated RAM range EEN ete NENNEN REENEN EE nen a a a E a E 62 Revision History Changes from Original June 2014 to A Revision Page Changed to xGC3200HZ and XCC3 101 GZ eves cenccicet ceanaine gege ge EENEG ee 5 e Added Watchdog System Demo TFTP Client and WebSocket Camera values cece ence ence eeeeeeeeeeeeeeeees 11 e Added NetApps values to Package Contents table ceceeeee ence een
78. s Texas 75265 Copyright 2015 Texas Instruments Incorporated
79. s Instruments Incorporated IA Texas INSTRUMENTS www ti com Foundation SDK Development Flow W COM42 115200baud Tera Te EECH File Edit Setup Control Window Help CC3200 UDP Socket Applicat ion Default settings onnect i ing to AP cc3200dena T CC3200 IP address Kate P A e l 102 Default settings SSID Nane cc3200deno PORT 5001 Packet Count 1000 Destination IP 192 168 0 110 Dpt ion f Send UDP packets 2 Receive UDP packets B aa Enter the option to we LL option to change setting Setting Options 4 PORT 2 Packet Count Be Dest ination IP 4 11d in Or nter the option to use Setting a new nter Destination IP 192 168 0 132 destination PO IP Setting Options 1 PORT 2 Packet Count 3 Destination IP Hain Henu nter the option to use Jj Figure 12 UDP Socket Terminal 5 Change the other setting port SSID name packet count as required 6 Choose the options e Send UDP packets e Receive UDP packets 7 After selecting from the above options run the iperf command on the PC command prompt as given in the TeraTerm HyperTerminal screen 8 Observe the execution flow to understand the results Note Disable PC anti virus while running Gert SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 33 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated Foundation SDK
80. sks associated with Buyers products and applications Buyers should provide adequate design and operating safeguards TI does not warrant or represent that any license either express or implied is granted under any patent right copyright mask work right or other intellectual property right relating to any combination machine or process in which Tl components or services are used Information published by TI regarding third party products or services does not constitute a license to use such products or services or a warranty or endorsement thereof Use of such information may require a license from a third party under the patents or other intellectual property of the third party or a license from TI under the patents or other intellectual property of TI Reproduction of significant portions of Tl information in Tl data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties conditions limitations and notices Tl is not responsible or liable for such altered documentation Information of third parties may be subject to additional restrictions Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice Tl is not responsible or liable for any such statements Buyer
81. the reference applications present in examples folder and captured in the project files While using the debugger clean and rebuild the libraries driverlib simplelink FreeRTOS to avoid any source file association problems NOTE While creating new project under this SDK call PRCMCC3200MCUInit as the first call in main for proper initialization of the device NOTE Visit the CC3200 TI RTOS page before creating any TI RTOS based application 5 3 1 Development Environment IAR Follow the steps given in C T CC3200SDk cc3200 sdk tools iar_patch readme txt to replace iarmLMIFTDI dll 5 3 1 1 Creating a Project e File gt New gt Workspace e Project gt Create New Project Tool Chain ARM Project Templates C e Open Project Option and follow the settings as given in these snapshots 36 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow Figure 14 CC3200 Programmer Guide IAR Project Options Category General Options Runtime Checking C C Compiler E Assembler Target Output Library Configuration Library Options MISRA C 200 4 gt Output Converter Custom Build Build Actions Linker Core Cortex M4 sl Debugger Simulator Device TexasInstr
82. tick_api e GPT_General_Purpose_Timer_api e UART_api e UDMA_Micro_Direct_Memory_Access_api e Utils_api e WDT_Watchdog_Timer_api For detailed information on the APIs and their usage refer to the document docs CC3200 Peripheral Driver Library User s Guide chm Reference Applications Foundation SDK Components The reference applications available as a part of the SDK package are example implementations which demonstrate key features and peripherals supported by the subsystem built around the CC3200 device on the LaunchPad A brief description of the reference applications are tabulated below Refer to the readme txt present in the individual folders for further information All examples are broadly divided into two types the network reference and the MCU only reference examples Network Reference Examples for the CC3200 LP Application Demo Description Peripheral Feature exercised Getting started with wLAN Station This application showcases the device s capability as a station in a typical networking system Networking STA mode Getting started with wLAN AP This application showcases the device s capability as an AP in a typical networking system Networking AP mode TCP Socket Application This application showcases the device s communication over network using TCP protocols Networking Basics WLAN Scan Policies Application This application sets scan policy and enables the
83. tor to openocd lt version gt 4 Run the following command at prompt configure enable maintainer mode disable werror disable shared enable t2232_ftd2xx with ftd2xx win32 zipdir ftd2xx 5 This should successfully configure OpenOCD for building 6 Run the make command followed by make install 7 After the command runs successfully check that openocd exe is generated at C lcygwinlusrllocallbin Add the same path to the environment variable 5 3 3 4 Compile the GCC SDK project Go to lt cc3200 sdk gt example getting_started_with_wlan_station gcc in the command prompt and run the following command make f Makefile This generates a wlan_station axf file under the gcclexe folder 5 3 3 5 Target Connection and Debugging GDB 58 The OpenOCD configuration file for FTDI is under cc3200 sdk tools gcc_scripts folder cc3200 cfg To test the connection to the CC3200 FTDI LaunchPad go to the lt cc3200 sdk gt tools gcc_scripts folder run the following command at the Cygwin prompt window and check the output to ensure the connection happened properly openocd f cc3200 cfg See Figure 39 for the connection output screen while the CC3200 device is connected through GDB CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright O 2014 2015 Texas Instruments Incorporated 1 T
84. uccessful H will try to get the IP address of www ti com and then ping to the IP address Zero is the expected return value A different return code indicates that the internet connection is not available or that the ping was not successful The application uses LEDs to indicate the test results RED indicates an AP connection GREEN indicates ping to AP and ORANGE indicates a ping to www ti com Security Macros define SSID_NAME cc3200demo define SECURITY_TYPE SL_SEC_TYPE_OPEN define SECURITY_KEY 5 1 1 2 Source Files Briefly Explained 22 The application source can be found in example getting_started_with_wlan_station e main c Main file creates the SimpleLink task which handles most of the network related operations while a WlanStationMode task makes calls to the network related APIs of the SimpleLink library e startup_ewarm c IAR workbench specific vector table implementation for interrupts e pinmux c Contains the configurations to mux the device pins e gpio_if c Common interface file for LED use e uart_if c Common interface file for UART prints Supporting folders files CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 TEXAS INSTRUMENTS www ti com Foundation SDK Development Flow The ewarm folder contains the IAR workspace The ccs f
85. uments CC3200 E Angel CMSIS DAP GDB Server TAR ROM monitor Ejet JTAGjet 9 Little J Link J Trace Big TI Stellaris BE32 Macraigor PE micro RDI ST LINK Third Party Driver XDS100 200 ICDI Processor variant Endian mode BES Cancel 5 3 1 2 Compiling a Project Figure 15 CC3200 IAR Compiling Project Cee oO oo Factory Settings General Options F Multifile Compilation n Discard Unused Publics Assembler E Output Converter Language 2 Code Optimizations Output List Preprocessor Lal Custom Build Build Actions Linker Additional include directories one per line Debugger PROJ_DIR Simulator PROJ_DIR S 5 eo Ee Geen PROJ pes Cinch GDB Server IAR ROM monitor Preinclude file I jet ITAGjet J Link J Trace TI Stellaris Defined symbols one per line Macraigor ewarm E Preprocessor output to file PE micro USE_FREERTOS L Preserve comments RDI SL_PLATFORM_MULTI_THRI 3 Generate Hine directives ST LINK Third Party Driver XDS100 200 ICDI SWRU369B June 2014 Revised March 2015 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU 37 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated I Texas INSTRUMENTS Foundation SDK Development Flow www ti com Additional include directories e To use Driverlib APIs Include driverlib and inc folder path e To use Simplelin
86. uration Release Active D Manage Configurations 4 ARM Compiler Processor Options Optimization Include Options MISRA C 2004 4 Advanced Options Include library file or command file as input library D 2820854 libc a CC3200_SDK_ROOT driverlib ccs Release driverlib a den SE CC3200_SDK_ROOT simplelink ccs OS simplelink a f S CC3200_SDK_ROOT Voslib ccs ti_rtos ti_rtos a Parser Preprocessing Option Predefined Symbols Diagnostic Options Runtime Model Options Advanced Optimizations Entry Exit Hook Options Library Function Assumption Add lt dir gt to library search path search_path i HAAI Assembler Options CG TOOL ROOT lib File Type Specifier Directory Specifier Default File Extensions Command Files 4 ARM Linker Basic Options File Search Path gt Advanced Options ARM Hex Utility Disabled V Reread libraries resolve backward references reread_libs x Debug Search libraries in priority order priority priority Th Ir Disable automatic RTS selection disable_auto_rts O show adanced seins Include library file e As per the application requirements include driverlib a simplelink a ti_rtos a or free_rtos a driverlib a is available under the driverlib ccs Release folder simplelink a is available under the simplelink ccs OS NON OG NON OG DM PM_Framework folder for OS non OS power management for
87. volatile storage The SDK contains five simple network applications to demonstrate the connection and packet handling functionality These applications use the SimpleLink APIs to demonstrate the functionality The source in these applications is modular and can be referred or re used by the developer Application Description Getting started with WLAN Station Reference application to use the CC3200 in STA mode Getting started with WLAN AP Reference application to use the CC3200 in AP Access Point mode TCP Socket Application Reference application showcasing the TCP server and client functionality UDP Socket Application Reference application showcasing the UDP server and client functionality a R oO M gt Raw Socket Transceiver Mode Reference application showcasing the Raw socket functionality Application Simple Networking Applications Any SimpleLink API sl_ must be invoked only after the sl_Start API has completed This function starts the SimpleLink Networking device This function also initializes the communication interface Getting Started with WLAN Station 5 1 1 1 Application Details This application shows the CC3200 device as a station in a simple network Developers and users can refer the function or re use them while writing a new application The device connects to an AP access point with AP configurations stored in the form of macros in the application If the connection is s
88. ware folder Documentation for SimpleLink host driver in html format under docs simplelink_api directory Application notes for all the sample application present in docslexamples directory Peripheral driver library user s guide Documentation for netapps libraries Simplelink OTA Extlib API user s guide driverlib Contains the peripheral driver library source files The driverlib a is also provided in the ccs and ewarm directories Getting Started in STA Mode Configures CC3200 in STA mode It verifies the connection by pinging the client connected to it Getting Started in AP Mode Configures CC3200 in AP mode It verifies the connection by pinging the client connected to it TCP Socket Demonstrates the connection scenario and basic TCP functionality UDP Socket Demonstrates the connection scenario and basic UDP functionality Scan Policy Demonstrates the scan policy settings in CC3200 SSL SSL certificates are designed to provide two principles privacy and authentication Privacy is achieved by encryption decryption and authentication is achieved by signature verification The application demonstrates using a certificate with SSL MAC Filters NWP Filters The Rx Filters feature enables the user to define and manage the Rx filtering process to reduce the amount of traffic transferred to the host and achieve efficient power management File_operations Demonstrates the use of File System APIs Transceiver_mode Demonstrates building a proprietar
89. x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 F Raw socket send void TxContinues int iChannel RateIndex_e rate int iNumberOfPackets double dIntervalMiliSec Socket open iSoc sl_Socket SL_AF_RF SL_SOCK_RAW iChannel Send the data for ulIndex O amp nbsp ulIndex amp lt iNumberOfPackets amp nbsp ulIndex t sl_Send iSoc RawData_Ping sizeof RawData_Ping SL_RAW_RF_TX_PARAMS iChannel rate iTxPowerLevel PREAMBLE Close the socket sl_Close iSoc 34 CC3200 SimpleLink Wi Fi and loT Solution a Single Chip Wireless MCU SWRU369B June 2014 Revised March 2015 Submit Documentation Feedback Copyright 2014 2015 Texas Instruments Incorporated 1 Texas INSTRUMENTS www ti com Foundation SDK Development Flow The Rx statistics feature inspects the medium in terms of congestion and distance validates the RF hardware and helps using the RSSI information 5 1 5 2 Source Files Briefly Explained e main Demonstrates sending a raw ping packet in Tx continues and usage of different API for getting the Rx statistics e uart_if Displays status information over the UART e pinmux c Pinmux file to mux the device and configure the UART peripheral e startup_ccs c CCS sp
90. y protocol on top of Wi Fi PHY layer with the user given full flexibility to build their own packet The RX Statistics feature inspects the medium in terms of congestion distance validation of the RF hardware and help using the RSSI information Provisioning with SmartConfig Demonstrates the usage of TI s SmartConfig Wi Fi provisioning technique Provisioning with WPS Demonstrates the usage of WPS Wi Fi provisioning with CC31xx CC32xx Deepsleep Usage Showcases deepsleep as a power saving tool in a networking context Hib Showcases the hibernate as a power saving tool in a networking context in this case an UDP client examp e Get Time Connects to an SNTP server and requests for time information Get Weather Connects to Open Weather Map and requests for weather data Email Sends emails via SMTP The email application sends a preconfigured email at the push of a button or a user configured email through the CLI XMPP Demonstrates the connection scenario with an XMPP server Serial Wi Fi Serial Wi Fi is a capability designed to provide easy self contained terminal access behavior over UART interface Connection Policy Demonstrates the connection policies in CC3200 The connection policies determine how the CC3200 connects to AP ENT Wlan Demonstrates the connection to an enterprise network using the flashed certificate Certificate is flashed in SFLASH HTTP server Demonstrates the HTTP server capability of CC3200 mDNS Demonstrates
91. yer acknowledges and agrees that any military or aerospace use of Tl components which have not been so designated is solely at the Buyer s risk and that Buyer is solely responsible for compliance with all legal and regulatory requirements in connection with such use Tl has specifically designated certain components as meeting ISO TS16949 requirements mainly for automotive use In any case of use of non designated products TI will not be responsible for any failure to meet ISO TS16949 Products Applications Audio www ti com audio Automotive and Transportation www ti com automotive Amplifiers amplifier ti com Communications and Telecom www ti com communications Data Converters DLP Products DSP Clocks and Timers Interface Logic Power Mgmt Microcontrollers RFID OMAP Applications Processors Wireless Connectivity dataconverter ti com www dp com www ti com clocks interface ti com logic ti com microcontroller ti com www ti rfid com www ti com omap Computers and Peripherals Consumer Electronics Energy and Lighting Industrial Medical Security Space Avionics and Defense Video and Imaging TI E2E Community www ti com wirelessconnectivity www ti com computers www ti com consumer apps www ti com energy www ti com industrial www ti com medical www ti com security www ti com space avionics defense www ti com video Mailing Address Texas Instruments Post Office Box 655303 Dalla
Download Pdf Manuals
Related Search
Related Contents
Manuel utilisateur Linux Netgear Space-saving Powerline Network Extender Kit Boletin-lea por favor! Manual de Operación BuildLive Kobe2011 SOMMAIRE - EPS Orléans Tours V640 Series Manual For inc-ac100-200 Guide to accompany Class II Setup Software Model 7820 B UPS Revenue Recovery Scale User`s Manual Copyright © All rights reserved.
Failed to retrieve file