前言
SubG一直都在接触,但就是没有入手去学习。这次刚好要用到,做点笔记。
开发环境搭建
TI现在的开发环境换成了一套基于开源Eclipse的IDE,不用再为IAR而烦恼了。具体操作细节可以看官方说明:
Getting Started with CC13xx Software Examples (Code Composer Studio (CCS))
1.Download and install TI-RTOS SimpleLink bundle from the link above.
2.Download and install CCS here.
3.Once you open CCS, click on “Browse Examples”. This will open up the Resource Explorer, from where you can import example projects directly into your CCS workspace.
4.Select one of the examples, e.g. RF Packet TX, and click the “Import” button.
5.Build the project; the first time it will take some time, due to the TI-RTOS kernel is also built.
6.Connect your CC1310DK to your PC and download to your CC130DK via the Debug button.
7.Start the program by clicking “Run”.
8.The RF Packet TX example will transmit packets every 100ms, indicated by LED3 blinking.
9.Follow the same procedure to import the RF Packet RX example in order to receive the packets. You can also use SmartRF Studio to capture packets.
例程简介Software Examples
Packet RX/TX
- The most fundamental examples written directly on top of the TI-RTOS RF driver, shall be used as base for customers own applications using the RF driver.
// 在在TI-RTOS的RF驱动层上编写的最基础的例程,应当是用户使用RF驱动编写自己的应用程序的基础。
- The Packet RX/TX examples illustrate how to do simple packet RX/TX using the TI-RTOS RF driver. Using the RF driver ensures optimal RF and power performance.
// 这个例程展示使用TI-RTOS的RF驱动来进行简单的数据收发。使用RF驱动保证最优的RF和电源性能。
- The PHY/RF settings can be modified using SmartRF Studio. Commands exported and used directly in code.
// PHY/RF设置可以通过SmartRF Studio修改。命令导出,可直接在代码中使用。
- Out of the box IEEE 802.15.4g GSFK 50 kbps is used. Easy to change to e.g. Long Range Mode or custom settings.
// 使用802.15.4g GFSK 50kps的频段。很容易切换到长距离模式或者自定义设置。
Carrier Wave
- Basic example for RF performance measurements and testing, written directly on top of the TI-RTOS RF driver.
// 做射频评测的基础例程,在TI-RTOS的RF驱动层上直接编写的。
- Set the radio into various test modes.
// 将射频设成不同的测试模式。
- Transmission of modulated or unmodulated signal.
// 传输调制或者非调制的信号。
- Easy to change radio configuration.
// 易于修改射频配置。
- Use radio settings exported from SmartRF Studio.
// 使用SmartRF Studio导出的射频配置
EasyLink RX/TX
- EasyLink is a simplified API on top of the RF driver, intended to be used as a starting point for creating a proprietary sub-1 GHz protocol. Read more about EasyLink here.
// EasyLink是一个在RF驱动层之上的精简API,为创建subG协议提供一个基础。
- The EasyLink RX and TX examples show how to use the EasyLink API to access the TI-RTOS RF driver, how to set the frequency, and how to transmit and receive packets.
// 例程展示如何使用EasyLink API来接入TI-RTOS的RF驱动层,怎样设置频段,以及怎样传输和接收数据包。
- One board can run the RX example while the other runs the TX example.
// 一个板子运行RX例程,另一个板子运行TX例程
- The transmitter sends a packet every 100 ms, with a delay of 300ms between every 10th packet.
// 发送端每100ms发送一个数据包,每发10个数据包之后延时300ms
- The LED on the receiver board will blink for every packet received.
// 接收端的LED每收到一个数据包就会闪烁。
Wireless Sensor Network
- The Wireless Sensor Network (WSN) Node and Concentrator examples illustrate how to create a very basic sensor network consisting of one or many Node device(s) and a Concentrator device. The example shows how to form a one-to-many network where the Nodes send messages to the Concentrator.
// 例程展示了怎么样建立一对多的网络,节点发消息给协调器。
- The Node use the Sensor Controller Engine to periodically read the value of the light sensor.
// 节点使用传感控制引擎周期性地读取光感。
- Whenever the sensor value change, the main controller wakes up and sends a packet with the value to the Concentrator.
// 当传感器数值变化,主控制器会唤醒,发送一包给协调器。
- The Concentrator is always waiting for incoming packet.
// 协调器一直在等待接收数据。
- Once a packet is received, the Concentrator sends an acknowledgement packet in return and displays the data on an LCD (if the kit has one)
// 一旦收到数据包,协调器就返回一个应答包,然后显示数据在LCD上