Texas Instruments | CC1110 and CC2510 Mini DK Software Example | User Guides | Texas Instruments CC1110 and CC2510 Mini DK Software Example User guides

Texas Instruments CC1110 and CC2510 Mini DK Software Example User guides
CC1110 & CC2510
Mini DK Software Example
User’s Guide
SWRU237
swru237
Table of content
1
Introduction .................................................................................................................. 3
2
About this manual ........................................................................................................ 3
3
Acronyms ..................................................................................................................... 3
4
Flow chart for the application ...................................................................................... 4
5
Application example..................................................................................................... 5
5.1
Introduction ............................................................................................................. 5
5.2
Running the application ........................................................................................... 6
5.3
Software.................................................................................................................. 6
5.3.1
Master node ..................................................................................................... 6
5.3.2
Slave node ....................................................................................................... 7
5.3.3
Software features ............................................................................................. 7
5.3.3.1 Adaptive power adjustment ........................................................................... 7
5.3.3.2 Random Address .......................................................................................... 8
5.3.3.3 Packet format................................................................................................ 9
5.3.3.4 Frame time ................................................................................................... 9
5.3.3.5 Power Mode................................................................................................ 10
5.3.3.6 Reset Device .............................................................................................. 10
5.3.4
Software structure .......................................................................................... 11
6
7
Power profiles............................................................................................................. 12
6.1
Master node at -20 dBm output power ................................................................... 12
6.2
Master node at 0 dBm output power ...................................................................... 13
6.3
Master node at 10 dBm output power .................................................................... 13
6.4
Master node with 3 cycles of TX/RX ...................................................................... 14
6.5
Master node retransmits 3 times without ACK........................................................ 14
6.6
Slave node under typical conditions....................................................................... 15
References.................................................................................................................. 16
2/16
swru237
1
Introduction
This document describes how to run the Simple Link application that is pre-programmed on
the CC1110 and CC2510 Mini Development Kits.
The application is a robust link test. It consists of two end devices, a MASTER and a SLAVE,
which establish a direct peer-to-peer connection using SimpliciTI.
The Simple Link application is written for the IAR Embedded Workbench for 8051 and is
based on SimpliciTI 1.1.0 [1].
The application operates at 868.3 MHz for the CC1110 and 2.42575 GHz for the CC2510. It
uses GFSK modulation and a bit rate of 2.4 kbps for both chips.
2
About this manual
This manual covers the Simple Link application for the CC1110 and CC2510 Mini
Development Kit. It describes how the application works, shows power profiles and explains
features implemented in the application.
3
Acronyms
ACK
CCA
DK
GFSK
I/O
IC
ISM
LED
LPM
LPRF
MCU
PCB
PCB
PM {0-3}
RAM
RF
RSSI
RX
SoC
SRD
TI
TX
UART
Acknowledgment
Clear Channel Assessment
Development Kit
Gaussian Frequency Shift Keying
Input/ Output
Integrated Circuit
Industrial, Scientific and Medical
Light Emitting Diode
Low Power Mode
Low Power RF
Micro Controller Unit
Printed Circuit Board
Printed Circuit Board
Power Mode 0-3
Random Access Memory
Radio Frequency
Received Signal Strength Indication
Receive
System on Chip
Short Range Device
Texas Instruments
Transmit
Universal Asynchronous Receive Transmit
3/16
swru237
4
Flow chart for the application
The flow chart shows an overview of the application.
Figure 1 Flow chart for the Simple Link Application
4/16
swru237
5
Application example
5.1
Introduction
The SmartRFCC1110 and SmartRFCC2510 target boards are preprogrammed with the
Simple Link Application. The application is an easy to use and robust link tester. It consists of
a master node and a slave node that continuously send packets between each other.
When the power supply is attached, both LED’s on the board will light for approximately 1
sec, indicating power on. After power up, the board will go to sleep in power mode 3 (PM3)
and stay there until a button is pressed. Depending on button push, the node will enter either
a master or a slave mode.
Figure 2 Application start up
Master
If the MASTER button (S1) is pressed, the node will try to establish link with a slave node.
Both LED’s will blink at a high rate (1.4 Hz) until this link is established. When the link is
established, the master node will send packets approximately every 630 ms and wait for an
acknowledgment (ACK) from the slave node. The green LED will blink each time an ACK is
received.
Slave
If the SLAVE button (S2) is pressed, the node will try to establish link with a master node.
Both LED’s will blink at a low rate (0.11 Hz) until link is established. The red LED will light
continuously when the link is valid. The green LED will blink each time a packed is received
and an acknowledgment (ACK) is sent to the master node. To make the application more
robust and less exposed to timing difficulties, the slave node is continuously in RX except
when transmitting ACK.
This application uses power modes and an adaptive power adjustment to reduce power
consumption, increase battery lifetime and avoid saturation. See 5.3.3.1 and 5.3.3.5 for
details.
5/16
swru237
5.2
Running the application
To start the application, follow these steps:
1. Insert 2x AAA batteries in each board
2. Set the jumper in position 1-2 on the power supply selection connector P1 to power
up the board. Both LED’s will be on for 1 s before the board goes to sleep in PM3.
3. Set one board in master mode by pressing the MASTER (S1) button. Both LED’s will
flash rapidly while this master node tries to establish link with the slave node.
4. Set the other board in slave mode by pressing the SLAVE (S2) button. Both LED’s
will flash very slowly while the slave tries to establish link with the master node.
5. When the two nodes are successfully linked, they will periodically send packets
between them until the link is broken.
For more details, please see the CC1110 Mini Development Kit 868-915 MHz Quick Start
Guide and the CC2510 Mini Development Kit Quick Start Guide ([2] and [3]).
5.3
Software
This section describes the software for the Simple Link Application. Full source code for the
application is available on the CC1110 Mini DK and the CC2510 Mini DK websites ([6] and
[7]). It is written for the IAR Embedded Workbench for 8051 and is based on the SimpliciTI
1.1.0 protocol stack [1].
The software includes both MASTER and SLAVE function. The function used is dependent on
which button was pressed after power up.
5.3.1
Master node
When a node is in master mode, it will continuously send data packets to the slave node.
After each packet is sent, the master node goes in RX and waits for an acknowledgment
(ACK) from the slave node. After 250 ms the master nodes checks if ACK is received. If ACK
is received, the node turns on the green LED for 500 ms before it sends a new data packet.
If the master node does not receive any ACK after the first package is sent, it retransmits the
package up to two more times. After tree attempts without receiving ACK, the node turns on
the red LED for 500 ms.
Figure 3 Cycle for master node
To reduce power consumption, the master node goes to sleep in PM3 after 90 sec without
any ACK. Both the LEDs on the master node board will be on for 3 s to indicate this state.
The node can be woken up by pressing the MASTER button (S1).
Both the data packet the master node sends and the ACK it receives from the slave node are
24 bytes long with 2 byte payload. See section 5.3.3.3 for more details. With a RX time of 250
ms, the master node can receive data packets up to 37 bytes before it checks for ACK.
As a test function, if the SLAVE button on the master node is pressed during operation, both
LED’s on this board will be on for 5 sec.
6/16
swru237
5.3.2
Slave node
If a node is in slave mode, the radio will be in RX waiting for data packages from the master
node. Each time the slave node receives a data packet it responds by sending an ACK back
to the master node. When the ACK is sent the node turns on the green LED for 250 ms
before returning to RX ready for the next data packet.
Chip in RX
Send ACK/Chip in
TX
Receive package
Green LED on for
250 ms
Figure 4 Cycle for slave node
The slave node does not use PM3 to go to sleep after a period without receiving packets like
the master node has. This is because it is intended to be on a fixed power source. However,
with the introduction of a timer-control to the protocol, this can be implemented.
5.3.3
Software features
5.3.3.1 Adaptive power adjustment
To reduce power consumption and avoid saturation, the application uses a simple adaptive
output power method to regulate the output power for both nodes. There are three output
power steps as seen in Table 1. These steps are chosen to give the application a large range
of power settings and at the same time keep the application simple.
Output power:
CC1110
PA value
CC2510
PA value
MAXIMUM_OUTPUT_POWER
10 dBm
0xC0
0 dBm
0xC1
MEDIUM_OUTPUT_POWER
0 dBm
0x50
-10 dBm
0xCB
MINIMUM_OUTPUT_POWER
-20 dBm
0x0E
-20 dBm
0xFF
Table 1 Output power table with PA value for register setting
Algorithm
When a node receives a package, it reads the RSSI (received signal strength indicator) and
checks if it is within an interval set by an upper and lower threshold of -40 and – 70 dBm. This
interval is set to be well below the saturation point for the radio, but still have good margin to
the sensitivity limit. This interval is chosen to make the application robust and is not optimized
to reduce power consumption. If the signal strength is not within this interval, the node
requests the output power from the other node to be reduced or increased, depended on the
RSSI reading.
7/16
swru237
Figure 5 Sequence diagram of the adaptive power adjustment
Since the above method uses the data from the transmissions between the nodes to regulate
its output power, the method will not work before there is a valid link between the two nodes.
For the initial link procedure the output power is set to maximum. Using maximum output
power increases the chance for the nodes to establish link even if the nodes are far apart.
There is no RSSI reading before the first packet is sent from a node, therefore the first packet
is also sent at maximum power. All other packets are being sent at the power setting
requested from the other node.
If the distance between the two nodes is changed faster than the method regulates the power
output, packets may be lost due to received signal being either to high (above saturation
point) or to low (below sensitivity limit). High interference close in frequency will affect the
RSSI reading and may also result in packets being lost.
For the CC1110 Mini Development Kit
When establishing link between the nodes, the output power is set at maximum value of 10
dBm. If the nodes are to close together, the receivers may be saturated and the nodes will not
be able to establish link. During the link procedure, be sure to have the nodes at least 1meter
apart to avoid saturation. After link is established the adaptive power adjustment works, and
the nodes can be moved closer together.
5.3.3.2 Random Address
The link establishing sequence consists of setting up a network with two end devices. In order
to establish this network, each node must have a unique address. The address is 4-bytes
long and is generated when the application starts.
The Random Number Generator on the SoC is used to generate the address. To get true
random values, the function samples the temperature from the temperature sensor and uses
the lower bits containing noise to seed the number generator. See the CC1110/C2510
datasheet for reference ([4] and [5]).
If the two nodes produce the same address, they will not be able to establish link. To
generate a new address the node must be reset. See section 5.3.3.6 for details on resetting
the nodes.
8/16
swru237
5.3.3.3 Packet format
The format of the data packet follows the SimpliciTI standard, and for this application consists
of the following items:
Preamble Sync Word Length MISC DSTADDR SRCADDR PORT DEVICE INFO TRACKID APP PAYLOAD
4
4
1
0
4
4
1
1
1
2
FCS
2
Table 2 Data packet format
For details about each item, please see chapter 6 in the SimpliciTI Specification [8]
The payload consists of two bytes, indicating current power level and requested power level.
It has the following format:
1st Byte
2nd Byte
Requested power level
Current power level
Table 3 Application payload format
Requested power level is the power level the node wants the other node to send its next
data package with. This is used for the adaptive power adjustment. Current power level is
the power level the node has used to send the current data package.
Both the packets sent by the master node and the ACK’s sent from the slave follows this
format.
5.3.3.4 Frame time
For this application, the frame time is defined as the time the master node uses from sending
a packet, to it has toggled one of the LED’s and is ready to send a new packet.
In this application the frame time is not constant. This is because all the delays are set to a
constant length. This will give a varying frame time depending on how many times the master
node re-transmits a packet, see more in Figure 6. For the user this may be experienced by an
uneven interval between the green flash on the master and slave node.
Frame size with 3 retries
Typical transition
20
18
16
14
Current (mA)
12
10
8
6
Typical frame size
4
2
Frame size with 3 retries
0
0
300
600
900
1200
1500
Time (ms)
Figure 6 Different frame time dependent of retries
9/16
1800
swru237
5.3.3.5 Power Mode
The application uses two different power modes, PM2 and PM3. In PM3 all internal circuits,
oscillators and voltage regulators are turned off. The system will go in active mode on reset or
external interrupt (e.g. button push). In PM2 the low speed RC oscillator is still on and the
system will go in active mode on either timer or external interrupt.
The power modes are used to reduce power consumption. Note however that the application
is not optimized for power consumption. When PM2 is used with the sleep timer, the I/O ports
are not guarantied to be in optimum states. To minimize current consumption in sleep mode,
be sure to set all the I/O pins according to load as described in section 12.4 in the
CC1110/CC2510 data sheet [4], [5].
For more information about power modes, see design note DN106 [9].
5.3.3.6 Reset Device
In order to exit MASTER or SLAVE mode on a node, the board must be reset. This is done by
removing the jumper on P1 and pushing one of the buttons to discharge the large capacitor
on the power line. Re-mount the jumper on P1 to power the board again.
10/16
swru237
5.3.4
Software structure
The source code for the application is available on the CC1110 Mini DK and CC2510 Mini DK
website [6], [7].
The IAR project (smpl_link) is organized into 2 different configurations:
 smpl_link – srfccxx10_cc1110: This configuration is used for the SmartRFCC1110
