SILABS EM351-MOD-ANT-T

A u g u s t 5, 2 0 1 2
120-4030-000E
EM35x Development Kit
User Guide
New in this Revision
Chapter 4: Silicon Labs part number changes in Table 4-1.
Chapter 7: usbaddr command added.
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
Tel: 1+(512) 416-8500
Fax: 1+(512) 416-9669
Toll Free: 1+(877) 444-3032
www.silabs.com
Copyright © 2012 by Silicon Laboratories
The information in this document is believed to be accurate in all respects at the time of
publication but is subject to change without notice. Silicon Laboratories assumes no responsibility
for errors and omissions, and disclaims responsibility for any consequences resulting from the use
of information included herein. Additionally, Silicon Laboratories assumes no responsibility for the
functioning of undescribed features or parameters. Silicon Laboratories reserves the right to make
changes without further notice. Silicon Laboratories makes no warranty, representation or
guarantee regarding the suitability of its products for any particular purpose, nor does Silicon
Laboratories 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. Silicon Laboratories products are not designed, intended, or authorized for use in
applications intended to support or sustain life, or for any other application in which the failure of
the Silicon Laboratories product could create a situation where personal injury or death may occur.
Should Buyer purchase or use Silicon Laboratories products for any such unintended or unauthorized
application, Buyer shall indemnify and hold Silicon Laboratories harmless against all claims and
damages.
Silicon Laboratories, Silicon Labs, and Ember are trademarks of Silicon Laboratories Inc.
Other products or brandnames mentioned herein are trademarks or registered trademarks of their
respective holders.
Contents
1
About This Guide ..........................................................1-1
1.1
1.2
1.3
1.4
2
Introducing Ember Development Kits ........................2-1
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
3
Overview ..................................................................... 3-1
Hardware ..................................................................... 3-2
Acceptable Power Sources for Normal Operation .. 3-4
Software ...................................................................... 3-7
Setting Up Hardware Components .............................4-1
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
5
Overview ..................................................................... 2-1
Development Kit Contents......................................... 2-2
Hardware Requirements ............................................ 2-2
Software Requirements ............................................. 2-2
Hardware ..................................................................... 2-3
Software ...................................................................... 2-3
Documentation ........................................................... 2-3
Before You Begin ....................................................... 2-4
Development Kit Components ....................................3-1
3.1
3.2
3.3
3.4
4
Purpose ....................................................................... 1-1
Audience ..................................................................... 1-1
Documentation Conventions..................................... 1-1
Getting Help ................................................................ 1-1
Overview ..................................................................... 4-1
ETRX3 Radio Communications Module (RCM) ........ 4-1
Hardware Connections .............................................. 4-2
Connecting the Breakout Board and RCM ............... 4-2
Breakout Board Power Configurations .................... 4-3
Breakout Board Serial Configurations ..................... 4-5
Common Hardware Configurations .......................... 4-5
Connecting the RF Cable to the RCM ....................... 4-8
Installing the Software .................................................5-1
5.1
5.2
5.3
Overview ..................................................................... 5-1
Installing the Ember Stack......................................... 5-1
Installing InSight Desktop ......................................... 5-1
EM35x Development Kit User Guide
120-4030-000E
5.4
5.5
5.6
6
Using the InSight Adapter ...........................................6-1
6.1
6.2
6.3
6.4
6.5
6.6
6.7
7
Overview ..................................................................... 6-1
Connectivity and Power ............................................. 6-1
Ethernet Settings........................................................ 6-1
Using the Admin Interface over USB ........................ 6-2
Using the Admin Interface over Ethernet ................. 6-2
Using the Serial Ports ................................................ 6-2
Updating the Firmware .............................................. 6-2
InSight Adapter Commands ........................................7-1
7.1
7.2
7.3
8
Installing IAR Embedded Workbench for ARM ........ 5-1
Installing the ISA3 Utilities ........................................ 5-2
Installing FTDI USB Drivers ....................................... 5-2
Syntax Conventions ................................................... 7-1
Entering Commands .................................................. 7-1
Command List ............................................................ 7-1
Software Tools Overview .............................................8-1
8.1
8.2
8.3
8.4
8.5
8.6
8.7
Using the EM357 Nodetest Application .................... 8-1
Running a Packet Error Test ..................................... 8-1
Testing Deep Sleep Current ...................................... 8-2
Example of Opening, Building, and Programming
a Sample Application ................................................ 8-4
Programming your Application on the EM357 ......... 8-4
Programming Manufacturing Tokens ....................... 8-5
Using the Debugger in IAR Embedded Workbench
with an Ember InSight Adapter................................. 8-5
EM35x Development Kit User Guide
120-4030-000E
1-1
1
About This Guide
1.1
Purpose
This document describes the Ember EM35x Development Kit and explains how to set up its hardware and use the Ember
InSight Adapter (ISA3). For information on developing and debugging applications with InSight Desktop, see its on-
line HTML help.
For information on designing and debugging an application based on Silicon Labs' EmberZNet PRO software
stack, refer to documents 120-3029-000, Ember Application Development Fundamentals, and 120-035X-000, the
EM35x Datasheet. See section 2.7, Documentation, for a list of other EM35x documents of interest.
1.2
Audience
This document is intended for embedded software and hardware engineers who are responsible for developing
wireless applications with the Ember Development Kit. This document assumes that the reader has a solid
understanding of embedded systems design and programming in the C language. Experience with networking and
radio frequency systems is useful but not expected.
1.3
Documentation Conventions
Notation
Meaning
Example
Italics
Identifies on-screen software menu
options.
Connect
UPPERCASE
Identifies a keyboard key.
ENTER
Right-angle bracket
Delimits a series of software program
menu options to be clicked.
Open > Save
Courier
Identifies software code and, in body text, void Main(String[] argv)
variables.
the buffer variable
Courier Italics
Identifies a variable name.
1.4
ipAddress
Getting Help
Development Kit customers are eligible for training and technical support. You can use the Silicon Labs web site
www.silabs.com/zigbee to obtain information about all Ember products and services. You can also contact
Customer Support at www.silabs.com/zigbee-support.
EM35x Development Kit User Guide
120-4030-000E
1-2
If you have any questions about your Development Kit, contact your account representative at one of the
following locations:
United States
25 Thomson Place
Boston, MA 02210
Telephone: 617-951-0200
Fax: 617-951-0999
Asia/Pacific
HK Spinners Industrial Bldg, Phase 5
5/F Flat D
760-762 Cheung Sha Wan Rd
Kowloon
Hong Kong
Telephone: +852-8120-5375
Europe
Unit 300 Science Park
Milton Road
Cambridge CB4 0XL, UK
Telephone: 44 (0) 1223 423322
Fax: 44 (0) 1223 423390
EM35x Development Kit User Guide
120-4030-000E
2-1
2
Introducing Ember Development Kits
2.1
Overview
The EM35x Development Kit is used for application design and development. The Development Kit contains a
variety of hardware for quickly creating a prototype of the customer’s hardware, EmberZNet PRO, Silicon Labs'
implementation of the ZigBee Pro stack software specification, and various development tools which enable the
development of the customer’s application software.
EmberZNet PRO runs on top of an IEEE 802.15.4-compliant radio and link layer software. EmberZNet PRO is a
self-organizing, self-healing mesh networking protocol stack. Combined with the powerful IEEE 802.15.4
compliant Ember radios, the EmberZNet network stack provides complete networking services from the physical
layer up to a reliable application profile support layer. The stack produces networks that are reliable, flexible,
secure, and easy to use.
EmberZNet PRO 1 provides a common Application Programming Interface (API) that utilizes the underlying layers.
This API provides support for the following layers of the Open System Interconnection Reference Model (OSI
Model):
•
PHY: radio control
•
MAC: medium access
•
LINK: route discovery
•
NETWORK: routing, association
•
APPLICATION: Application Profile Support for reliable message delivery
The EmberZNet PRO stack can be used to build ZigBee-based applications. Applications that are built on this
stack benefit from the following features:
•
PHY and MAC layers comply with the IEEE 802.15.4-2003 standard
•
LINK and NETWORK layers comply with the latest ZigBee specification
•
The APS layer provides the interface to the application for data transfer and management, including
reliable transport and binding.
The Development Kit includes InSight Desktop which facilitates application development and debugging. InSight
Adapters (ISA3s) incorporate Power-over-Ethernet (PoE) capability, which can simplify node deployment in the
test environment. Breakout Boards provide a direct connection for debugging customer-designed hardware. For
detailed information about the Ember customer hardware debug interface, see document 120-2009-000, the
EM35x Breakout Board Technical Specification.
1
The release version of EmberZNet PRO at the time of this writing is 4.0.
EM35x Development Kit User Guide
120-4030-000E
2-2
2.2
Development Kit Contents
Table 2-1 summarizes the components and the specified count for each component in the EM35x Development
Kit.
Table 2-1. EM35x Development Kit Components
Component
EM35x Development Kit
InSight Adapter (ISA3)
3
EM357 Sample Chip
10
EM35x Breakout Board
3
EM35x Modules
9
Data Emulation Interface (DEI) Cable
3
Ember Happy Fun Ball
1
InSight Port (ISP) Cable
3
Radio Frequency Cable
1
Power-over-Ethernet Switch with Power Supply
1
USB Power Supply with Adapters
3
EM35x Quick Start Guide
1
InSight Desktop CD
1
IAR Embedded Workbench CD
1
US-to-multinational AC Plug Power Adapter Kit
1
AAA Battery Pack
3
Ethernet Cable
3
USB Cable
3
2.3
2
Hardware Requirements
•
PC with Ethernet connectivity
•
Network hub with DHCP server
2.4
Software Requirements
•
Microsoft Windows XP
•
Java, version 1.5V6 or later
•
Adobe Acrobat Reader (available free from http://get.adobe.com/reader/)
2
Three EM35x modules are installed on EM35x Breakout Boards; six EM35x modules are included in the EM35x
Module Box.
EM35x Development Kit User Guide
120-4030-000E
2-3
2.5
Hardware
•
Breakout Boards serve as test beds for network hardware and applications. Each Breakout Board has
an associated EM35x Module, which can be deployed as a node within a network application. Each
Breakout Board connects with an InSight Adapter (ISA3) through two communication links: the InSight
Port (ISP) and the DEI Port. This allows the Breakout Board’s EM35x Module to interface with InSight
Desktop (ISD) through the ISA’s InSight Port and its wired Ethernet connection. These interconnections
are described later in this chapter. The Breakout Boards also have a prototype breadboard area for
application-specific hardware development.
•
EM35x modules contain the Ember EM35x System-on-Chip (SoC) solution providing a complete radio
and microcontroller solution. All modules are pin-compatible, and they can be directly attached to a
Breakout Board.
•
InSight Adapters (ISA3s) each connect a Breakout Board to the Ethernet. Each adapter transmits
network data collected via its InSight Port and conveys it over its Ethernet connection to InSight
Desktop. It also picks up any messages or new software that is addressed to this Breakout Board.
The InSight Port is a cabled communication link between the ISA3 and the EM35x Module mounted on the
Breakout Board.
•
InSight Port Cables connect each ISA3 to a Breakout Board.
•
AAA Battery Packs that attach to a Breakout Board enable deployment of battery-operated nodes.
•
USB Power Supply with Adapters power Breakout Boards and / or ISA3s from wall sockets.
•
Ethernet Cables connect ISA3s to an Ethernet subnet.
•
Data Emulation Interface (DEI) cables provide a peripheral interface connection between the ISA3 and
Breakout Board. The DEI cable supports UART functionality.
2.6
Software
The Ember Development Kit contains two CDs for:
•
InSight Desktop
•
IAR Embedded Workbench
2.6.1 InSight Desktop
Installation components and associated documentation:
•
EmberZNet PRO network stack library and APIs: debug and release builds (see Table 3-2)
•
HAL library
•
InSight Desktop
•
Sample programs (see Table 3-3)
2.6.2 IAR Embedded Workbench
Licenses and support are provided separately and can be obtained from IAR Systems at http://www.iar.com.
2.7
Documentation
Document 120-4031-000, EM35x Quick Start Guide, is shipped with the EM35x Development Kit. All other
documents listed below are available from Silicon Labs’ Ember support page (www.silabs.com/zigbee-support)
as Adobe PDF files or as on-line HTML help:
•
EM35x Development Kit User’s Guide (this document)
•
Application Development Fundamentals (120-3029-000)
EM35x Development Kit User Guide
120-4030-000E
2-4
2.8
•
Testing and Debugging Applications (120-3030-000)
•
Advanced Application Programming with the Stack and HAL APIs (120-3031-000)
•
EmberZNet API Reference: For the EM350 SoC Platform (120-3022-000)
•
EM35x Breakout Board Technical Specification (120-2009-000)
•
InSight Adapter (ISA3) Technical Specification (120-2010-000)
•
EM35x Module Technical Specification (120-2011-000)
•
EM35x Datasheet (120-035X-000)
•
InSight Desktop User’s Guide (120-4005-000 and on-line HTML help)
•
Application notes (various)
Before You Begin
The EM35x Development Kit is designed only for the operating conditions and interfaces specified in Ember
documents 120-2010-000, the InSight Adapter (ISA3) Technical Specification, and 120-2009-000, the EM35x
Breakout Board Technical Specification. Any modifications or alterations to the hardware are liable to cause
irreparable damage to the EM35x Development Kit, and shall render its warranty null and void.
If you wish to use the EM35x Development Kit in a non-standard fashion, consult with Ember Customer Support
or Ember Sales before starting custom development. This is especially true if you are embarking on an
aggressive development cycle, plan to use custom hardware, or wish to use alternate software configuration
files, images, or hardware configurations. Contact us and describe your plan, so we can help you minimize the
risk of delays in your development cycle.
EM35x Development Kit User Guide
120-4030-000E
3-1
3
Development Kit Components
3.1
Overview
Figure 3-1 shows the components in the EM35x Series Development Kit.
Figure 3-1. EM35x Series Development Kit
This chapter describes the hardware and software components in the EM35x Series Development Kit.
EM35x Development Kit User Guide
120-4030-000E
3-2
3.2
Hardware
The EM35x Series Development Kit development board set has three major hardware components:
•
Breakout Board
•
EM35x Module
•
InSight Adapter (ISA3)
The EM35x Series Development Kit also includes the following components:
•
US-to-Multinational AC Plug Power Adapter Kit
•
Power-Over-Ethernet (PoE) Switch
•
USB Power Adapters
•
Miscellaneous Cables (USB, DEI, InSight Port, and RF Coax)
3.2.1 EM35x Breakout Board
Figure 3-2. EM35x Breakout Board
The Breakout Board (Figure 3-2) has the following components:
•
External power supply connectors
•
One DB-9 serial port connector for RS-232 serial communication
•
One header with TTL-compliant UART signals for SPI serial communication
EM35x Development Kit User Guide
120-4030-000E
3-3
•
A buzzer, two buttons, two LEDs, and a temperature sensor for application development purposes
•
Hardware reset buttons for the EM35x module
•
Prototype or breadboarding area (28 x 20, 0.1” pitch array) for application-specific hardware
development
•
One InSight data emulation interface connector
For detailed information about the Breakout Board, see document 120-2009-000, the EM35x Breakout Board
Technical Specification.
3.2.2 EM35x Module
The EM35x Series Development Kit Module pictured in Figure 3-3 is used together with the Development Kit
Breakout Board to prototype customer hardware, and to develop and debug application software. Its low-power
design represents a good starting point for your own product design.
Figure 3-3. EM35x Breakout Board with EM35x Module installed
The EM35x Module includes these components:
•
The Ember EM35x SoC (IEEE 802.15.4-compliant, 2.4 GHz radio transceiver with ARM® Cortex-M3
microcontroller).
•
All off-chip components required for optimum SoC performance
•
Two LEDs
•
InSight Port connector
EM35x Development Kit User Guide
120-4030-000E
3-4
For detailed information about the EM35x Module supplied with your kit, see document 120-2011-000, the
EM35x Module Technical Specification.
Once you move away from the EM35x Module and toward application-specific hardware, refer to the extensive
Ember reference design library at www.silabs.com/zigbee-support. Each reference design provides a schematic,
Bill of Materials (BOM), characterization data, and layout files. They are designed and delivered in a manner
that reduces both time to market and hardware implementation risk. For assistance in locating the best design
for your needs, contact support at www.silabs.com/zigbee-support.
3.2.3 InSight Adapter (ISA3)
InSight Adapter (ISA3) provides an efficient and configurable Debug Interface to the Development Kit Breakout
Board for processing emulation and debug commands. It also provides an interface to InSight Desktop for
monitoring and managing network data.
The ISA3 has the following components:
•
Debug Port interface to the Breakout Board’s Extended Debug Interface Connector
•
InSight Port interface to the radio communication module, providing programming and debugging
services
•
TCP/IP 10/100 Ethernet interface with Power-over-Ethernet functionality
•
USB Interface
3.3
Acceptable Power Sources for Normal Operation
Table 3-1 lists all of the components and the acceptable combinations of power sources that yield normal
operation. Potential power sources include the following:
•
Power-Over-Ethernet (PoE) Switch
•
AAA battery pack (3VDC)
•
USB cable
•
Connected to PC
•
Connected to USB Power Supply with Adapters
•
Power over Insight Port on ISA (the target power select switch on the front panel must be set to Int
(Internal)).
•
From RCM dedicated power
•
External DC adapter (not supplied with the Development Kit)
EM35x Development Kit User Guide
120-4030-000E
3-5
Table 3-1. Safe combination of operating power
InSight Adapter (ISA3)
PoE
External DC
AAA
Battery
Pack
ISA3
InSight
Port
USB
Breakout
Board
X
N/A
N/A
N/A
X
N/A
N/A
X
1
N/A
X
X
X
3
X
N/A
EM35x Module
N/A
N/A
EM35x Breakout Board
N/A
X
2
3.3.1 Power-Over-Ethernet (PoE) Switch
The EM35x Series Development Kit contains a NETGEAR 8-port Power-over-Ethernet (PoE) switch that supplies
power to an ISA3 over a standard TIA/EIA-568 category 5 cable. The ISA3 can, in turn, supply power to an EM35x
Breakout Board and the Module that is mounted on it. Thus, you can place Breakout Boards wherever an
Ethernet cable connection is available.
The DC operating power for data terminal units is fed through unused pairs 7/8 and 4/5. For more information
about the NETGEAR switch, see its online technical specifications.
The NETGEAR PoE Switch that is supplied in the EM35x Series Development Kit is certified by Silicon Labs. If you
wish to use a different PoE switch, consult Customer Support at www.silabs.com/zigbee-support.
3.3.1.1 US-to-Multinational AC Plug Power Adapter Kit
The US-to-Multinational AC Plug Power Adapter Kit (Figure 3-4) is a set of 3 power adapters for use with the
NETGEAR PoE Switch. These three interchangeable plugs are provided with various port configurations suitable
for various locales: North America, Europe, United Kingdom, and Australia.
1
Power is sourced from ISA3 to the RCM module using the InSight Port cable connected to the ISA3 with its target
power select switch set to Int (Internal).
2
External DC power between 4V and 20V can be connected to clip leads J1 (+) and J32 (-) on the EM35x Breakout
Board.
3
Power is sourced from ISA3 to the EM35x Breakout Board using the InSight Port cable connected to the ISA3 with its
target power select switch set to Int (Internal).
EM35x Development Kit User Guide
120-4030-000E
3-6
Figure 3-4. US-to-Multinational AC Plug Power Adapter Kit
3.3.2 USB Power Supply with Adapters
The USB power adapter (Figure 3-5) is a linear regulated wall plug power supply with 5V DC at 1A regulated
output. It has a USB type-B connector for connecting power via a USB cable to the USB port of the ISA3 or
Breakout Board. Four interchangeable snap-in input plugs are provided with various port configurations suitable
for various locales: North America, Europe, United Kingdom, and Australia.
EM35x Development Kit User Guide
120-4030-000E
3-7
Figure 3-5. USB power supply with interchangeable AC adapters
3.4
Software
The EM35x Series Development Kit contains the following software components:
•
Network Stack
•
Hardware Abstraction Layer
•
Sample Applications
•
InSight Desktop
3.4.1 Network Stack
The EmberZNet PRO network stack is an advanced implementation of the ZigBee Pro wireless protocol stack
which provides mesh routing algorithms for creating reliable, flexible, and secure networks. The stack’s APS
layer provides interfaces for delivering messages reliably. The network stack API is documented in documents
120-3009-000, Advanced Application Programming with the Stack and HAL APIs, and 120-3009-000, the EZSP
Reference Guide, as well as 120-3022-000, EmberZNet API Reference: For the EM35x SoC Platform, also
available in HTML.
The network stack is delivered as a collection of libraries that you can link to your applications. The libraries
are available in both release and debug build versions:
•
Debug build implements features that facilitate application debugging, such as error checking and an
interface to InSight Desktop, which provides information about traffic flow, API traces, error
conditions, and more.
•
Release build omits debugging functionality, so it is smaller and runs more efficiently. Use this build in
your application after it is fully debugged and ready for product release.
EM35x Development Kit User Guide
120-4030-000E
3-8
•
Stub library is a library used for resolving references but which has no functionality. For those libraries
which are not needed by the application, the stub library must be linked in order for the stack to build
properly.
Table 3-2 lists the EmberZNet PRO stack and associated libraries.
Note:
Table 3-2 shows the base library name, but it does not duplicate entries for the debug and stub
libraries because they are self explanatory.
Table 3-2. EmberZNet PRO stack and associated libraries
Library Name
Description
alarm-library
Alarm library
binding-table-library
Binding table library
end-device-bind-library
End device bind library
security-library-core
Core security library
security-library-core-end-device
Core security library for end devices. This library is smaller than the
full core security library.
security-library-link-keys
Library to handle optional link keys
zigbee-pro-stack
Core ZigBee Pro stack functionality
3.4.2 Hardware Abstraction Layer
The hardware abstraction layer (HAL) acts as a conduit between the network stack and the node processor and
radio. Separating network stack functionality from the specific hardware implementation enables easy
portability. HAL code is provided as a library that you can alter in order to customize, extend, or reduce device
functionality across various hardware platforms. The HAL API is documented in document 120-3022-000, the
EmberZNet API Reference: For the EM35x SoC Platform.
3.4.3 Sample Applications
The EM35x Series Development Kit contains sample applications. These demonstrate aspects of the network
stack that show the breadth of stack functionality. Silicon Labs provides an IAR project and workspace file for
each application. Table 3-3 lists the sample applications that are in the current distribution. All applications are
in the app directory.
EM35x Development Kit User Guide
120-4030-000E
3-9
Table 3-3. Development Kit Sample Applications
Application name
Directory
Description
Smart Energy / Home Automation
ha
An Application Framework that can be set up
to implement ZigBee Smart Energy devices or
ZigBee Home Automation devices. This
includes an implementation of the ZigBee
Cluster Library that allows building of any of
the SE or HA devices.
Nodetest
nodetest
A low-level test program meant for functional
testing of RF modules.
Sensor & Sink
sensor
An example of a complete application that
implements a distributed sensor network with
one or more data collection points (called
"sensors") and one or more data storage points
(called "sinks").
ZigBee Device Object (ZDO) Sample
zdo
An example of how to send ZDO messages
using the ZDO library.
Manufacturing Library Sample
mfglib
An example of how to use the manufacturing
library.
Standalone Bootloader Demo
standalone-bootloaderdemo
An example of how to use the bootloader
library utilities.
Application Bootloader Demo
app-bootloader-demo
An example of how to integrate the application
bootloader utility library into an application.
3.4.4 InSight Desktop
InSight Desktop (ISD) is a graphical tool that manages the Development Kit hardware and displays network and
node activity in real time (see Figure 4-1). It provides a rich and flexible interface to Ember-embedded
networks, which helps you develop and debug new network applications.
InSight Desktop includes these features:
•
An Integrated Development Environment (IDE) with multiple editor panes that provide tiered views of
network activity, letting you drill down from a high-level map of node interactions to the details of
each packet.
•
Customizable filters that let you specify exactly which network activities to display.
•
Log files that save captured data, so you can step through transactions and events for detailed
analysis.
•
A file browser that lets you easily upload new applications to any connected node.
An Adapters view shown in Figure 3-6 allows you to interact with the ISA3s and RCM to download new firmware,
reset, and manage each of the devices.
EM35x Development Kit User Guide
120-4030-000E
3-10
Figure 3-6. Insight Desktop
For detailed information about InSight Desktop, refer to document 120-4005-000, the InSight Desktop User’s
Guide, and InSight Desktop’s on-line HTML help.
EM35x Development Kit User Guide
120-4030-000E
4-1
4
Setting Up Hardware Components
4.1
Overview
This chapter contains the following sections:
4.2
•
ETRX3 Radio Communications Module (RCM)
•
Hardware Connections
•
Connecting the Breakout Board and RCM
•
Breakout Board Power Configurations
•
Breakout Board Serial Configurations
•
Common Hardware Configurations
•
Connecting the RF Cable to the RCM
ETRX3 Radio Communications Module (RCM)
The EM35x Series Development Kit contains various types of ETRX3 Radio Communications Modules (designed by
Silicon Labs’ partner, Telegesis). These modules contain either the EM357 or EM351 IC and are configured to use
either the ceramic antenna or the on-board RF connector (U.FL). Some module variants also include a power
amplifier. These configuration options are noted in the Module Product Label, as shown the example label in
Figure 4-1. The top line contains the Silicon Labs Part Number, while the bottom line contains the Module Serial
Number. The Module Serial Number is also listed in the Hardware Identification List attached to your Quick Start
Guide. You can determine the EUI-64 of each module based on this list.
Figure 4-1. Module Product Serial Number Label
The modules shipped already installed on Breakout Boards are module variant EM357-MOD-ANT-T. All other
module variants are contained in the Module Variety Pack. Refer to Table 4-1 for configuration comparisons of
the modules included in your development kit. There are three additional EM351 module variants not included
in the development kit that are available for purchase. Contact your sales representative or distributor for more
details on these module variants.
EM35x Development Kit User Guide
120-4030-000E
4-2
Table 4-1. Module Product Variant Matrix
Silicon
Labs
Product
Number
IC
Antenna or
Connector
PA or
non-PA
Qty
Included
in Kit
Silicon Labs Part Number
Telegesis Part Number
EM357-MOD-ANT-T
ETRX357+CB
0720
EM357
Antenna
Non-PA
3
EM357-MOD-RF-T
ETRX357-HR+CB
0721
EM357
Connector
Non-PA
1
EM357-MOD-LR-RF-T
ETRX357-LRS-HR+CB
0722
EM357
Connector
PA
1
EM357-MOD-LR-AN-T
ETRX357-LRS+CB
0723
EM357
Antenna
PA
2
EM351-MOD-ANT-T
ETRX351+CB
0724
EM351
Antenna
Non-PA
2
EM351-MOD-RF-T
ETRX351-HR+CB
0725
EM351
Connector
Non-PA
0
EM351-MOD-LR-RF-T
ETRX351-LRS-HR+CB
0726
EM351
Connector
PA
0
EM351-MOD-LR-AN-T
ETRX351-LRS+CB
0727
EM351
Antenna
PA
0
4.3
Hardware Connections
To avoid communication problems, verify that each radio communication module is firmly seated in its Breakout
Board connector, and its InSight port cable is properly seated.
4.4
Connecting the Breakout Board and RCM
Refer to document 120-4031-000, Quick Start Guide, included in your development kit for detailed step-by-step
instructions for setting up your hardware.
Two hardware modules attach to the EM35x Breakout Board:
•
Radio Communication Module (RCM)
•
InSight Adapter
Caution: Observe electrostatic discharge (ESD) precautions when removing, handling, or replacing RF
communication modules.
To attach the radio communication module:
Align the radio communication module to its footprint outline on the Breakout Board, and then press it into
place. Make sure that the RCM sits firmly in its mating connector.
To remove the radio communication module:
•
Carefully pull the RCM away from the Breakout Board.
To attach the InSight Adapter:
1
Plug the InSight Port cable into the InSight Adapter.
2
Plug one end of the InSight Port cable into the 10 pin InSight Port (J31) on the Breakout Board, and the
other end into the ISA. If desired, the InSight Port cable may be connected directly to the RCM instead of
the Breakout Board, but the Breakout Board connector allows for straight cable paths and more convenient
swapping of modules.
3
Verify that the InSight Adapter’s Target Power Select switch is set to Int (Internal).
To remove the InSight Adapter:
1
Unplug the InSight Port cable from the Breakout Board (or radio communication module).
2
Unplug the InSight Port cable from the InSight Adapter.
EM35x Development Kit User Guide
120-4030-000E
4-3
4.5
Breakout Board Power Configurations
The Breakout Board may be powered in one of four ways:
•
Breakout Board Power Supplied by ISA3 (Figure 4-2): The default configuration is to supply power via
the InSight Adapter and InSight Port cable. Ensure the power switch on the InSight Adapter is in the
INT (Internal) position. The power supply of the InSight Adapter is also controlled via the admin
interface. You may need to connect to the admin port of the ISA and issue the “power on” command.
No external power supply should be connected to the Breakout Board when supplying power from the
ISA. The power supply jumper on the Breakout Board should be in the horizontal position, connecting
V_ISA to the center pin. The V_ISA LED will illuminate when power is applied.
Figure 4-2. Breakout Board Power Supplied by ISA3
•
Breakout Board Power Supplied by USB (Figure 4-3): The Breakout Board may also be powered via the
USB connector, either using a USB cable plugged in to the USB power adapter included in the
development kit, or by connecting it to your PC. The power supply jumper on the Breakout Board
should be in the lower vertical position, connecting V_REG to the center pin. The V_USB LED will
illuminate when power is applied. When powering the Breakout Board in this way, ensure the power
switch on the InSight Adapter is in the EXT (External) position.
EM35x Development Kit User Guide
120-4030-000E
4-4
Figure 4-3. Breakout Board Power Supplied by USB
•
Breakout Board Power Supplied by DC Jumpers (Figure 4-4): The Breakout Board may also be
powered by an external power source that provides 4-20 volts DC. The power supply should be
connected to jumpers J1 (+ supply) and J32 (ground). The power supply jumper on the Breakout Board
should be in the lower vertical position, connecting V_REG to the center pin. The VIN LED will
illuminate when power is applied. When powering the Breakout Board in this way, ensure the power
switch on the InSight Adapter is in the EXT (External) position.
Figure 4-4. Breakout Board Power Supplied by DC Jumpers
•
Breakout Board Power Supplied by Battery Connector (Figure 4-5): Finally, the Breakout Board may
also be powered via the battery connector, using the supplied battery packs and 2x AAA batteries. The
power supply jumper should be in the upper vertical position, connecting V_BATT to the center pin.
The V_BAT LED will illuminate when power is applied. When powering the Breakout Board in this way,
ensure the power switch on the InSight Adapter is in the EXT (External) position.
EM35x Development Kit User Guide
120-4030-000E
4-5
Figure 4-5. Breakout Board Power Supplied by Battery Connector
The V_MOD LED on the Breakout Board will also illuminate to indicate that power is properly applied to
the board and the RCM.
4.6
Breakout Board Serial Configurations
Serial connectivity to the Breakout Board can be made in a number of ways. The default configuration of your
development kit will match your expected usage scenario.
1.
To use the pass-through UART feature of the ISA: plug the larger 12-pin DEI cable into the DEI header on
the Breakout Board and the connector on the ISA. Ensure that jumpers are installed across the 8th (PB2) and
10th (PB1) rows of headers next to the DEI port on the Breakout Board to pass the UART RX and TX signals
through. The serial port selection jumpers between the USB and DB-9 connectors should be removed, or
placed on their center pins. Connection to the UART pass-through port can then be made using either of
the two options below:
a.
b.
Connect to the ISA using InSight Desktop. Launch the console. Choose the Serial 1 tab.
Run a terminal application (for example, Microsoft Telnet Client, HyperTerminal, PuTTY). Connect
to port 4901 on the ISA.
2.
To use the RS-232 interface: connect a serial cable to the DB-9 connector on the Breakout Board. Ensure
the 4 jumpers above the DB-9 connector are positioned towards the DB-9 connector to send the UART
signals to the RS-232 transceiver, and remove the jumpers from the row of headers next to the DEI port or
make sure the DEI cable is disconnected.
3.
To use the USB interface: install the FTDI USB drivers as described in Section 5.5, “Installing FTDI USB
Drivers”, and connect a USB cable to the Breakout Board and your PC. Ensure the four jumpers above the
DB-9 connector are positioned towards the USB connector to send the UART signals to the FTDI chip, and
remove the jumpers from the row of headers next to the DEI port or make sure the DEI cable is
disconnected.
4.7
Common Hardware Configurations
Common configurations of the Breakout Board and ISA can be seen in the following figures.
EM35x Development Kit User Guide
120-4030-000E
4-6
Figure 4-6. ISA supplying power; pass-through UART being used for serial communication
Figure 4-7. ISA supplying power; RS-232 serial communication
EM35x Development Kit User Guide
120-4030-000E
4-7
Figure 4-8. Power supplied via USB connector; pass-through UART being used for communication
Figure 4-9. ISA supplying power; FTDI Serial <-> USB converter used for communication
EM35x Development Kit User Guide
120-4030-000E
4-8
4.8
Connecting the RF Cable to the RCM
As detailed in Table 4-1, depending on the configuration of the module, some RCMs include an internal antenna
while others include an RF connector (type U.FL) where an external antenna can be connected via an RF
adapter cable. See Figure 4-10 for an example of a module with an internal antenna. The RF connector may also
be used as a connection to test equipment. The development kit contains an RF adapter cable (type U.FL) that
plugs into the RF Connector on these modules. See Figure 4-11 for an example of a module with this RF
connector.
Figure 4-10. Module with Internal Antenna
EM35x Development Kit User Guide
120-4030-000E
4-9
Figure 4-11. Module with U.FL RF Connector
EM35x Development Kit User Guide
120-4030-000E
5-1
5
Installing the Software
5.1
Overview
Ember software for the EM35x platform is distributed through Silicon Labs’ Ember support portal at
www.silabs.com/zigbee-support. You must contact Customer Support for a portal username.
5.2
Installing the Ember Stack
The Ember Stack installer, ember-stack-<version>-em35x-dev.exe, should be installed first. It performs the
following actions:
1.
Installs the files needed to develop applications on the Ember Stack into a directory specified by the
user (The default location is C:\Program Files\Ember\{release version}\ em35x.)
2.
Adds a shortcut to the Start Menu into the folder specified by the user (default directory is
Ember\{release version}\em35x).
3.
Adds an entry to “Add/Remove Programs” (accessed from Windows Control Panel) so the stack can be
uninstalled.
This release should be installed in a different directory from prior installations. It is possible for multiple
installations to exist together.
5.3
Installing InSight Desktop
InSight Desktop can be installed by running the Insight_Desktop_Installer_<version>.exe self extracting
executable found on the portal. Document 120-4031-000, EM35x Quick Start Guide, included in your EM35x
Series Development Kit provides details about installing InSight Desktop for the first time and running the FirstTime Setup Wizard.
5.4
Installing IAR Embedded Workbench for ARM
A CD including IAR Embedded Workbench for ARM is included with your development kit. Depending on which
development kit you ordered (IAR or not), you will receive either a 30-day evaluation version of EWARM or a
licensed version.
To install the IAR Embedded Workbench for ARM:
1.
Insert the CD into your CD Drive and follow the instructions on the installer that should automatically
appear. If the Installer does not automatically start, browse to your CD Drive, and click on
autorun.exe.
2.
Refer to the “Quickstart Installation Information” section of the IAR installer for additional information
about the installation process and how to configure your license.
EM35x Development Kit User Guide
120-4030-000E
5-2
5.5
Installing the ISA3 Utilities
The installer ISA3_Utilites_<version>.exe performs the following actions:
1.
Installs the USB driver for the InSight Adapter (ISA3).
2.
Installs the following command line utilities:
•
em3xx_load.exe
•
em3xx_isa.exe
•
em3xx_convert.exe
3.
Adds an entry to “add/remove programs” (accessed from Windows Control Panel) so that the utilities
can be uninstalled.
4.
Modifies your PATH environment variable so that the command line utilities can be easily executed
from a Windows Command Prompt.
Note:
The ISA3 Utilities installer should always be run after all previous installers including after IAR
Embedded Workbench for ARM.
5.6
Installing FTDI USB Drivers
To use the USB interface of the Breakout Board for UART connectivity, you must install the drivers for the FTDI
USB<->Serial converter. You can obtain this driver from FTDI at http://www.ftdichip.com/Drivers/VCP.htm.
These drivers are not required if you connect to the UART of the Breakout Board using the RS-232 port or via the
pass-through UART functionality of the InSight Adapter.
EM35x Development Kit User Guide
120-4030-000E
6-1
6
Using the InSight Adapter
6.1
Overview
The InSight Adapter (ISA3) provides an Ethernet connection to EM35x devices. You can use the InSight Adapter to
perform the following tasks:
•
Program and debug using Serial Wire or JTAG.
•
Monitor packets sent and received by the radio.
•
Send and receive serial port data.
•
Send and receive debugging data.
•
Turn power on and off.
•
Control reset, bootloader and GPIO signals.
6.2
Connectivity and Power
All the features of the InSight Adapter are available via the Ethernet connection. The ISA3 can also be
connected to a PC via USB to change the Ethernet settings.
When connected via USB, the InSight Adapter will also be powered via USB. It should be connected to a powered
USB hub, or port on your PC that is capable of supplying full power to connected devices.
When connected via Ethernet, the InSight Adapter may be powered in one of two ways:
•
Using an Ethernet switch that supplies Power Over Ethernet (PoE).
•
Using a USB power supply.
The ISA3 will also supply power to the connected EM35x device when the power switch is in the INT (Internal)
position. If the connected EM35x device has its own power supply, ensure the power switch is kept in the EXT
(External) position.
You can connect via Ethernet to the ports listed in Table 6-1 using either InSight Desktop or a terminal
application (for example, Microsoft Telnet Client, HyperTerminal, or PuTTY).
Table 6-1. InSight Adapter Ports
Port
Use
4900
Virtual serial port on EM35x via InSight Port cable.
4901
Physical serial port on EM35x via Data Emulation Interface cable.
4902 or 23
Admin interface.
6.3
Ethernet Settings
By default, InSight Adapters are configured to get an IP address via DHCP. They are assigned hostnames of EMISA3-00, EM-ISA3-01, etc. You can use InSight Desktop to discover the ISA3s on the network and see their IP
addresses.
EM35x Development Kit User Guide
120-4030-000E
6-2
If you are unable to use DHCP, the Ethernet configuration may be changed using the admin interface over USB
as described in “Using the admin interface over USB.” The following example changes the settings to a static IP
address of 192.168.1.100 with a netmask of 255.255.255.0 and a gateway of 192.168.1.1.
>em3xx_isa.exe --admin "ip static 192.168.1.100 255.255.255.0 192.168.1.1"
em3xx_isa version 1.0.9
DLL version 1.0.13, compiled Aug 19 2009 19:42:00
Success: ip: (after reboot) Static 192.168.1.100 255.255.255.0 192.168.1.1
>em3xx_isa.exe --admin "ip dhcp off"
em3xx_isa version 1.0.9
DLL version 1.0.13, compiled Aug 19 2009 19:42:00
Success: ip: (after reboot) DHCP off
You can change the hostname to make it more descriptive or to avoid conflicts if ISA3s from multiple
development kits are connected to the same network. To change the hostname, use the admin command
hostname set <hostname>.
6.4
Using the Admin Interface over USB
1.
Connect the ISA3 to the PC using USB. Only connect one ISA at a time by USB.
2.
Run em3xx_isa.exe with the --admin option.
3.
Configure the ISA3 using the commands described in Chapter 7, InSight Adapter Commands.
6.5
Using the Admin Interface over Ethernet
1.
Connect the ISA3 to the network using Ethernet.
2.
Connect to the admin port on the ISA3 using either InSight Desktop or a terminal application:
•
Connect to the ISA3 using InSight Desktop. Launch the console. Choose the Admin tab
OR
•
3.
6.6
Run a terminal application (e.g. Microsoft Telnet Client, HyperTerminal, PuTTY). Connect to port
4902 or 23 on the ISA3.
Configure the ISA3 using the commands described in Chapter 7, InSight Adapter Commands.
Using the Serial Ports
Connect to port 4900 or 4901 on the InSight Adapter using either InSight Desktop or a terminal application.
Port 4900 connects to the virtual serial port on the EM35x via the InSight Port cable. The virtual serial port has
no baud rate or other settings.
Port 4901 connects to the physical serial port on the EM35x via the Data Emulation Interface (DEI) cable. The
default settings are 115200 baud, 8-n-1 (8 data bits, no parity bit, 1 stop bit). To change the default settings,
use the port admin command. For example, for 19200 baud, 8-n-1, use the command port 1 19200 8-n-1.
6.7
Updating the Firmware
Periodically, Silicon Labs provides updated firmware for the InSight Adapter. You can perform the update using
em3xx_isa.exe or em3xx_load.exe. Both utilities automatically update the firmware to the latest version each
time they run.
EM35x Development Kit User Guide
120-4030-000E
6-3
To update an InSight Adapter over USB, run em3xx_isa.exe with no options. For example:
>em3xx_isa.exe
em3xx_isa version 1.0.9
DLL version 1.0.13, compiled Aug 19 2009 19:42:00
Updating firmware: Ember InSight Adapter V1 compiled May 26 2009 13:47:00 V0.2b4
Replacing firmware: Ember InSight Adapter V1 compiled Feb 26 2009 21:54:00
... Firmware update successful. CRC=8DA7
Waiting for new firmware to boot
New firmware booted successfully
To update an InSight Adapter over Ethernet, run em3xx_isa.exe with the --ip option. For example:
>em3xx_isa.exe --ip 192.168.1.100
em3xx_isa version 1.0.9
DLL version 1.0.13, compiled Aug 19 2009 19:42:00
Connecting to IP address 192.168.1.100
Updating firmware: Ember InSight Adapter V1 compiled May 26 2009 13:47:00 V0.2b4
Replacing firmware: Ember InSight Adapter V1 compiled Feb 26 2009 21:54:00
... Firmware update successful. CRC=8DA7
Waiting for new firmware to boot
New firmware booted successfully
EM35x Development Kit User Guide
120-4030-000E
7-1
7
InSight Adapter Commands
7.1
Syntax Conventions
Element
Meaning
Example
Literal
A command or argument that is entered exactly as
shown.
hostname read
Variable
An argument that is entered as the desired value for that
variable.
hostname set hostname
[ | ]
An argument chosen from a list.
[on|off]
7.2
Entering Commands
•
Commands can be entered over USB (see Section 6.4, “Using the Admin Interface over USB”) or Ethernet
(see Section 6.5, “Using the Admin Interface over Ethernet”).
•
Commands are not case sensitive.
•
Arguments are separated with a single space.
•
Backspace can be used to correct mistakes.
7.3
Command List
•
button
•
config
•
help
•
hostname
•
ip
•
port
•
power
•
quit
•
reset
•
usbaddr
•
version
7.3.1 button
button [0|1] [press|release]
Description
Simulates button 0 or 1 on the Breakout Board being pressed or released.
The Data Emulation Interface cable must be connected.
EM35x Development Kit User Guide
120-4030-000E
7-2
Example
button 1 press
7.3.2 config
config
Description
Displays the configuration of the InSight Adapter (ISA3):
•
hostname and static IP settings
•
IP mode (static or DHCP) and current IP settings
•
serial port settings
•
firmware version
•
serial number and Ethernet MAC address
•
type, EUI and board name of the attached EM35x device
You can also view the configuration using InSight Desktop.
7.3.3 help
help
Description
Displays a list of all ISA3 commands.
7.3.4 hostname
hostname set hostname
hostname read
Description
Sets or displays the hostname of the InSight Adapter.
The ISA3 must be reset for a change to take effect.
You can also view the hostname using InSight Desktop.
Example
hostname set mydevice3
7.3.5 ip
ip static ipaddress netmask gateway
ip dhcp [on|off]
Description
Sets the static IP address, netmask and gateway. These are only used when DHCP is turned off.
Turns DHCP on or off.
The ISA3 must be reset for a change to take effect.
EM35x Development Kit User Guide
120-4030-000E
7-3
Examples
ip static 192.168.1.100 255.255.255.0 192.168.1.1
ip dhcp off
7.3.6 port
port 1
port 1 baud
port 1 baud [5|6|7|8]-[n|o|e]-[1|2]
Description
Displays the configuration of the serial port.
Sets the baud rate, data bits (5, 6, 7 or 8), parity (none, odd or even) and stop bits (1 or 2).
Examples
port 1
port 1 57600
port 1 115200 8-n-1
7.3.7 power
power [on|off|read]
Description
Turns the power to the attached EM35x device on or off. Displays the current power setting.
You can also turn the power on and off using InSight Desktop.
Example
power on
7.3.8 quit
quit
Description
Closes the connection to the admin interface (Ethernet only).
7.3.9 reset
reset
reset adapter
Description
Resets the attached EM35x device.
Resets theISA3.
You can also reset the device using InSight Desktop.
EM35x Development Kit User Guide
120-4030-000E
7-4
7.3.10 usbaddr
usbaddr read
usbaddr set [0|1|2|3|FF]
Description
Displays the USB address configuration of a specific ISA3.
Sets the USB address configuration, range is 0-3 or FF (default).
The ISA3 must be reset for a change to take effect. See document 120-5073-00, Programming Options for the
EM35x Platform, for step by step instructions on setting the address of an ISA3.
7.3.11 version
version
Description
Displays the firmware version of the InSight Adapter.
You can also view the version using InSight Desktop.
EM35x Development Kit User Guide
120-4030-000E
8-1
8
Software Tools Overview
8.1
Using the EM357 Nodetest Application
The Nodetest Application replaces the Rangetest Application provided with earlier releases. This new
application supports a more advanced command parser and provides results in a more consistent, easy to parse
format.
The Nodetest application is pre-programmed on to the Radio Communication Modules (RCMs) included with your
EM35x Development Kit. The pre-built application image is also located at {stack installation
directory}\app\nodetest\nodetest.s37.
You may communicate with the serial interface of the Nodetest application using the methods described in
Chapter 6. Ensure that the serial port is configured for 115200 baud, 8 data bits, No parity, and 1 stop bit. By
default the InSight Adapter (ISA3) is configured in this way, but it can be adjusted in this manner:
•
Connect to the admin interface of the ISA3.
•
Issue the baud rate configuration comment for the pass-through UART (port 1): port 1 115200
The Nodetest application provides on-line help about the available commands that can be viewed by executing
the command “help”. All input parameters to Nodetest are specified in hexadecimal.
8.2
Running a Packet Error Test
A typical usage scenario for the Nodetest application is measurement of Packet Error Rate (PER). PER is defined
in 802.15.4 as the percentage of transmitted packets that are not detected correctly. The Nodetest application
provides two commands "rx" and "tx" that are designed to interoperate with the "receive" and "transmit"
commands from the EM250 Rangetest application.
PER measurement procedure:
1.
Load the Nodetest application on two EM357 nodes.
2.
Set the radio to the desired channel on both nodes with the "setchannel n" command where "n" is the
desired channel number in hex.
3.
Issue the "rx" command on the first node.
4.
Issue the "tx a" command on the second node. (This command will transmit 10 (hex a) packets of the
form required for PER analysis. For actual PER analysis, send 1000 or more packets.)
5.
Observe the PER result in the third column of the "rx" command output, for example 1:
> rx
{{(rx)} test start ('e'nd)}
#{{(rx)}
{num}
{seq}
{per} {lqi}
{ {
1} {
1} { 0} {0x00}
{ {
2} {
2} { 0} {0x00}
{ {
3} {
3} { 0} {0x00}
1
{rssi}{gain}
{-22} {0x31}
{-22} {0x31}
{-22} {0x31}
{status}
{0x4000}
{0x4000}
{0x4000}
{time}
{0x000F3716}
{0x000F9FE6}
{0x000008B6}
{length}}
{0x12} }
{0x12} }
{0x12} }
This example may show different length packets than you see.
EM35x Development Kit User Guide
120-4030-000E
8-2
{ {
4} {
4}
{ {
5} {
5}
{ {
6} {
6}
{ {
7} {
7}
{ {
8} {
8}
{ {
9} {
9}
{ {
10} {
10}
{{(rx)} test end}
{
{
{
{
{
{
{
0}
0}
0}
0}
0}
0}
0}
{0x00}
{0x00}
{0x00}
{0x00}
{0x00}
{0x00}
{0x00}
{-22}
{-22}
{-22}
{-22}
{-22}
{-22}
{-22}
{0x31}
{0x31}
{0x31}
{0x31}
{0x31}
{0x31}
{0x31}
{0x4000}
{0x4000}
{0x4000}
{0x4000}
{0x4000}
{0x4000}
{0x4000}
{0x00007186}
{0x0000DA57}
{0x00014327}
{0x0001ABF6}
{0x000214C6}
{0x00027D96}
{0x0002E666}
{0x12}
{0x12}
{0x12}
{0x12}
{0x12}
{0x12}
{0x12}
}
}
}
}
}
}
}
>
To end the rx test, press the 'e' key. To reset the rx test statistics, end and restart the rx test.
The test may also be run between an EM357 and an EM250 using the Rangetest application on the EM250. When
using Rangetest, the commands names are "receive" and "transmit."
8.3
Testing Deep Sleep Current
•
Deep sleep current can be easily measured using the Nodetest application running on a Breakout Board.
Deep sleep current can only be measured when power is supplied to the board from a source other than the
ISA3. The buffer logic on the ISA3 consumes extra current which will not allow for accurate measurements.
•
If an ISA3 is connected to the Breakout Board, then the ISA3's Target Power Select Switch should be
switched to EXT (External) so that the ISA3 is not supplying power.
•
Supply power through the USB jack, the DC jack, or the AAA Battery Pack. (The USB jack is recommended
and reviewed in these test steps because it is the simplest.)
•
Rotate the VIN_SELECTOR jumper (J2/J3) on the Breakout Board to the V_REG position (pins 2 and 3). If
power is supplied properly and all four power/LED jumpers (J2/J3, J4, J6, and J7) in the upper left corner
of the board are installed, then only the red V_USB LED and the green V_MOD LED will be illuminated.
•
To properly measure current, remove the V_MOD jumper (J6) from the Breakout Board. This ensures that
the green V_MOD LED is not being driven. If supplying voltage through the J8 battery connector, also
remove J7 so the V_BATT LED DS5 is not driven.
•
Remove the V_MOD_EN jumper (J4) from the Breakout Board to take current measurements. Then, connect
an ammeter in place of the jumper.
•
If using EM35x Breakout Board revision B0 or later, remove the DataFlash jumpers at J33 to isolate the
DataFlash IC from the rest of the circuit.
EM35x Development Kit User Guide
120-4030-000E
8-3
These jumper settings can be seen in Figure 8-1.
Figure 8-1. Jumper setting for Deep Sleep Current Testing
•
Given an RCM programmed with Nodetest, execute the "shutdown" command:
> shutdown
Will wake from GPIO activity on the following port pins:
Port B, pin 6.
Port C, pin 6.
Entering SLEEPMODE_POWERDOWN via halSleep...
•
Once the node is asleep, disconnect the InSight Port cable, the DEI cable, the RS232 cable, and remove all
four UART jumpers (J22, J24, J25, and J26) from the Breakout Board between the USB and RS232
connectors to obtain the lowest current settings. All other jumpers may remain installed.
•
Waking up is accomplished via either activity on the SerialWire debugger or pressing BUTTON0 or BUTTON1.
To measure deep sleep while the InSight Port cable is still attached, issue the "swjdisable 1" command in
Nodetest to disable the SerialWire/JTAG port, and place the SWJ pins in a low current state. While the SWJ is
disabled, the InSight Port/debugger will not be functional until either the command "swjdisable 0" is issued or
the chip resets.
EM35x Development Kit User Guide
120-4030-000E
8-4
8.4
Example of Opening, Building, and Programming a Sample
Application
Follow these steps to open, build, and program the sink example application from the standard Ember installer
directory.
8.5
1.
Open the sink.eww file (sink workspace) in IAR Embedded Workbench for ARM (IAR). This can be done
by either double clicking the file C:\Program
Files\Ember\EmberZNet4.0.0\em35x\app\sensor\ewb\sink.eww or from inside of IAR using File > Open >
Workspace and navigating to the sink.eww file.
2.
Select Project > Make (F7) from inside of IAR.
3.
After making the project, the s37 file used for programming is found at C:\Program
Files\Ember\EmberZNet4.0.0\em35x\build\sink-cortexm3-iar-em357-em350-dev0680\sink.s37
4.
To program this file to the node, connect your ISA3 to the chip and your computer (this example
assumes the ISA3 is connected via USB. See the next section for how to program if the ISA3 is
connected via Ethernet.)
5.
Open a command line of your choice (such as DOS or cygwin).
6.
Navigate to the directory C:\Program Files\Ember\EmberZNet4.0.0\em35x.
7.
Invoke the command "em3xx_load.exe" without any build options. This will ensure that
em3xx_load.exe can be found in your path and will cause em3xx_load.exe to print its on-line help
menu.
8.
To download the s37 file to the EM357 chip, from the tool directory invoke the command
"em3xx_load.exe ../build/sink-cortexm3-iar-em357-em350-dev0680/sink.s37".
9.
Download will complete when em3xx_load prints the string "Run (by toggling nRESET)".
Programming your Application on the EM357
Programming EM357 flash is accomplished with the em3xx_load.exe utility. The em3xx_load utility is included as
part of the ISA3 Utilities Installer, in the “bin” subdirectory. Note that em3xx_load is not directly compatible
with the options used by em2xx_load for the EM250 platform.
A complete summary of em3xx_load functionality with brief descriptions of each option can be found in
em3xx_load's own help menu. Invoking "em3xx_load.exe" without options or invoking "em3xx_load.exe --help"
will print this help menu.
The most common usage of em3xx_load is to simply program flash. em3xx_load takes the S37 specific version of
Motorola S-record file formats; which are files with the .s37 extension. If you are using a bootloader,
em3xx_load can also load an .ebl file.
Given an S37 file called "file.s37", the most basic command for programming flash is simply:
em3xx_load.exe file.s37
Em3xx_load will then print out the versions it is using, the devices it is connected to, the steps it is performing,
and programming progress. By default, the last step em3xx_load performs is to run the chip by toggling the
nRESET pin.
By default, em3xx_load.exe assumes the InSight Adapter is connected via USB when no other options are given.
If the ISA3 is connected via Ethernet, use the --ip option to specify the ip address or hostname of the ISA3 to be
used. Given an ISA3 with an IP address of 123.123.123.123, programming can be accomplished with the
command:
em3XX_load.exe --ip 123.123.123.123 file.s37
EM35x Development Kit User Guide
120-4030-000E
8-5
8.6
Programming Manufacturing Tokens
The em3xx_load utility has the ability to program manufacturing tokens much like the em2xx_patch tool did. In
the case of the EM357, these tokens are contained in the Customer Information Block(CIB). For more
information on using the em3xx_load utility, refer to document 120-4032-000, EM3xx Utilities Guide.
8.6.1 Programming Certificates & Installation Codes
Certificates and installation codes can be programmed using the same em3xx_load tool that is used to program
other tokens. There is a separate application note which describes the process in detail. For more information,
see document 120-5058-000, Setting Manufacturing Certificates and Installation Codes.
8.7
Using the Debugger in IAR Embedded Workbench with an Ember
InSight Adapter
1.
Start IAR Embedded Workbench. Open the workspace (*.eww).
2.
Select Project > Options. Select the Debugger > J-Link/J-Trace category. Select the Connection tab.
3.
Select TCP/IP Communication and enter the IP address of the ISA3. Click OK.
4.
Embedded Workbench is not able to program the flash on the EM357. Every time the project is rebuilt, you must manually load it onto the EM357 (using em3xx_load.exe) before starting a debug
session.
5.
Once the correct image has been loaded onto the EM357, select Project > Debug without Downloading
to start the debug session.
EM35x Development Kit User Guide
120-4030-000E