CC2530 UserManual
CC2530 UserManual
CC2530 UserManual
Core2530/XCore2530
User Manual
CONTENTS
1. Introduction ..................................................................................................................................... 2
Appendix................................................................................................................................................. 21
1. INTRODUCTION
The firmware provided with the module should be applied. Under this condition, the
module would serve as a Zigbee wireless serial port. With the simple operations of the
module, as easy as that of the serial port, you do not need to know much about the
complex Zigbee protocol.
For development (Users should perform a secondary development to the module for
implementing the underlying application):
You need to write the Zigbee communication protocol code by yourself. In this case, you
should use the downloader, such as CC Debugger, and learn the Zigbee protocol.
Features:
Core2530 XCore2530
Zigbee network needs minimum a coordinator and a router. Since the Core2530/XCore2530 module
has a built-in Bootloader in default setting, you can download the firmware to the module directly via
the serial port.
Notes: In the Zigbee network experiment, you may need to apply two pieces of
Core2530/XCore2530 modules, and two pieces of ZB502/ZB600 baseboards.
1. Coordinator
Select a communication channel and a PAN ID to build a network;
Allow other routers and end devices to join this network;
Route the data in the network;
Must be kept power supplying, and must not enter the SLEEP mode;
Preserve data for the end devices entered SLEEP mode till them wake up and retrieve the
data.
2. Router
Must join a Zigbee network before performing data transmission;
Allow other routers and end devices to join the network, after it joined one;
Route the data in the network upon joining the network;
Must be kept power supplying, and must not enter the SLEEP mode;
Preserve data for the end devices entered the SLEEP mode till them wake up and retrieve
the data.
3. End Device
Must join a Zigbee network before performing data transmission;
Not allow other devices to join the network;
Transmit and receive data thought parent node, unable to route the data in the network;
Support battery power supply and SLEEP mode.
2.2. BOOTLOADER
1. Introduction
The built-in Bootloader enable users to download the program to the module directly via a serial port
without using the CC Debugger. However, the CC Debugger is required in the course of programming
the Bootloader into the module. For more detailed information, please refer to the Section How to
program Bootloader.
There are two different Bootloaders available for this module: bootloader.hex and
bootloader_wait.hex.
For easier understanding, we call the module with the bootloader.hex as module A, and the module
with the bootloader_wait.hex as module B in this document.
The module A will execute the valid program immediately, if any, in the Flash memory, after powered
up. Otherwise, its LED1 will keep blinking indicating that there is no program in the Flash memory and
you can download a new one via the serial port in this case.
For module B, its LED1 and LED2 will blink alternately, if there is any valid program stored in the Flash
memory, after powered up. Now, if you press the button KEY2, the module B will execute the
program immediately; and if you press the button KEY1, the module B will enter the Bootloader mode
under which you can download a new program to the module B. In case of no key-press action within
40 seconds after powered up, the module B will execute the program in the Flash memory
automatically. When there is no valid program in the Flash memory, its LED1 will keep blinking, and
you can download a new one via the serial port in this case.
The module A with bootloader.hex is suitable for independent application, since it can run the
program directly without any external key-press trigger. However, the module B with the
bootloader_wait.hex should work with the baseboard ZB502/ZB600 for relative experiments and
studies. By default, the bootloader_wait.hex is programmed to the module.
Click the button Install, and wait till the installation finished.
When finished, connect the CC Debugger to your PC, and open the option Device Manager
in Windows. You may find the option CC Debugger if its driver is installed successfully.
Select the option Program CCxxxx Soc or MSP430 in the pulled-down menu What do you
want to program?, and choose the image file you want to program within the Flash image
box. Here, it is bootloader_wait.hex. And then, click the button Perform actions to start
programming.
When finished, there will be a message Erase, program and verify OK appears on the
bottom of the window, and the LED1 of the baseboard will keep blinking indicating that
program downloading is successful.
In this section, we will illustrate how to build a Zigbee network by applying two groups of Core2530 +
ZB600, one works as a coordinator and the other one works as a router. For easier understanding, we
call the coordinator as Group A and the router as Group B.
Connect the Group A and the Group B to your PC with the USB cables, respectively. And get
their corresponding serial port numbers after powered up.
If the firmware has been installed to the Group A or/and the Group B, the LED1 and the
LED2 on the Core2530 module(s) will blink alternately after resetting. Pressing the button
KEY1 to enter the Bootloader mode, you will see the LED1 keep blinking. When there is no
firmware in the Core2530 module(s), the LED1 will keep blinking after powered up, which
means the Core2530 module(s) has entered the Bootloader mode directly and there is no
need to press the button KEY1 again.
Start the software SBDemo.exe for firmware downloading.
10
Enter the corresponding serial port of the Group A in the COM Port box, and click the
button to select the firmware file Coordinator.bin in the Image File box. Then, click the
button Load Image to start downloading.
For the Group B, select the firmware file Router.bin. The file download method is the same
as that of the Group A.
Start two serial debug assistants, and enter the serial port number of the Group A to one of
the assistants and the port number of the Group B to the other one. Then, set the Baud
rate: 38400, Data bit: 8 and Stop bit: 1;
Reset the Group A, you can see the LED1 and the LED2 on its Core2530 module blink
alternately. Pressing the middle button of the joystick, you will see the message Device
starting ok displayed in the window and the LED3 lights up, if the network is built up
successfully.
Reset the Group B, you can see the LED1 and the LED2 on its Core2530 module blink
alternately. Pressing the middle button of the joystick, you will see the message Device
starting ok displayed in the window and the LED3 lights up, if the Group B, severing as a
router, has joined the network successfully. Now, the Zigbee network is running. (If no
external antenna is applied to the Group B, it is recommended to place the antenna
interface of the Group B close to the antenna interface of the Group A, in order to ensure
the wireless network signal is strong enough.)
Notes:
11
1. The middle button of the joystick on the ZB600 is corresponding to the button KEY2 on the
ZB502.
2. The power amplifier (PA) of Xcore2530 has occupied the Pins P1_1 and P1_4. Hence, the
LED2 will not blinking after the Xcore2530 module reset, and the LED3 will keep OFF even if
the network is built up successfully.
The operations presented below can be done directly by UART serial communication.
Description: Under this mode, a device can broadcast messages to all the other devices in the Zigbee
network.
EXAMPLE:
To broadcast the message Hello Waveshare throughout the network from a device, the relative
operations are as follow:
Enter the message to be broadcasted into the character string input box, and click the button Send:
Hello Waveshare
All the other devices, including routers and coordinators, will receive this message in their character
string receiving boxes.
Hello Waveshare
Description: It is the communication between any two nodes in the same network.
12
EXAMPLE:
To send the message Hello World from the module A to the module B, the relative operations are
as follow:
Read the short addresses of the module A and the module B by the command
AT+GETADDR
Enter the command AT+GETADDR into the character string input box:
AT+GETADDR
Then, you may get the addresses of the module A and the module B:
On the module A, apply P2P command to send the message to the module B:
Except the module B, other nodes and routers in the network will not receive the message:
Hello World
Description: A node sends data to the specified nodes in the same network.
Format: O2M Quantity of target address Target address 1 Target address 2 Data to be sent
13
EXAMPLE:
To send the message Hello World from the module A to the module B and the module C, the
relative operations are as follow:
Read the short addresses of the module A, the module B and the module C by the command
AT+READ_ADDR
Enter the command AT+GETADDR into the character string input box:
AT+GETADDR
Then, you may get the addresses of the module A, the module B and the module C:
On the module A, apply O2M command to send the message to the module B and the module C:
Except the module B and the module C, other nodes and routers in the network will not receive the
message:
Hello World
14
3. WORKING WITH PC
3.1. INTRODUCTION
3.2. AT COMMANDS
Command AT+RESTART
Inputted None
15
parameters
Return value RESTART OK
Remarks When the message RESTART OK is returned, the module will restart
Command AT+RESET
Return value SETUART OK SETCHN OK SETPANID OK
Remarks The settings listed below will be effective after the module restarts.
Factory settings:
PANID : 0xFFFF (random)
CHANNEL: 11/2405MHz
UART: 0 (select COM port 0
Baud rate: 38400
Flow control: 0 (None)
Command AT+SETUART Serial port number Baud rate Flow control (The command
parameters are separated by spaces)
Function Set the serial port number, Baud rate and flow control
Inputted Serial port number: it should be set to 0 to select COM Port 0 for configuration
parameters Baud rate: 9600-115200
Flow control: it should be set to 0 to turn off flow control
Return value Success: SETUART OK
Failure: SETUART ERR
Remarks Factory settings: UART: 0 (select COM Port 0)
Baud rate: 38400
Flow control: 0 (None)
16
EXAMPLE:
To set the serial Baud rate, you only need to enter AT+SETUART 0 38400 0 into the character string
input box, and click the button Send. The new settings will be effective after the module restarts. The
relative operations are as follow:
AT+SETUART 0 38400 0
Then, you may receive SETUART OK in the character string receiving box:
SETUART OK
17
If PANID0xFFFF: the device will build up or join a network with a given PANID.
Normally, PANID comes up after determining the communication channel
Command AT+GETCFG
Function Read all the configuration information
Inputted None
parameters
Return value UART: serial parameters (Baud rate, Flow control)
PANID: Local area network identifier
ADDR: the short address of the device
FADDR: the short address of the parent device
CHANNEL: the communication channel of the module
Remarks
Command AT+GETUART
Function Read the serial configuration information
Inputted None
parameters
Return value Serial port number: 0/1 (serial port 0/serial port 1
Serial Baud rate: 9600-115200
Flow control: 0/1None/flow control
Remarks
Command AT+GETCHN
Function Read the current communication channel information of the module
Inputted None
parameters
18
Command AT+GETPANID
Function Read the current PAN ID of the module
Inputted None
parameters
Return value Success: PANID=0xxxx;
Failure: PANID=0xFFFE
Remarks
Command AT+GETADDR
Function Read the short address of the device
Inputted None
parameters
Return ADDR=0xXXXX;
Remarks Short address length: 16 bits
This command is used in P2P or O2M communication
Command AT+GETFADDR
Function Read the short address of the parent node
Inputted None
parameters
Return value FADDR=0xXXXX;
Remarks Short address length: 16 bits
19
Command AT+GETIEEE
Function Read the IEEE address of the device
Inputted None
parameters
Return IEEE=xx xx xx xx xx xx xx xx
Remarks The IEEE of the device is a 64-bit address
Command AT+GETFIEEE
Function Read the IEEE address of the parent node
Inputted None
parameters
Return value MY_FIEEE=xx xx xx xx xx xx xx xx
Remarks The IEEE of the parent node is a 64-bit address
20
APPENDIX
1. ZB502
For more information about ZB502 baseboard, please refer to the links listed below:
2. ZB600
Comparing with ZB502, ZB600 has some improvements: adding an AD conversion interface, a sensor
interface, a LCD interface and a joystick.
21
For more information about ZB600 baseboard, please refer to the links listed below:
3. CC Debugger
CC Debugger can work with the TI SmartRF Flash Programmer for program downloading, and the TI
SmartRF Studio for testing and debugging CCxxxx series devices. It can also cooperate with the IAR
Embedded Workbench for 8051 to build up the development environment and implement seamless
connection.
22
For more information about the CC Debugger, please refer to the links listed below:
23