Target Board with the CC1110 SoC.
 smpl_link – srfccxx10_cc2510: This configuration is used for the SmartRFCC2510
Target Board with the CC2510 SoC.
The source code for the Simple Link application is structured into the following files:
 smpl_link.c: Contains implementation of the Simple Link application for the
SmartRFCC1110 and SmartRFCC2510 Target Board.
 bsp_extended.c: Contains extended board specific functions such as random
address, sleep functions and interrupt routines.
 smartrf_CC1110_srfcc1110.h: Radio register settings for the CC1110 SoC.
 smartrf_CC2510_srfcc2510.h: Radio register settings for the CC2510 SoC.
Radio register settings can
smartrfcc2510_srfcc2510.h file.
be
changed
in
the
smartrf_cc1110_srfcc1110.h
or
The following changes where done to the standard distribution of SimpliciTI 1.1.0:

Added header file bsp_extended.h and source file bsp_extended.c, which includes
board specific functions. This includes random address generation, interrupt routines
and sleep functions for the application.

Changed the
mrfi_f1f2.c:
CC1110
old value
0x0E
0x27
0x50
power settings in RF power tables for CC1110 and CC2510 in
CC1110
new value
0x0E
0x50
0xC0
CC2510
old value
0xC1
0xCB
0xFE
CC2510
new value
0xC1
0xCB
0xFF

