ETC 802154EVKUG

802.15.4/ZigBee Evaluation Kit
(13193EVK)
User’s Guide
802154EVKUG/D
Rev. 0.0, 11/2004
How to Reach Us:
USA/Europe/Locations Not Listed:
Freescale Semiconductor Literature Distribution Center
P.O. Box 5405
Denver, Colorado 80217
1-800-521-6274 or 480-768-2130
Japan:
Freescale Semiconductor Japan Ltd.
Technical Information Center
3-20-1, Minami-Azabu, Minato-ku
Tokyo 106-8573, Japan
81-3-3440-3569
Asia/Pacific:
Freescale Semiconductor Hong Kong Ltd.
2 Dai King Street
Tai Po Industrial Estate
Tai Po, N.T., Hong Kong
852-26668334
Home Page:
www.freescale.com
Information in this document is provided solely to enable system and software
implementers to use Freescale Semiconductor products. There are no express or
implied copyright licenses granted hereunder to design or fabricate any integrated
circuits or integrated circuits based on the information in this document.
Freescale Semiconductor reserves the right to make changes without further notice
to any products herein. Freescale Semiconductor makes no warranty, representation
or guarantee regarding the suitability of its products for any particular purpose, nor
does Freescale Semiconductor assume any liability arising out of the application or
use of any product or circuit, and specifically disclaims any and all liability, including
without limitation consequential or incidental damages. “Typical” parameters that may
be provided in Freescale Semiconductor data sheets and/or specifications can and
do vary in different applications and actual performance may vary over time. All
operating parameters, including “Typicals”, must be validated for each customer
application by customer’s technical experts. Freescale Semiconductor does not
convey any license under its patent rights nor the rights of others. Freescale
Semiconductor products are not designed, intended, or authorized for use as
components in systems intended for surgical implant into the body, or other
applications intended to support or sustain life, or for any other application in which
the failure of the Freescale Semiconductor product could create a situation where
personal injury or death may occur. Should Buyer purchase or use Freescale
Semiconductor products for any such unintended or unauthorized application, Buyer
shall indemnify and hold Freescale Semiconductor and its officers, employees,
subsidiaries, affiliates, and distributors harmless against all claims, costs, damages,
and expenses, and reasonable attorney fees arising out of, directly or indirectly, any
claim of personal injury or death associated with such unintended or unauthorized
use, even if such claim alleges that Freescale Semiconductor was negligent
regarding the design or manufacture of the part.
Learn More: For more information about Freescale products, please visit
www.freescale.com.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
All other product or service names are the property of their respective owners.
© Freescale Semiconductor, Inc. 2004. All rights reserved.
Zigbee™ is a trademark of the Zigbee Alliance.
Contents
About This Book............................................................................................................ v
Audience ......................................................................................................................................... v
Organization.................................................................................................................................... v
Conventions ................................................................................................................................... vi
Definitions, Acronyms, and Abbreviations ................................................................................... vi
References..................................................................................................................................... vii
Revision History ........................................................................................................................... vii
Chapter 1 Safety Information .................................................................................... 1-1
Chapter 2 13193EVK Components............................................................................ 2-1
2.1
13193EVK Contents ........................................................................................................ 2-2
Chapter 3 Board Overview ........................................................................................ 3-1
3.1
3.1.1
3.1.2
3.1.3
3.2
3.3
Common Board Components........................................................................................... 3-1
MC9S08GT60 MCU........................................................................................................ 3-1
MC13192 RF Data Modem ............................................................................................. 3-1
MMA1260D and MMA6261Q Acceleration Sensors ..................................................... 3-1
13192-EVB Description................................................................................................... 3-2
13192-SARD Description................................................................................................ 3-4
Chapter 4 Software Installation................................................................................. 4-1
Chapter 5 Demonstration Applications .................................................................... 5-1
5.1
5.1.1
5.1.2
5.1.3
5.1.4
5.1.5
5.1.6
5.2
5.3
5.3.1
5.3.2
5.3.3
5.4
5.5
5.6
5.7
5.7.1
5.8
5.8.1
5.8.2
5.9
Accelerometer Demonstration Application (SMAC) ...................................................... 5-2
Board Setup Overview..................................................................................................... 5-2
Board One Setup (Transmit)............................................................................................ 5-2
Board Two Setup (Receive)............................................................................................. 5-2
Verifying Operation ......................................................................................................... 5-2
Running the TRIAX Software ......................................................................................... 5-3
Viewing Data ................................................................................................................... 5-3
Range Demo Plus (SMAC).............................................................................................. 5-3
Embedded Bootloader...................................................................................................... 5-4
Board One Setup (Receive) ............................................................................................. 5-4
Board Two Setup (Transmit) ........................................................................................... 5-5
Verifying Operation ......................................................................................................... 5-5
Protocol Test Client (PTC) Demonstration Application.................................................. 5-6
Switch Demonstration...................................................................................................... 5-6
Wireless UART/Cable Replacement ............................................................................... 5-6
Test Tool Utility............................................................................................................... 5-7
13192-EVB Setup for USB Operation (Test Tool Utilities)............................................ 5-8
Embedded Bootloader...................................................................................................... 5-8
Embedded Bootloader Features ....................................................................................... 5-8
Flash Programming the 13192-EVB and 13192-SARD.................................................. 5-9
Command Console......................................................................................................... 5-12
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
iii
5.9.1
5.9.2
5.10
5.11
Command Console Basic Functionality......................................................................... 5-13
Running the Command Console .................................................................................... 5-13
Script Server................................................................................................................... 5-18
Radio Test ...................................................................................................................... 5-22
Chapter 6 Solution Development .............................................................................. 6-1
6.1
6.2
6.2.1
6.2.2
6.2.3
iv
Hardware Design and Layout .......................................................................................... 6-1
Software Applications Development ............................................................................... 6-2
Proprietary Applications (SMAC) ................................................................................... 6-3
802.15.4 Specific Applications ........................................................................................ 6-3
ZigBee Applications ........................................................................................................ 6-3
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
About This Book
This guide provides a detailed description of how to use the Freescale 802.15.4/Zigbee
Evaluation Kit (13193EVK), part number 13193EVK-A00.
The 13193EVK provides a flexible demonstration and development environment for the
Freescale ZigBee family of products. In addition to the hardware, the kit provides utilities and
sample applications that demonstrate functionality from simple proprietary applications,
802.15.4 applications, all the way to full ZigBee compatible solutions.
Audience
This document is intended for application developers.
Organization
This document is organized into 6 chapters.
Chapter 1
Safety Information — This chapter provides operating guidelines for
the 13193EVK.
Chapter 2
13193EVK Components — This chapter gives an overview of the
13193EVK and its components.
Chapter 3
Board Overview — This chapter describes the boards that ship with the
13193EVK.
Chapter 4
Software Installation — This chapter describes how to install the
software found on the 13193EVK CD.
Chapter 5
Demonstration Applications — This chapter describes the various
demonstration applications pre-loaded on the boards.
Chapter 6
Solution Development — This chapter shows users how to begin
development of an MC13192 system solution.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
v
Conventions
This document uses the following notational conventions:
• Courier monospaced type indicates commands, command parameters, code examples,
expressions, data types, and directives.
•
Italic type indicates replaceable command parameters.
•
All source code examples are in C.
Definitions, Acronyms, and Abbreviations
BDM debugger
BDM
13193EVK
GUI
MAC
MCU
NVM
PC
PCB
S19
Safe Mode Boot
HIWAVE
CPROG
vi
A debugger using the BDM interface for communication with the MCU.
An example is the P&E BDM Multilink debugger for HCS08.
Background Debug Module
The 802.15.4/Zigbee Evaluation Kit
Graphical User Interface
Medium Access Control
MicroController Unit
None-Volatile Memory
Personal Computer
Printed Circuit Board
‘S19’ is the file extension used for the Motorola binary image format. The
S19 file encapsulates the binary image as a list of ASCII records. Each
record contains a length -, address -, data - and checksum field. The 16 bit
address field allows a memory space for up to 64 KB. The S19 can be
generated with Metroworks Codewarrior IDE and is the product from the
linking process. S19 does not contain additional information to a debugger
(where to look for source files).
The Embedded Bootloader boots up using safe default system values.
P&E HCS08 debugger GUI.
P&E HCS08 flash programming tool called from HIWAVE. The tool is
also available in a command line version where scripts can be made.
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
References
[1] ZigBee.hlp (see Test Tool installation directory .\help)
[3] Freescale MC908HCS08GB60/GT60 MCU Data Sheet, MC9S08GB60/D
[4] Freescale Application Note, Handling MAC Address Erasure, AN2825/D
[5] Freescale Application Note, ZigBee/802.15.4 Evaluation Kit, Quick Start Guide, AN2772/D
[6] Freescale Embedded Bootloader Reference Manual, MC13192EBRM/D
[7] Freescale Switch Demo Application, AN2773/D
[8] Freescale Accellerometer Demo Application, AN2774/D
[9] Freescale Compact, Integrated Antennas, Designs and Applications, AN2731/D
[10] IEEE™ 802.15.4 specification 1.0
Revision History
The following table summarizes revisions to this manual since the previous release (Rev. 0.0).
Revision History
Location
Entire Document
Freescale Semiconductor
Revision
New document. 0.0
802.15.4 EVK User’s Guide, Rev. 0.0
vii
viii
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Chapter 1
Safety Information
Any modifications to this product may violate the rules of the Federal Communications
Commission and make operation of the product unlawful.
47 C.F.R. Sec. 15.21
This equipment has been tested and found to comply with the limits for a Class B digital device,
pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection
against harmful interference in a residential installation. This equipment generates, uses and can
radiate radio frequency energy and, if not installed and used in accordance with the instructions,
may cause harmful interference to radio communications. However, there is no guarantee that
interference will not occur in a particular installation. If this equipment does cause harmful
interference to radio or television reception, which can be determined by turning the equipment
off and on, the user is encouraged to try to correct the interference by one or more of the
following measures:
• Reorient or relocate the receiving antenna.
•
Increase the separation between the equipment and receiver.
•
Connect the equipment into an outlet on a circuit different from that to which the receiver
is connected.
•
Consult the dealer or an experienced radio/TV technician for help.
47 C.F.R. Sec.15.105(b)
This equipment complies with FCC radiation exposure limits set forth for an uncontrolled
environment. The antenna(s) used for this equipment must be installed to provide a separation
distance of at least 8 inches (20cm) from all persons.
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two
conditions:
1. This device may not cause harmful interference.
2. This device must accept any interference received, including interference that may cause
undesired operation.
3. This device is susceptible to electrostatic discharge (ESD) and surge phenomenon.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
1-1
1-2
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Chapter 2
13193EVK Components
The boards shipped with the 13193EVK are delivered with pre-loaded demonstration
applications. More applications can be uploaded with either the Embedded Bootloader utility
which is located in the Test Tool application, or with CodeWarrior using the USB Multilink
programmer (provided). The CodeWarrior CD requires that users register to get a 30-day
evaluation key. After that time, users must purchase a standard key to use the CodeWarrior
Software. See the CodeWarrior documentation for more detailed information. The CodeWarrior
software is not required to run the demonstrations and utilities described in this guide.
Some applications are board dependent and will only run on specific target boards. The
13193EVK contains the 13192-EVB and the 13192-SARD boards.
Demonstration applications for the 13192-EVB include, but are not limited to:
• Range Test
•
Switch Demonstration
•
Wireless UART
•
Test Tool Utility
•
Protocol Test Client (PTC) Demonstration (pre-loaded)
Demonstration applications for the 13192-SARD include, but are not limited to:
• Accelerometer Application (pre-loaded)
•
Range Test
•
Switch Demonstration
•
Wireless UART
•
Test Tool Utility
• Protocol Test Client (PTC) Demonstration
Additional applications can be run with the Figure 8 Wireless Z-Stack software. For more
information, refer to the Z-Stack Users Guide for the Freescale 13193EVK which is shipped with
the 13193EVK.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
2-1
2.1 13193EVK Contents
Table 1. shows the boards contained in the 13193EVK-A00 development kit.
Table 1.
P/N
13192-EVB
13192-SARD
•
2-2
13193EVK Boards
Description
QTY
802.15.4/ZigBee Evaluation Board
3
802.15.4/ZigBee Sensor Application Board
2
In addition to the boards, the kit contains the necessary power adapters, cables, and
software. See the packing list included with the kit for a complete list of contents.
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Chapter 3
Board Overview
The 13193EVK contains two different boards.
1. 13192-EVB
2. 13192-SARD
These boards include the following on-board components except where noted otherwise:
• MC13192 2.4GHz transceiver
•
MC9S08GT60 Micro Controller Unit (MCU)
•
MMA6261Q accelerometer (13192-SARD only)
•
MMA1260D accelerometer (13192-SARD only)
3.1 Common Board Components
3.1.1 MC9S08GT60 MCU
The MC9S08GT60 MCU is contained on both the 13192-SARD and 13192-EVB. The
MC9S08GT60 MCU is a member of Freescale’s 8 bit, low cost, low power family of HCS08
MCUs. It has 60KB of embedded flash and 4KB of RAM. For more information, refer to the
MC9S08GB60 data sheet, at www.freescale.com/mcu.
3.1.2 MC13192 RF Data Modem
The MC13192 is contained on both the 13192-SARD and 13192-EVB. The MC13192 is an
802.15.4 compliant, ZigBee-ready transceiver. It has a four-wire SPI interface to connect to a
variety of microcontrollers, creating a low power, low cost solution for a range of applications.
For more information on the MC13912, see the MC13192DS/D data sheet at
www.freescale.com/ZigBee.
3.1.3 MMA1260D and MMA6261Q Acceleration Sensors
The MMA6261Q Acceleration Sensors are contained only on the 13192-SARD. The
MMA1260D and the MMA6261Q Acceleration Sensors provide the 13192-SARD with unique
applications to demonstrate wireless sensing solutions. For more information on the MMA1260D
and the MMA6261Q, see the data sheets included with the 13193EVK CD or visit
www.freescale.com/sensors.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
3-1
3.2 13192-EVB Description
The 13192-EVB is an 802.15.4/ZigBee evaluation board based on the MC13192, 2.4GHz
transceiver and the MC9S08GT60 MCU. The 13192-EVB board provides both serial and USB
connectivity to a PC for easy evaluation. It also includes the necessary circuitry to enable the
MBC13900 Low Noise Amplifier (LNA) for improved sensitivity and range. It also has an
external SMA connector for an external antenna connection which allows easy connectivity to a
scope for test and measurement.
The 13192-EVB contains the following interfaces
• 1.1 USB port
3-2
•
RS232 Serial Connection
•
4 push buttons (S1, S2, S3, S4)
•
1 Reset button (Reset)
•
4 LEDs, (LED1, LED2, LED3, LED4)
•
One power switch (S106)
•
Printed F antenna (Refer to AN2731/D for more information)
•
Optional MBC13900 LNA (disabled by default, visit www.freescale.com/rf for more
information)
•
SMA RF connector (disabled by default)
•
Background Debug Module (BDM) connection (allows flash programming and in-circuit
debug via the included USB Multilink Cable). See USBMULTECHSUM/D document
included in the kit for more details).
•
Power connector (5-9 Volts)
•
10-pin header strip for access to specific MCU and RF pins
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Figure 1 13192-EVB Block Diagram
Figure 2 13192-EVB Board Layout
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
3-3
Table 2.
13192-EVB Board Labels
Common Name
Board Designation
LED 1
LED1
LED 2
LED2
LED 3
LED3
LED 4
LED4
Button 1
S1
Button 2
S2
Button 3
S3
Button 4
S4
Reset Button
Reset
Power Toggle
S106
Switch S106 toggles power between the USB connector and the power connector.
Refer to the MC13192 Evaluation Board Reference Manual, MC13192EVBRM/D for more info.
3.3 13192-SARD Description
The 13192-SARD is a demonstration board based on the MC13192 2.4GHz transceiver,
MC9S08GT60 MCU, and the MMA6261Q and MMA1260D Acceleration Sensors.
The 13192-SARD contains the following interfaces:
• RS232 Serial Connection
•
4 push buttons (S101, S102, S103, S104)
•
1 Reset button (S106)
•
4 LEDs (D101, D102, D103, D104)
•
One power switch (S105)
•
Printed Dipole antenna (Refer to AN2731/D for more information)
•
Background Debug Module (BDM) connection (allows flash programming and in-circuit
debug via the included USB Multilink Cable). See USBMULTECHSUM/D document
included in the kit for more details).
•
Power Connections
•
•
•
3-4
Power connector (5.5-9 Volts)
9-Volt battery connector
3-Volt power connector (MMA1260D Acceleration Sensor disabled)
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
•
26-pin header strip (J105), for access to specific RF, MCU, and sensor pins
Figure 3 13192-SARD Block Diagram
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
3-5
Figure 4 13192-SARD Board Layout
Table 3.
13192-SARD Board Labels
Common Name
Board Designation
LED 1
LED D101
LED 2
LED D102
LED 3
LED D103
LED 4
LED D104
Button 1
S101
Button 2
S102
Button 3
S103
Button 4
S104
Reset Button
S106
Power Switch
S105
See the SARD Users Guide, MC13192SARDUG/D for more information.
3-6
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Chapter 4
Software Installation
This chapter describes how to install the software contained on the 13193EVK CD. Before
connecting the hardware to the PC, the software on the 13193EVK CD must to be installed on a
PC. This installs the Test Tool application, object and source code, sample applications, and
documentation.
To install the software, perform the following steps.
1. Insert the 13193EVK CD into your CD-ROM drive.
2. If the program does not run automatically, run CDBrowser.exe from the Autorun directory.
3. Select INSTALL/UNINSTALL from the menu options. The following window appears.
Figure 5 Evaluation Kit CD Browser Main Window
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
4-1
4. Select the “Click here to Install/Uninstall” option. The following window appears.
Figure 6 Installation Wizard Window
5. Click on the “Next” button. The following window appears.
Figure 7 Setup Type Window
6. Select the “Typical” radio button and click on the “Next” button. Follow the directions in the
InstallShield Wizard until the software installation is complete.
4-2
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Chapter 5
Demonstration Applications
The 13192-EVB and 13192-SARD boards ship with several pre-loaded demonstration
applications. This chapter describes how to run the included applications as well as loading and
running additional applications included in the 13193EVK.
This section uses the Test Tool’s Embedded Bootloader application to flash new firmware into
the
13192-SARD and 13192-EVB. The bootloader provides an alternative method to flash your
applications with the need for a BDM cable. To flash the boards via the supplied BDM
programmer and CodeWarrior, see the USBMULTILINK HCS08/HCS12 Technical Summary
User Manual and the CodeWarrior™ Development Studio for 68HC08 Quick Start Guide.
Flashing the board with the BDM programmer overwrites all code residing in the embedded
flash including the Embedded Bootloader code. In order to use the Embedded Bootloader utility
to flash the board, you must reload the Embedded Bootloader code via the BDM. See the
Embedded Bootloader Reference Manual (802154EMRM/D) for more details.
NOTE
Ensure that you have already installed the software from the
13193EVK CD. (See Chapter 4 for more information.)
The sample applications provided on the 13193 Evaluation Kit CD are based on Freescale’s
Simple MAC (SMAC) and/or 802.15.4 MAC software. For the ZigBee stack and application
examples, see the Figure 8 Wireless Z-Stack CD included in the 13193EVK.
The following applications are included on the 13193EVK CD.
• SMAC Applications
•
•
•
•
802.15.4 Applications
•
•
•
•
Accelerometer Demonstration Application
Range Test
Additional SMAC based applications can be downloaded at
www.freescale.com/ZigBee.
PTC Demonstration
Switch Demonstration
Wireless UART
Windows Application
•
•
•
•
•
Test Tool
Command Console
Script Server
Embedded Bootloader
Radio Test
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-1
5.1 Accelerometer Demonstration Application (SMAC)
The Accelerometer Demonstration is designed to run with 13192-SARD and is pre-flashed on
the board. The Accelerometer Demonstration Application uses two 13192-SARD boards that
transmit X, Y, and Z-axis accelerometer data from 13192-SARD board one to 13192-SARD
board two. The 13192-SARD board two is connected to a PC via a serial port. The PC runs a
GUI interface that displays the acceleration sensor data on the PC screen. The Accelerometer
Demonstration application is optimized for low power consumption, not range evaluation. The
output power on the Accelerometer Demonstration application is optimized for low power
consumption and set below the nominal 0dBm level. To test the effective range of the boards,
use the Range Demo Plus application, as described later in this chapter.
5.1.1 Board Setup Overview
To setup both boards for operation, (transmit and receive) perform the steps shown in this
section.
NOTE
This section is based on the 13192-SARD board with the factory
loaded Accelerometer Demonstration. If you have re-flashed the
13192-SARD board with another application, you will need to
reload the Accelerometer Application. See Section 5.8 for more
information.
5.1.2 Board One Setup (Transmit)
1. Connect a 9V battery or the 9V power supply and set switch S105 to the “ON” position.
2. While holding down button S101, press and release the Reset Button S106 then release S101.
LED D104 should be blinking. Board One is now in transmit mode.
5.1.3 Board Two Setup (Receive)
1. Connect the other 13192-SARD board to a PC’s serial port using a DB9 male/female serial
cable included in the kit.
2. Connect a 9V battery or the 9V power supply and set switch S105 to the “ON” position.
3. Press the Reset Button S106. Board Two is now in receive mode.
5.1.4 Verifying Operation
1. Verify that the boards are communicating by ensuring that LED D103 on the receive board
(Board Two) is blinking. If it is not, press the Reset Button S106 on Board Two again. (The
board connected to the PC.)
5-2
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
5.1.5 Running the TRIAX Software
1. Run the TRIAX Software from Windows Start menu ->Programs->Freescale->Triax.
After execution of the Triax program, the software prompts users to select the proper
communications port for their PC. This is the RS232 serial COM port to which the receiver
board (Board One) is connected.
5.1.6 Viewing Data
After selecting the appropriate communications port, several methods are available to view the
data being sent from the accelerometers on the transmitter board (Board One).
1. Sensor Data – This application shows the raw data that is sent from the accelerometer and
sampled by the MCU analog/digital converter. The following data is provided.
X, Y, and Z accelerometer analog outputs in volts.
8-bit A/D readings (0-255).
The output of each axis converted into g’s.
2. G Mouse – This application displays the location of the board based on movement of the
transmitter board (Board One). To move the boxes on the display which represents the X, Y
axis, pick up the transmitter board and tilt it through different angles.
3. Tilt – This application translates the g’s experienced in each axis to an angle of rotation. To
view different angles, rotate/tilt the transmitter board.
4. Shipping – This application timestamps when a pre-determined threshold is violated or when
the board is turned upside down.
NOTE
If using batteries as the power source and the accelerometer
demonstration behavior becomes erratic, replace the batteries.
5.2 Range Demo Plus (SMAC)
The Range Demo Plus is a simple application that transmits data from one board to the other.
Signal strength is displayed via the LEDs on the board. This test can be performed on either the
13192-SARD or the 13192-EVB.
Before running the Range Demo Plus, the 13192-SARD board must be flashed with the
following:
• range_demo_plus_rx_13192SARD_loader.s19
•
range_demo_plus_tx_13192SARD_loader.s19
Before running the Range Demo Plus, the 13192-EVB board must be flashed with the following:
• range_demo_plus_rx_13192EVB_loader.s19
•
range_demo_plus_tx_13192SEVB_loader.s19
Follow the instructions shown in Section 5.8.2 to flash the board using the Embedded
Bootloader.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-3
5.3 Embedded Bootloader
The Embedded Bootloader allows users to flash the MCU on the 13192-EVB and 13192-SARD
without the BDM programmer/debugger. The Embedded Bootloader is located in a protected
4KB flash block in the highest memory area (0xF000-0xFFFF) of the MC9S08GT60 MCU
located on both the 13192-SARD and 13192-EVB boards.
See the Embedded Bootloader Reference Manual (802154EBRM/D) for more information.
5.3.1 Board One Setup (Receive)
1. Connect a 13192-SARD or 13192-EVB to an RS232 serial COM port on the PC via the
included serial cable.
2. Connect a power source (9V battery or the 9V power supply to the board.
3. Power on the board. If all four LEDs are not on, press all four buttons (S101-S104 on the
13192-SARD and S1-S4 on the 13192-EVB). The SMAC applications call the Embedded
Bootloader with two buttons presses. The 13192-SARD use S102 and S104 while the
13192-EVB uses S2 and S4. Press and release the Reset Button, then release the appropriate
pushbuttons. All four LEDs should now be on. The board is now ready for flash
programming.
4. Run the “Test Tool” utility from the Start->Programs->Freescale Zigbee->Test Tool
Windows menu.
5. If running “Test Tool” for the first time, setup the board connection by selecting
Communication Settings from the Tools menu as shown in Figure 8. From the “List of
Devices” window, select the “Add Internal” option and click on the “Serial” button. Choose
the appropriate Com Port and click on the “OK” button.
Figure 8 Running Test Tool for the First Time
5-4
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
6. Click the “Close” button.
7. From the Test Tool program, run the Embedded Bootloader application by selecting the
“Embedded Bootloader” option from the “View” menu.
8. Select the ZigBee device and click on the “OK” button.
9. To flash the board for the Range Plus Demo, select the
rx_range_demo_plus_13192SARD_SE_loader.s19 application file and click on the “Upload”
button.
If you receive a Timeout error, highlight the file and click on the “Upload” button again.
10. While the board is flashed, a progress indicator appears in the Embedded Bootloader
application.
11. After the board is flashed, press the “Reset” button.
5.3.2 Board Two Setup (Transmit)
1. Connect the 13192-SARD or 13192-EVB to an RS232 serial COM port on the PC via the
included serial cable.
2. Connect a power source (9V battery or the 9V power supply) to the board.
3. Power on the board. If all 4 LEDs are not on, press and hold down all 4 buttons (S101-S104
on the 13192-SARD and S1-S4 on the 13192-EVB) and press and release the Reset Button.
Then release all four buttons. All four LEDs should be on and the board is ready for flash
programming.
4. Run the “Test Tool” utility from the Start->Programs->Freescale Zigbee->Test Tool
Windows menu.
5. From the “Test Tool” program, run the Embedded Bootloader application by selecting
“Embedded Bootloader” option from the “View” menu.
6. Select the ZigBee device and click on the “OK” button.
7. To flash the board for the Range Plus Demo, select the
tx_range_demo_plus_13192SARD_SE_loader.s19 application file and click on the “Upload”
button.
8. If you receive a Timeout error, highlight the file and click on the “Upload” button again.
9. While the board is being flashed, a progress indicator appears in the Embedded Bootloader
application.
10. After the board is flashed, press and release the reset button.
5.3.3 Verifying Operation
Verify that the boards are communicating by ensuring that LED 1 on both boards is blinking.
LEDs 2 through 4 are signal strength indicators. As the boards are moved further apart, LEDs 4
through 2 will turn off in order. When the range of the boards is exceeded, LED 1 stops
blinking.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-5
5.4 Protocol Test Client (PTC) Demonstration Application
The 13192-EVB comes pre-loaded with the PTC Demonstration Application. The PTC
Demonstration Application is an interactive application for the Test Tool environment. The PTC
Demonstration application performs various functions such as reading and writing memory and
sending and receiving data via the RF. The 13192-EVB and 13192-SARD must be running the
PTC Client to run the Test Tool applications.
If the 13192-EVB has been flashed with another application, the board needs to be flashed with
the PTC application. To verify if the PTC application is on the board, power on the board and
ensure that all four LEDs are on. If all four LEDs are on, then the PTC Application is loaded and
running. See Section 5.8 for information on how to flash the board with the PTC application.
See Section 5.4 for information about specific utilities for the PTC application.
5.5 Switch Demonstration
The Switch Demonstration is an application that runs on top of the 802.15.4 MAC layer and
provides event driven command and response. Its purpose is to show how to use the MAC layer
primitives. Source code is provided on the 13193EVK CD.
See the Switch Demonstration Application Note (AN2773/D) for more information.
5.6 Wireless UART/Cable Replacement
The Wireless UART/Cable Replacement application transmits all characters received on the
UART interface over the AIR interface to the remote unit. The UART runs at 19200 baud with
no hardware handshake, no parity, and 8 bit data. The application can be used as a simple cable
replacement.
NOTE
The application collects up to 80 characters before one AIR packet
is transmitted. This ensures that the AIR interface is not filled with
"small packets".
If the time between two characters is more than 80ms, a timeout
occurs and the packet is transmitted. Some applications/protocols
that run on top of the UART may not function properly due to the
latency introduced by the AIR interface and the application.
Also, the application transmits the status of Switch 4 (S4) to the
remote unit as displayed on LED4. (LED4 displays the status of
S4.) If the user holds S4 down on one board, LED4 goes out on the
other board.
5-6
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
The following instructions describe how to connect the boards.
1. At power up, all LEDs will be off. However, because the MCU turns the LEDs on by default,
a very short LED blink occurs). Also, a message is transmitted on the UART that states it is
ready. The user can then verify that the boards are up and running.
2. To connect the two units, users should press S1 on one of the boards. This board becomes the
device.
3. LED1 on both boards should be ON after the connect procedure is complete. If this does not
happen, press S1 again.
4. LED4 will turn on again because S4 was not pressed.
The boards are now connected. As a simple test, hold down S4 on one board and LED4 on the
other board will turn off. As a simple UART test, use a terminal program setup to 19200 baud
and send characters or files between the two boards.
This test can be performed on either the 13192-SARD or the 13192-EVB. Before running the
Wireless UART/Cable Replacement application, the board must be flashed with the proper
application. Follow the instructions as shown in Section 5.8.2 to flash the board using the
Embedded Bootloader.
5.7 Test Tool Utility
The Test Tool Utility is a Windows based graphical interface that communicates via the PTC test
interface to the Embedded Bootloader enabled applications that run on the13192-EVB and
13192-SARD boards. The Test Tool provides the following applets:
• Embedded Bootloader
•
Command Console
•
Script Server
•
Radio Test
NOTE
The Command Console and Script Server require users to have
knowledge of the IEEETM 802.15.4 standard. See the 802.15.4
Standard from the IEEE group for detailed information about the
802.15.4 specification. Visit www.ieee.org for more information.
The following sections cover each of the Test Tool utilites in more detail.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-7
5.7.1 13192-EVB Setup for USB Operation (Test Tool Utilities)
To setup the 13192-EVB for USB operation, perform the following steps.
1. Plug the 13192-EVB into a USB port of the PC with the supplied USB cable.
2. Switch the EVB power switch (S106) to USB.
3. Follow the Windows Hardware Manager default options during the driver install.
4. After the install is complete, reboot the system.
NOTE
In some cases it may be necessary to manually locate the drivers.
To do so, perform the following steps.
1. Reinsert the Evaluation Kit CD.
2. If prompted for the ftdibus.sys driver, select Browse and change to the drivers directory on
the 13193EVK CD. Reinsert the Evaluation Kit CD and click on the OK button.
3. If prompted for the ftser2k.sys driver, select Browse and change to the drivers directory on
the 13193EVK CD. Reinsert the Evaluation Kit CD and click on the OK button.
4. After installation is complete, reboot the system.
5.8 Embedded Bootloader
The Embedded Bootloader allows users to flash the 13192-EVB and 13192-SARD without the
BDM programmer/debugger. The Embedded Bootloader is located in a protected 4KB flash
block in the highest memory area (0xF000-0xFFFF) of the MC9S08GT60 which is located on
the 13192-SARD and 13192-EVB boards. If you flash the board with a BDM, the Embedded
Bootloader code is overwritten and you cannot use the Embedded Bootloader utility until you reflash the Embedded Bootloader code on the board.
See the Embedded Bootloader Reference Manual (802154EBRM/D) for more information.
5.8.1 Embedded Bootloader Features
5-8
•
Upload firmware in Motorola S19 record format through the UART/USB
•
Initialize memory of upload firmware
•
Initialize the system clock
•
Run time update/change of the NVM
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
5.8.2 Flash Programming the 13192-EVB and 13192-SARD
To flash program the 13192-EVB and 13192-SARD, perform the following steps.
1. Connect the 13192-SARD or 13192-EVB to an RS232 serial COM port on the PC via the
included serial cable.
2. Connect a power source (9V battery or the 9V power supply) to the board.
3. Power on the board. If all 4 LEDs are not on, hold down all four buttons (S101-S104 on the
13192-SARD and S1-S4 on the 13192-EVB) and press and release the Reset Button. Then
release the four buttons. All four LEDs should be on. The board is ready for flash
programming.
4. Run the “Test Tool” utility from the Start->Programs->Freescale Zigbee->Test Tool
Windows menu.
5. Setup the board connection by selecting the “Communications Settings” option from the
“Tools” menu as shown in Figure 9.
Figure 9 Test Tool Window (Configuration Settings Option)
6. As shown in Figure 10, from the “List of Devices” screen, select the “Add Internal” option.
In the “Device Settings” screen, click on the “Serial” button, choose the appropriate Com
Port and click on the “OK” button. Leave the Baudrate set to 19200.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-9
Figure 10 Test Tool Window (List of Devices Screen)
7. Click on the “Close” button.
8. As shown in Figure 11, from the “Test Tool” window, run the Embedded Bootloader
application by selecting “Embedded Bootloader” from the “View” menu.
Figure 11 Test Tool Window (Choosing Embedded Bootloader)
5-10
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
The window appears as shown in Figure 12.
9. Choose the device and click on the “OK” button.
Figure 12 Test Tool Window (Embedded Bootloader)
10. As shown in Figure 13, select the application you want to flash program from the
“Application Files” menu and click on the “Upload” button.
• If you want to flash your own project, save it as an S19 record and copy it to the S19
directory (C:\Program Files\Freescale\Test Tool\s19)
•
If you receive a timeout error, highlight the file and click on the “Upload” button again.
Figure 13 Test Tool Window (Bootloader Application Select)
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-11
11. While the board is being flash prgrammed, a progress indicator appears in the Embedded
Bootloader application.
12. After the board is flashed, press and release the reset button.
5.9 Command Console
The Command Console allows users to interact with the hardware and send 802.15.4 commands
directly to the 13192-EVB and 13192-SARD boards. The interface is similar to that of an AT
terminal application and requires users to have a working knowledge of the 802.15.4
specification and command set. The Command Console makes it possible to send commands
from a computer to a device as well as receive responses from a device.
This section describes the following elements of the command console:
• Command Console Main Window Overview
•
Common Function Overview
For more details on the command console, refer to “Command Console” in Start->Programs>Freescale Zigbee->Test Tool->Help.
Figure 14 shows the Command Console main window.
Figure 14 Command Console Main Window
5-12
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
5.9.1 Command Console Basic Functionality
This section provides step-by-step instructions for the Command Console. This will help users
understand its basic functionality.
Before running the command console, you must ensure that the hardware (13192-EVB or 13192SARD) has the PTC application loaded. The PTC application is loaded by default on the 13192EVB boards. If you have flashed the boards with another application, you should run the
Embedded Bootloader Utility and flash the board with the PTC Application. If the PTC
application is running on the board, all four LEDs will light when the board is powered on.
If you have attached the 13192-EVB or 13192-SARD to a new port (such as a USB), you will
need to add the device to the “Communication Setting” option under the “Tools” menu. The
USB driver for the 13192-EVB maps the board to a COM port. To determine the proper COM
port for the USB driver, run the Windows Device Manager and check the COM ports to
determine which port is mapped to the USB driver. See Windows help for more information on
how to run the Device Manager.
5.9.2 Running the Command Console
1. As shown in Figure 15, run the “Test Tool” Application then launch the Command Console
application by selecting the “View” menu option and then “Command Console”.
Figure 15 Test Tool Window (Command Console Select)
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-13
2. As shown in Figure 16, select the device you want to use, and click on the "OK" button.
Figure 16 Test Tool Window (Command Console Device Select)
The Command Console window appears as shown in Figure 17.
Figure 17 Command Console Window
5-14
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
3. In the “Enter Command” field, type "Mac".
NOTE
The first field of the Status bar changes. It now displays the first
available command with the prefix “Mac”. The Command Console
offers command completion. This means you do not have to enter
the whole command name. To complete a command, press <Ctrl>
+ <Space>.
If you enter an ambiguous command, a pop-up menu shows you all available commands
beginning with the string present in the input field as shown in Figure 18.From the pop-up menu
in the “Command Console” window, select “MacPurge.Request”.
Figure 18 Command Console (MAC Command Entries)
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-15
As shown in Figure 19, the second field of the Status bar now displays the parameter selected in
the current command, in this case there are no parameters and the field is empty.
Figure 19 Command Console (MACPurge.Request Command)
4. Send the command by pressing the Enter key or clicking on the “Send” button.
5-16
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
The Rx/Tx view is now updated with the command that was just transmitted
(MacPurge.Request). The device promptly responds with an event. The most recent item is
always placed at the bottom of the list. You can see a more detailed view of each command or
event by expanding the line. In this example, the MacPurge.Request was expanded by clicking
on the [+] in the display area. The information appears as shown in Figure 20.
Figure 20 Command Console (Expanded Command View)
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-17
5.10 Script Server
The Script Server manages Scripts and Test Sets. The server is able to load and execute one or
more Scripts and Test Sets. Output for the Scripts can be displayed. The Script execution
progress and the test results are displayed in a separate view. The output and results can be stored
in text files. One or more Scripts can be added to and saved as a Test Set. A Test Set can include
other Test Sets. As an extended feature, the Test Results can be sent as an e-mail message.
1. Run the “Script Server” application from the Test Tool “View” menu and the “Script
Server” window appears as shown in Figure 21.
Figure 21 Script Server Window
2. Click on the “F1: Add” button or press F1 to search for Scripts and Test Sets. Perform a
normal windows browse session to find the desired files. The demo scripts delivered for
the Evaluation Kit are located in the folder:
C:\Program Files\Freescale\Test Tool\Scripts\Demoscripts.
The Scripts are executed by loading and executing the script:
ZigBee_Demo_Run.py
This file is located in the folder:
C:\Program Files\Freescale\Test Tool\Scripts
Basic script functionality is as follows:
• ZigBee_Demo_Associate
•
•
•
5-18
Uses two devices
Coordinator starts PAN network
Device associates to the Coordinator
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
•
ZigBee_Demo_Data
•
• Uses two devices
• Coordinator starts PAN network
• Device associates to the Coordinator
• Device sends direct data
• Device receives indirect data from coordinator
ZigBee_Demo_GetSet
•
• Uses one device
• Sets and gets all PIN attributes.
ZigBee_Demo_Scan
•
• Uses one devices
• Performing active scan
• Performing passive scan
• Performing energy detection
• Performing orphan scan
ZigBee_Demo_Start
•
•
•
Uses two devices
Coordinator starts PAN network
Device performing scan
3. Select one or more Scripts (file extension is “py”) or Test Sets (file extension is “tst”) and
click on the “Open” button.
For example, as shown in Figure 22, the “RadioTest.py” file was selected from the “RadioTest”
folder.
Figure 22 Test Case/Test Set Search Window
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-19
4. As shown in Figure 23, from the “Script Server” window, highlight the “RadioTest.py
file and click on the “F3: Execute” button to start the selected Scripts/Test Set.
Figure 23 Script Server Window (Run Scripts/Test Sets)
The first two lines in the Script Output view are always as follows.
10:00:59 Default Pythin Script executed !
10:00:59 SearchPath included !
5. The Script can be terminated normally or can be stopped by clicking on the “Stop
Execution” button in the “Script Server” window as shown in Figure 24.
Figure 24 Script Server Window (Stop Execution)
5-20
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
The progress and result output are displayed in “Test Results” window as shown in Figure 25.
Figure 25 Test Results Window
See the “Script Server Guide” in the Start->Programs->Freescale Zigbee->Test Tool->Help for
more details.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-21
5.11 Radio Test
The Radio Test window, as shown in Figure 26, runs the radio test script dialog using one board
for radio testing or two boards for sending data between the boards. The application picks the
first boards from the List of Devices. If the devices are not connected, then change the order in
communication settings by using the “Communication Settings” option in the “Tools” menu.
Highlight the device and use the Move Up or Move Down button to change the order.
The Radio Test Script has two parts:
1. Radio testing
2. Packet Error Rate (PER) estimation
The PER must be below 1 % sending packets with 20 bytes payload to meet the 802.15.4
specification.
Figure 26 Radio Test Window
5-22
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
1. To launch the Radio Test Script, select the “ZigBee Radio Test” option from the “View”
menu in the Test Tool main window as shown in Figure 27.
Figure 27 Test Tool Window (ZigBee Radio Test Selection)
See the “Radio Test Guide” in the C:\Program Files\Freescale\Test
Tool\Help\RadioTestGuide.doc for more information.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
5-23
5-24
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
Chapter 6
Solution Development
This chapter shows users how to begin development of an MC13192 system solution. Each
section highlights the documentation users must read before they begin system development.
Unless specifically stated, all documents described in this chapter are available at:
www.freescale.com\ZigBee
6.1 Hardware Design and Layout
Before users begin their hardware design and layout, Freescale provides and recommends
reading the documents shown in Table 4. These documents contain reference design information
and hardware design guidelines.
Table 4.
Hardware Design and Layout Recommended Reading
Document Title
Part Number
Compact Integrated Antennas:Designs and Applications
for the MC13191/92.
AN2731/D
Accelerometer Demonstration With the Sensor
Applications Reference Design (SARD)
AN2774/D
Simple Media Access Controller (SMAC) User’s Guide
SMACRM/D
MC13192 Evaluation Board Reference Manual
13192EVBRM/D
MC13191 2.4 GHz, Low Power Transceiver Reference
Manual
MC13191RM/D
MC13192/MC13193 2.4 GHz, Low Power Transceiver
Reference Manual
MC13192RM/D
MC13191 2.4 GHz, Low Power Transceiver, Data Sheet
MC13191DS/D
MC13192/MC13193 2.4 GHz, Low Power Transceiver
Data Sheet
MC13192DS/D
In addition to this, a complete reference design package can be provided upon request.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
6-1
6.2 Software Applications Development
When building applications for the MC13192 transceiver, Freescale recommends using the
Codewarrior Software Development Tools. A trial version is shipped as part of the 13193EVK.
For complete documentation and help, see the Metrowerks homepage at www.metrowerks.com.
In addition, Freescale provides and recommends reading the documents shown in Table 5. Most
notably, Freescale recommends reading the documentation that describes the Embedded
Bootloader implementation and the Non-volatile Memory (NVM) area used for storing
information in the application.
Table 5.
Software Applications Recommended Reading
Document Title
Part Number
Handling MAC Address Erasure, Recommendations for
Restoration
AN2825/D
802.15.4/Zigbee Embedded Bootloader Reference
Manual
802154EBRM/D
MC13191 2.4 GHz, Low Power Transceiver, Reference
Manual
MC13191RM/D
MC13192/MC13193 2.4 GHz, Low Power Transceiver,
Reference Manual
MC13192RM/D
HCS08 Flash Library Integration For Zigbee and 802.15.4
Applications
AN2770/D
Source code examples are located on the 13193EVK cd in the following folder:
D:\source\…
6-2
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor
6.2.1 Proprietary Applications (SMAC)
To begin development of a proprietary application, Freescale provides and recommends reading
the documents shown in Table 6.
Table 6.
Proprietary Applications Recommended Reading
Document Title
Part Number
Demonstration Operation: Running the Packet
Error Rate, Wireless UART, Accelerometer,
Range, and Lighting Demonstration Applications
AN2728/D
MC13192 Accelerometer Demonstration
Program: Quick Start Guide
AN2762/D
Sensor Applications Reference Design (SARD)
User’s Guide
MC13192SARDUG/D
Simple Media Access Controller (SMAC) User’s
Guide
SMACRM/D
6.2.2 802.15.4 Specific Applications
Freescale provides and recommends reading the documents shown in Table 7. This
documentation helps guide users through development of an application that sits on top of the
802.15.4 MAC.
Table 7.
802.15.4 Specific Applications Recommended Reading
Document Title
Part Number
802.15.4 MAC/PHY Software Reference Manual
802154MPSRM/D
Switch Demonstration For the 802.15.4 and Zigbee MAC
Layer
AN2773/D
Zigbee/802.15.4 PHY Protocol Test Client (PTC),
Running the PTC Demonstration on the 13192-EVB (DIG528 board)
AN2771/D
802.15.4 PHY (Physical Layer) Setup and Porting to
Various Printed Circuit Boards (PCBs)
AN2769/D
6.2.3 ZigBee Applications
For development of ZigBee applications, refer to the Figure 8 Wireless Z-Stack CD.
Freescale Semiconductor
802.15.4 EVK User’s Guide, Rev. 0.0
6-3
6-4
802.15.4 EVK User’s Guide, Rev 0.0
Freescale Semiconductor