微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > CC3220串口透传功能(TCP_UART)的问题

CC3220串口透传功能(TCP_UART)的问题

时间:10-02 整理:3721RD 点击:

Hi,Ti, 请教下:

我想用CC3220SF-LAUNCHXL在STA模式下实现串口透传功能,需要参考SDK中的哪个例子呢?

我用的SDK版本是最新的1.30.1的,没发现有相关的例子。

但是在CC3200的SDK里面有比较详细的例子可参考,如tcp_socket、serial_wifi、getting_started_with_wlan_station等。

请问CC3220应该参考哪些例子? 或者新版本的SDK能否提供相关的例子?

可以参考

examples\nortos\CC3220SF_LAUNCHXL\demos\trigger_mode

Application Name - Trigger Mode application
Application Overview - This application demonstrates how implement trigger mode functionality
In this mode, the MCU can enter LP mode and be woken up upon a reception
of data on an open socket.

Application Details - Refer to 'Trigger Mode' README.html

Trigger Mode

Table of Contents

Example Summary

This example introduce the user to Trigger Mode on CC32xx devices.

Overview

  • This example is based on the Provisioning example provided by the CC32xx SDK.

  • The purpose of this example is to show the user a method, in which the device can enter LPDS, and be awoken by a packet sent on a specific, pre-determined socket.

Peripherals Exercised

  • Board_LED0 - Blinking led Indicates disconnected. Led on indicates connection established
  • Board_LED1 - Led on indicates error occurred
  • Board_LED2 - Led on indicates error occurred and while blinking, indicates that the board is trying to connect to AP.

Example Usage

  • Establish connection between CC32xx device to a specific AP using the Android \ IOS mobile application

  • Build the project and flash from the debugger or by using the SimpleLink Uniflash

  • Open a serial session (e.g. HyperTerminal,puTTY, etc.) to the appropriate COM port.

    The COM port can be determined via Device Manager in Windows or via ls /dev/tty* in Linux

The connection should have the following settings

 Baud-rate: 115200 Data bits: 8 Stop bits: 1 Parity: None Flow Control: None
  • The example starts by showing on the terminal the application name and tries to establish connection with existing profiles

  • If a connection is not established during preconfigured time out, provisioning will start, wait for connection to be established and for an IP to be aquired

  • After connection is established, Ping is sent once to the gateway specified by the Provisioning stage to verify connection

Once the connection is verified, we can start testing the Trigger Mode functionality

For example: in order to see how the feature works, the user can:

  • Ask the Access point to open a TCP connection to the SimpleLink device
  • After the TCP connection is established the device will simply enter LPDS mode (NWP is still awake) until new packets are received (e.g each 5 seconds, NWP as wakeup source)
  • Send X packets each Y seconds to the SimpleLink device from the Access Point
  • During the interval, the application processor will sleep and save power

These procedures can be done using iperf or a dedicated script

Application Design Details

  • The application is based on the Provisioning application, and as such requires exactly the same from the user.

  • The application is designed to enter LPDS once a TCP connection is established, and be awoken when a packet is received (on the TCP port).

Please install the latest CC32xx Service Pack in order to get the most optimization and lowest current consumption.

References

  • For more detailed information please refer to the programmer’s user guide and review the Trigger Mode feature (6.7.2) http://www.ti.com/lit/SWRU455
  • For more detailed information please refer to the programmer’s user guide and review the Provisioning chapter 15: http://www.ti.com/lit/SWRU455
  • For more detailed information regarding the provisioning feature, please refer to the provisioning application report: http://www.ti.com/lit/SWRA513

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top