Changed mrfi_f1f2.h to include the register files smartrf_CC1110_srfcc1110.h and
smartrf_CC2510_srfcc2510.h instead of smartrf_CC1110.h and smartrf_CC2510.h.

In nwk_globals.c edited the function nwk_globalsInit so it doesn’t overwrite the
address that the random address function in bsp_extended.c generates.

Changed MRFI_MIN_SMPL_FRAME_SIZE in mrfi_radio.c so the radio will accept
packets with 0 bytes payload. This is however not used by this application since we
have a payload.
11/16
swru237
6
Power profiles
This section includes plots describing current consumption for the master and slave node for
the CC1110 Mini Development Kit under typical conditions. All plots and measurements are
done with 3 V power supply at room temperature.
Output power
TX
RX
Idle
-20 dBm
17 mA
23 mA
3.5 mA
0 dBm
22 mA
23 mA
10 dBm
45 mA
23 mA
PM2 with 1 LED on
PM2*
PM3
4 mA
0.6 µA
0.3 µA
3.5 mA
4 mA
0.6 µA
0.3 µA
3.5 mA
4 mA
0.6 µA
0.3 µA
Table 4 Current consumption under typical conditions for CC1110 Mini DK
* I/O pins optimized for current consumption. Not used in this application.
6.1
Master node at -20 dBm output power
Current consumption -20dBm
25
5.
2.
20
Current (mA)
6.
15
3.
1.
4.
10
8.
TX
RX
7.
5
0
-100
-75
-50
-25
0
25
50
75
100
125
150
175
200
225
250
275
300
325
350
375
Time (ms)
Figure 7 Current consumption for CC1110 Mini DK at -20dBm output power
Details
1. Wakes up from PM2, turns off green LED. System goes from RC oscillator to crystal
oscillator.
2. Radio goes in RX and does a Clear Channel Assessment (CCA) before it goes in TX.
3. Radio in TX. Sends data packet
4. Radio goes from TX to idle before it enters RX.
5. Radio in RX at full gain.
6. Receives ACK, gain reduced.
7. When package is received, the radio goes in idle to reduce power consumption.
8. The application checks if it has received an ACK. Then it turns on green LED and
goes to sleep in PM2. The radio goes from crystal to RC oscillator.
12/16
swru237
6.2
Master node at 0 dBm output power
Current consumption 0dBm
25
Current (mA)
20
15
10
RX
TX
Idle
5
0
-100
-50
0
50
100
150
200
250
300
350
Time (ms)
Figure 8 Current consumption for CC1110 Mini DK at 0dBm output power
6.3
Master node at 10 dBm output power
Current consumption 10dBm
45
40
35
Current (mA)
30
25
20
15
RX
TX
10
Idle
5
0
-100
-50
0
50
100
150
200
250
300
350
Time (ms)
Figure 9 Current consumption for CC1110 Mini DK at 10dBm output power
13/16
swru237
6.4
Master node with 3 cycles of TX/RX
Current consumption -20dBm
25
Current (mA)
20
15
10
TX
RX
LPM
TX
LPM
RX
RX
TX
5
1.
0
-100
0
100
2.
200
3.
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500
1600
1700
1800
Time (ms)
Figure 10 Time plot of tree TX/RX cycles
Details
1. Application sends one package, goes in RX and receives ACK.
2. When package is received, the radio goes in idle to reduce power consumption.
3. Low power mode (LPM). Green LED is on and radio in PM2.
6.5
Master node retransmits 3 times without ACK
Current consumption -20dBm
25
Current (mA)
20
15
TX
RX
TX
RX
TX
RX
10
5
0
-50
0
50
100
150
200
250
300
350
400
450
500
550
600
650
700
750
800
850
900
Time (ms)
Figure 11 Current consumption for CC1110 Mini DK at -20dBm output power and 3
retransmits
14/16
swru237
6.6
Slave node under typical conditions
Current consumption -20dBm
35
30
Current (mA)
25
20
2.
4.
15
1.
10
5.
3.
5
0
0
200
400
600
800
1000
1200
1400
Time (ms)
Figure 12 Slave node sending 2 ACK’s
Details
1.
2.
3.
4.
5.
Radio in RX waiting for package.
Receiving package. Gain reduced.
Sending ACK back to master node. Radio in TX.
Green LED on for 250 ms.
Radio in RX.
15/16
1600
1800
swru237
7
References
[1] SimpliciTI Compliant Protocol Stack
http://focus.ti.com/docs/toolsw/folders/print/simpliciti.html
[2] CC1110 Mini Development Kit 868-915 MHz Quick Start Guide
http://www.ti.com/lit/swru234
[3] CC2510 Mini Development Kit Quick Start Guide
http://www.ti.com/lit/swru235
[4] C1110 Data Sheet
http://focus.ti.com/lit/ds/symlink/cc1110f32.pdf
[5] C2510 Data Sheet
http://focus.ti.com/lit/ds/symlink/cc2510f32.pdf
[6] CC1110 Mini Development Kit website
http://focus.ti.com/docs/toolsw/folders/print/cc1110dk-mini-868.html
[7] CC2510 Mini Development Kit website
http://focus.ti.com/docs/toolsw/folders/print/cc2510dk-mini.html
[8] SimpliciTI Specification
Found under documents in the SimpliciTI installation folder under [1]
[9] Design note DN106: Power Modes in CC111xFx, CC243x, and CC251xFx
http://www.ti.com/lit/swra162
8
Document History
Revision
Date
swru237
2009-09-02
Description/Changes
First official revision.
16/16
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements,
and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should
obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are
sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard
warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where
mandated by government requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and
applications using TI components. To minimize the risks associated with customer products and applications, customers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right,
or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
published by TI regarding third-party products or services does not constitute a license from TI 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 TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied
by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive
business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional
restrictions.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all
express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not
responsible or liable for any such statements.
TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably
be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing
such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and
acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products
and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be
provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in
such safety-critical applications.
TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at
the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.
TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are
designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated
products in automotive applications, TI will not be responsible for any failure to meet such requirements.
Following are URLs where you can obtain information on other Texas Instruments products and application solutions:
Products
Amplifiers
Data Converters
DLP® Products
DSP
Clocks and Timers
Interface
Logic
Power Mgmt
Microcontrollers
RFID
RF/IF and ZigBee® Solutions
amplifier.ti.com
dataconverter.ti.com
www.dlp.com
dsp.ti.com
www.ti.com/clocks
interface.ti.com
logic.ti.com
power.ti.com
microcontroller.ti.com
www.ti-rfid.com
www.ti.com/lprf
Applications
Audio
Automotive
Broadband
Digital Control
Medical
Military
Optical Networking
Security
Telephony
Video & Imaging
Wireless
www.ti.com/audio
www.ti.com/automotive
www.ti.com/broadband
www.ti.com/digitalcontrol
www.ti.com/medical
www.ti.com/military
www.ti.com/opticalnetwork
www.ti.com/security
www.ti.com/telephony
www.ti.com/video
www.ti.com/wireless
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2009, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising