UG110 EMBER(R) EM35 X DEVELOPMENT KIT USER GUIDE This document describes the Ember EM35x Development Kit and explains how to set up its hardware and use the Debug Adapter (ISA3). This revision also includes instructions to get started developing applications using the EmberZNet PRO stack and for debugging applications using Nodetest. For information about developing applications with other stacks and protocols, see QSG105, Getting Started with Silicon Labs Wireless Network Software, and the help and documentation included with your development environment. For software installation instructions, see the stack's release notes. New in This Revision Content reorganized. Updated to reflect kit updates and terminology changes. Contents 1 2 3 4 5 About This Guide ............................................................................................................................................ 4 1.1 Purpose ................................................................................................................................................... 4 1.2 Audience.................................................................................................................................................. 4 1.3 Documentation Conventions..................................................................................................................... 4 Introducing the EM35x Development Kit .......................................................................................................... 4 2.1 Overview.................................................................................................................................................. 4 2.2 Support .................................................................................................................................................... 5 2.3 Documentation ......................................................................................................................................... 5 2.4 Hardware Requirements .......................................................................................................................... 5 2.5 Before You Begin ..................................................................................................................................... 5 Development Kit Hardware Components ......................................................................................................... 6 3.1 Overview.................................................................................................................................................. 6 3.2 EM35x Breakout Board ............................................................................................................................ 7 3.3 EM35x Module ......................................................................................................................................... 8 3.4 Debug Adapter (ISA3) .............................................................................................................................. 9 3.5 Other Kit Components .............................................................................................................................. 9 Acceptable Power Sources for Normal Operation ............................................................................................ 9 4.1 Power-Over-Ethernet (PoE) Switch .........................................................................................................10 4.2 USB Power Supply with Adapters............................................................................................................11 Setting up Hardware Components ..................................................................................................................13 5.1 Overview.................................................................................................................................................13 5.2 EM35x Radio Communications Module (RCM) ........................................................................................13 Rev 1.0 Copyright (c) 2015 by Silicon Laboratories UG110 UG110 6 7 8 5.3 Connecting the Breakout Board and RCM ...............................................................................................14 5.4 Breakout Board Power Configurations .....................................................................................................15 5.5 Breakout Board Serial Configurations ......................................................................................................18 5.6 Common Hardware Configurations..........................................................................................................19 5.7 Connecting the RF Cable to the RCM......................................................................................................23 Using the Debug Adapter (ISA3) ....................................................................................................................24 6.1 Overview.................................................................................................................................................24 6.2 Connectivity and Power ...........................................................................................................................24 6.3 Ethernet Settings ....................................................................................................................................24 6.4 Using the Admin Interface over USB .......................................................................................................25 6.5 Using the Admin Interface over Ethernet .................................................................................................25 6.6 Using the Serial Ports..............................................................................................................................25 6.7 Updating the Firmware ............................................................................................................................26 Debug Adapter (ISA3) Commands .................................................................................................................26 7.1 Syntax Conventions ................................................................................................................................26 7.2 Entering Commands ...............................................................................................................................26 7.3 Command List .........................................................................................................................................27 7.3.1 button...............................................................................................................................................27 7.3.2 debug...............................................................................................................................................27 7.3.3 config ...............................................................................................................................................28 7.3.4 connections......................................................................................................................................28 7.3.5 help..................................................................................................................................................28 7.3.6 hostname .........................................................................................................................................28 7.3.7 ip......................................................................................................................................................28 7.3.8 port ..................................................................................................................................................29 7.3.9 power ...............................................................................................................................................29 7.3.10 reset ................................................................................................................................................29 7.3.11 usbaddr ............................................................................................................................................29 7.3.12 version .............................................................................................................................................30 Software Tools Overview................................................................................................................................31 8.1 Using the EM35x Nodetest Application ....................................................................................................31 8.2 Running a Packet Error Test ...................................................................................................................31 8.3 Testing Deep Sleep Current ....................................................................................................................32 8.4 Example of Opening, Building, and Programming an Application Builder Scenario Application for EmberZNet PRO ...............................................................................................................................................34 8.5 2 Programming your Application on the EM35x ..........................................................................................35 Rev. 1.0 UG110 8.6 Programming Manufacturing Tokens .......................................................................................................35 8.7 Using the Debugger in IAR Embedded Workbench with an Ember Debug Adapter (ISA3) .......................35 Rev. 1.0 3 UG110 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 Debug Adapter (ISA3). 1.2 Audience This document is intended for embedded software and hardware engineers who are responsible for developing wireless applications with the Ember EM35x 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, variables. void Main(String[] argv) the buffer variable Courier Italics Identifies a variable name. ipAddress Bold-underline Identifies a link to a different section of the document Documentation 2 Introducing the EM35x Development Kit 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 hardware prototype, links to Silicon Labs stack software such as EmberZNet or Silicon Labs Thread, and various tools that enable the development of your application software. In general, Silicon Labs' stacks provide a common API (Application Programming Interface) that supports the following layers of the OSI model (Open System Interconnection Reference Model). * * * * * PHY: radio control MAC: medium access LINK: route discovery NETWORK: routing, association APPLICATION: Application profile support for reliable message delivery For example, the EmberZNet stack is used to build ZigBee PRO-based applications. Applications that are built on this stack benefit from the following features: * * * 4 PHY and MAC layers comply with the IEEE 802.15.4-2003 standard LINK and NETWORK layers comply with the latest ZigBee PRO specification The APS layer provides the interface to the application for data transfer and management, including reliable transport and binding. Rev. 1.0 UG110 The Development Kit includes a development environment, such as Ember Desktop, which facilitates application development and debugging. A compiler, such as IAR-EWARM, is also one of the kit's software components. Debug 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 more information, see document TS6, the EM35x Breakout Board Technical Specification. 2.2 Support Once you receive your development kit, register to download development software on Silicon Labs' technical support portal, https://www.silabs.com/support/Pages/default.aspx. Use the support portal to contact Customer Support for any questions you might have during the development process. 2.3 Documentation QSG101, EM35x Development Kit Quick Start Guide, is shipped with the EM35x Development Kit. The stack installer provides a documentation index (in documentation/index.htm and also linked from a Start Menu entry) that contains links to documentation locations and brief descriptions of each document's purpose. Documents are also available through the support portal as Adobe PDF files. 2.4 Hardware Requirements To use the EM35x Development Kit you will need: * * 2.5 PC with Ethernet connectivity Network hub with DHCP server Before You Begin The EM35x Development Kit is designed only for the operating conditions and interfaces specified in documents TS7, the Debug Adapter (ISA3) Technical Specification, TS6, the EM35x Breakout Board Technical Specification, and TS8, the EM3x Module 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 Silicon Labs Customer Support or 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. Rev. 1.0 5 UG110 3 Development Kit Hardware Components 3.1 Overview Figure 1 shows the components in the EM35x Series Development Kit. Figure 1. EM35x Series Development Kit The inventory of development kit components is included in the development kit's Quick Start Guide (UG101). This section describes the use for each of the major components. The EM35x Development Kit development board set has three major hardware components: * * * EM35x Breakout Board EM35x Module Debug Adapter (ISA3) The EM35x Development Kit also includes the following components: * * * * 6 US-to-Multinational AC Plug Power Adapter Kit Power-Over-Ethernet (PoE) Switch USB Power Adapters Miscellaneous Cables (USB, DEI, Packet Trace Port, and RF Coax) Rev. 1.0 UG110 3.2 EM35x Breakout Board Figure 2. EM35x Breakout Board The Breakout Board (Figure 2) serves 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 a Debug Adapter (ISA3) through two communication links: the Packet Trace Port and the DEI Port. This allows the Breakout Board's EM35x Module to interface with the development environment through the Debug Adapter (ISA3)'s Packet Trace Port and its wired Ethernet connection. The Breakout Board also has a prototype breadboard area for application-specific hardware development. The Breakout Board has the following components: * * * * * * * * External power supply connectors One DB-9 serial port connector for RS-232 serial communication One USB connector for EM35x SC1 virtual COM port serial communication One USB connector for EM358x USB virtual COM port serial communication One header with TTL-compliant UART signals for EM35x SC1 SPI serial communication A buzzer, two buttons, two LEDs, and a temperature sensor for application development purposes External serial flash for application bootloader purposes (via either EM35x SC1 or SC2) Hardware reset buttons for the EM35x module Rev. 1.0 7 UG110 * * Prototype or bread-boarding area (28 x 20, 0.1" pitch array) for application-specific hardware development One data emulation interface connector For detailed information about the Breakout Board, see document TS6, the EM35x Breakout Board Technical Specification. 3.3 EM35x Module The EM35x Module (Figure 3) contains 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. The kit includes both EM357 and EM3588 module variants. The EM35x module 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. EM35x Module Figure 3. EM35x Breakout Board with EM35x Module Installed The EM35x Module includes these components: * * * * 8 The Ember EM35x SoC (IEEE 802.15.4-compliant, 2.4 GHz radio transceiver with ARM(R) Cortex-M3 microcontroller). All off-chip components required for optimum SoC performance Two LEDs Packet Trace Port connector Rev. 1.0 UG110 For detailed information about the modules, see document TS8, the EM3x Module Technical Specification. Once you move away from the EM35x Module and toward application-specific hardware, refer to the extensive reference design library available through the Silicon Labs support portal. 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 Customer Support. 3.4 Debug Adapter (ISA3) A Debug Adapter (ISA3) connects a Breakout Board to the Ethernet. Each adapter transmits network data collected through its Packet Trace Port and conveys it over its Ethernet connection to the development environment. It also picks up any messages or new software that is addressed to this Breakout Board. The ISA3 functions as a source-level debugger for EM3x devices, providing single-stepping and breakpoint support via IAR EWARM. The Debug Adapter (ISA3) provides an efficient and configurable debug interface to the EM35x Development Kit Breakout Board for processing emulation and debug commands. It also provides an interface to the development environment for monitoring and managing network data. The Debug Adapter (ISA3) has the following components: * * * * Debug Port interface to the Breakout Board's Extended Debug Interface Connector Packet Trace 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 The Packet Trace Port is a cabled communication link between the Debug Adapter (ISA3) and the EM35x Module mounted on the Breakout Board. 3.5 Other Kit Components * * * * * Packet Trace Port Cables connect each Debug Adapter (ISA3) to a Breakout Board. AAA Battery Pack attaches to a Breakout Board and enables deployment of battery-operated nodes. USB Power Supply with Adapters power Breakout Boards and / or Debug Adapters (ISA3s) from wall sockets. Ethernet Cables connect Debug Adapters (ISA3s) to an Ethernet subnet and the PoE Switch to your PC or network. Data Emulation Interface (DEI) cables provide a peripheral interface connection between the Debug Adapter (ISA3) and Breakout Board. The DEI cable supports UART functionality. 4 Acceptable Power Sources for Normal Operation Table 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 (3 VDC) USB cable * * Connected to PC Connected to USB Power Supply with Adapters Rev. 1.0 9 UG110 * * * Power over Packet Trace Port on Debug Adapter (ISA3) (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) Table 1. Safe Combination of Operating Power Debug Adapter (ISA3) PoE External DC AAA Battery Pack Packet Trace Port USB Breakout Board X N/A N/A N/A X N/A N/A X X N/A EM35x Module N/A N/A N/A X1 EM35x Breakout Board N/A X2 X X3 4.1 Power-Over-Ethernet (PoE) Switch The EM35x Development Kit contains a NETGEAR 8-port Power-over-Ethernet (PoE) switch that supplies power to a Debug Adapter (ISA3) over a standard TIA/EIA-568 category 5 cable. The Debug Adapter (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 Development Kit is certified by Silicon Labs. If you wish to use a different PoE switch, consult Customer Support. 1 Power is sourced from the Debug Adapter (ISA3) to the RCM module using the Packet Trace Port cable connected to the Debug Adapter (ISA3) with its target power select switch set to Int (Internal). 2 External dc power between 4 V and 20 V can be connected to clip leads J1 (+) and J32 (-) on the EM35xx Breakout Board. 3 Power is sourced from the Debug Adapter (ISA3) to the EM35x Breakout Board using the Packet Trace Port cable connected to the Debug Adapter (ISA3) with its target power select switch set to Int (Internal). 10 Rev. 1.0 UG110 The US-to-Multinational AC Plug Power Adapter Kit (Figure 4) is a set of three power adapters for use with the NETGEAR PoE Switch. These three interchangeable plugs are provided with various port configurations suitable for North America, Europe, the United Kingdom, and Australia. Figure 4. US-to-Multinational AC Plug Power Adapter Kit 4.2 USB Power Supply with Adapters The USB power adapter (Figure 5) is a linear regulated wall plug power supply with 5 V DC at 1 A regulated output. It has a USB type-B connector for connecting power via a USB cable to the USB port of the Debug Adapter (ISA3) Rev. 1.0 11 UG110 or Breakout Board. Four interchangeable snap-in input plugs are provided with various port configurations suitable for North America, Europe, the United Kingdom, and Australia. Figure 5. USB Power Supply with Interchangeable AC Adapters 12 Rev. 1.0 UG110 5 Setting up Hardware Components 5.1 Overview This chapter contains the following sections: * * * * * * * 5.2 EM35x 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 EM35x Radio Communications Module (RCM) The EM35x Development Kit contains various types of EM35x RCMs designed by Silicon Labs' partner, California Eastern Laboratories (CEL). These modules contain either the EM357 or EM3588 IC and are configured to use either the PCB 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 6. This label can be found on the bottom of the module. 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 the QSG101, EM35x Development Kit Quick Start Guide. You can determine the EUI64 of each module based on this list. Figure 6. Module Product Serial Number Label Rev. 1.0 13 UG110 The modules shipped already installed on Breakout Boards are module variant EM3588-M-AN-C. Other module variants are contained in the Module Variety Pack. Refer to Table 2 for configuration comparisons of the modules included in your development kit. Table 2. Module Product Variant Matrix Silicon Labs Part Number CEL Part Number Silicon Labs Product Number IC Antenna or Connector EM357-MOD-ANT-C ZICM357SP0-1-SL 0730 EM357 Antenna Non-PA 1 EM357-MOD-RF-C ZICM357SP0-1C-SL 0731 EM357 Connector Non-PA 1 EM357-MOD-LR-RF-C ZICM357SP2-1C-SL 0732 EM357 Connector PA 1 EM357-MOD-LR-ANT-C ZICM357SP2-1-SL 0733 EM357 Antenna PA 1 EM3588-M-AN-C ZICM3588SP0-1-SL 0734 EM3588 Antenna Non-PA 3 EM3588-M-RF-C ZICM3588SP0-1C-SL 0735 EM3588 Connector Non-PA 1 EM3588-MLR-RF-C ZICM3588SP2-1C-SL 0736 EM3588 Connector PA 1 EM3588-MLR-AN-C ZICM3588SP2-1-SL 0737 EM3588 Antenna PA 0 5.3 PA or non-PA Qty Included in Kit Connecting the Breakout Board and RCM Refer to document QSG101, EM35x Development Kit Quick Start Guide, included in the 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) Debug Adapter (ISA3) 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. To avoid communication problems, verify that each RCM is firmly seated in its Breakout Board connector, and its Packet Trace Port cable is properly seated. To remove the radio communication module: Carefully pull the RCM away from the Breakout Board. To attach the Debug Adapter (ISA3): 1. Plug the Packet Trace Port cable into the Debug Adapter (ISA3). 2. Plug one end of the Packet Trace Port cable into the 10-pin Packet Trace Port (J31) on the Breakout Board, and the other end into the Debug Adapter (ISA3). If desired, the Packet Trace 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 Debug Adapter (ISA3)'s Target Power Select switch is set to Int (Internal). To remove the Debug Adapter (ISA3): 1. Unplug the Packet Trace Port cable from the Breakout Board (or RCM). 2. Unplug the Packet Trace Port cable from the Debug Adapter (ISA3). 14 Rev. 1.0 UG110 5.4 Breakout Board Power Configurations The Breakout Board may be powered in one of five ways: * Breakout Board Power Supplied by Debug Adapter (ISA3) (Figure 7): The default configuration is to supply power via the Debug Adapter (ISA3) and Packet Trace Port cable. Ensure the power switch on the Debug Adapter (ISA3) is in the INT (Internal) position. The power supply of the Debug Adapter (ISA3) is also controlled via the admin interface. You may need to connect to the admin port of the Debug Adapter (ISA3) and issue the "power on" command. No external power supply should be connected to the Breakout Board when supplying power from the Debug Adapter (ISA3). 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 (DS3) will illuminate when power is applied. Figure 7. Breakout Board Power Supplied by Debug Adapter (ISA3) * Breakout Board Power Supplied by USB (Figure 8): The Breakout Board may also be powered through the USB connector (J5), 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_FTDI LED (DS2) will Rev. 1.0 15 UG110 illuminate when power is applied. When powering the Breakout Board in this way, ensure the power switch on the Debug Adapter (ISA3) is in the EXT (External) position. Figure 8. Breakout Board Power Supplied by USB (J5) * Breakout Board Power Supplied by DC Jumpers (Figure 9): The Breakout Board may also be powered by an external power source that provides 4-20 V 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 (DS1) will illuminate when power is applied. When powering the Breakout Board in this way, ensure the power switch on the Debug Adapter (ISA3) is in the EXT (External) position. Figure 9. Breakout Board Power Supplied by DC Jumpers 16 Rev. 1.0 UG110 * Breakout Board Power Supplied by Battery Connector (Figure 10): The Breakout Board may also be powered via the battery connector (J8), using the supplied battery pack 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 (DS5) will illuminate when power is applied. When powering the Breakout Board in this way, ensure the power switch on the Debug Adapter (ISA3) is in the EXT (External) position. Figure 10. Breakout Board Power Supplied by Battery Connector * Figure 11. Breakout Board Power Supplied by EM3588 USB (J39) (Figure 11): Finally, the Breakout Board may also be powered through the EM3588 USB connector (J39), 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 Rev. 1.0 17 UG110 pin. The V_EM358 LED (DS8) will illuminate when power is applied. When powering the Breakout Board in this way, ensure the power switch on the Debug Adapter (ISA3) is in the EXT (External) position. Figure 11. Breakout Board Power Supplied by EM3588 USB (J39) The V_MOD LED (DS4) on the Breakout Board will also illuminate to indicate that power is properly applied to the board and the RCM. 5.5 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. * To use the pass-through UART feature of the Debug Adapter (ISA3): Plug the larger 12-pin DEI cable into the DEI header on the Breakout Board and the connector on the Debug Adapter (ISA3). 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. Connect to the Debug Adapter (ISA3) using the development environment. Launch the console. Choose the Serial 1 tab. b. Run a terminal application (for example, Microsoft Telnet Client, HyperTerminal, PuTTY). Connect to port 4901 on the Debug Adapter (ISA3). * 18 To use the RS-232 interface: Connect a serial cable to the DB-9 connector on the Breakout Board. Ensure the four jumpers above the DB-9 connector are positioned towards the DB-9 connector to send the Rev. 1.0 UG110 * * 5.6 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. To use the USB interface: Install the FTDI USB drivers as described in the stack release notes, and connect a USB cable to J5 of the Breakout Board and to your PC. Ensure the four jumpers above the DB9 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. To use the EM358x USB interface: Install the Silicon Labs USB drivers as described in the stack release notes, and connect a USB cable to J39 of the Breakout Board and to your PC. Ensure the USB_EN jumper J40 to the left of the J39 USB connector is positioned on the top 2 pins (USB position). Common Hardware Configurations Common configurations of the Breakout Board and Debug Adapter (ISA3) can be seen in Figure 12, Figure 13, Figure 14, Figure 15, and Figure 16. Figure 12. Debug Adapter (ISA3) Supplying Power; Pass-through UART Being Used for Serial Communication Rev. 1.0 19 UG110 Figure 13. Debug Adapter (ISA3) Supplying Power; RS-232 Serial Communication Figure 14. Power Supplied Via USB Connector; Pass-through UART Being Used for Communication 20 Rev. 1.0 UG110 Figure 15. Debug Adapter (ISA3) Supplying Power; FTDI Serial <-> USB Converter Used for Communication Rev. 1.0 21 UG110 Figure 16. Debug Adapter (ISA3) Supplying Power; EM358x USB Used for Communication 22 Rev. 1.0 UG110 5.7 Connecting the RF Cable to the RCM As detailed in Table 2, depending on the configuration of the module, some RCMs include a PCB antenna while others include an RF connector (type U.FL) where an external antenna can be connected via an RF adapter cable. See Figure 17 for an example of a module with a PCB 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 18 for an example of a module with this RF connector. Figure 17. Module with PCB Antenna RF Connector Figure 18. Module with U.FL RF Connector Rev. 1.0 23 UG110 6 Using the Debug Adapter (ISA3) 6.1 Overview The Debug Adapter (ISA3) provides an Ethernet connection to EM35x devices. You can use the Debug Adapter (ISA3) to perform the following tasks: * * * * * * 6.2 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. Connectivity and Power All the features of the Debug Adapter (ISA3) are available via the Ethernet connection. The Debug Adapter (ISA3) can also be connected to a PC via USB to change the Ethernet settings. When connected via USB, the Debug Adapter (ISA3) 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 Debug Adapter (ISA3) may be powered in one of two ways: 1. Using an Ethernet switch that supplies Power Over Ethernet (PoE). 2. Using a USB power supply. The Debug Adapter (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 3 using either the Silicon Labs development environment or a terminal application (for example, Microsoft Telnet Client, HyperTerminal, or PuTTY). Table 3. Debug Adapter (ISA3) Ports Port Use 4900 Virtual serial port on EM35x via Packet Trace Port cable. 4901 Physical serial port on EM35x via Data Emulation Interface cable. 4902 or 23 Admin interface. 6.3 Ethernet Settings By default, Debug Adapters (ISA3)s are configured to get an IP address via DHCP. They are assigned hostnames of EM-ISA3-00, EM-ISA3-01, etc. You can use the development environment to discover the Debug Adapters (ISA3) on the network and see their IP addresses. If you are unable to use DHCP, the ISA3 Ethernet configuration may be changed using the admin interface over USB as described in section 6.4, 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 24 Rev. 1.0 UG110 >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 must reset the ISA3 after this configuration change either by power cycling the device or with the reset command. You can change the hostname to make it more descriptive or to avoid conflicts if Debug Adapters (ISA3)s from multiple development kits are connected to the same network. To change the hostname, use the admin command hostname set . 6.4 Using the Admin Interface over USB 1. Connect the Debug Adapter (ISA3) to the PC using USB. Only connect one Debug Adapter (ISA3) at a time by USB. 2. Run em3xx_isa.exe with the --admin option. 3. Configure the Debug Adapter (ISA3) using the commands described in Section 7, Debug Adapter (ISA3) Commands. 6.5 Using the Admin Interface over Ethernet 1. Connect the Debug Adapter (ISA3) to the network using Ethernet. 2. Connect to the admin port on the Debug Adapter (ISA3) using either Ember Desktop or a terminal application: * Connect to the Debug Adapter (ISA3) using Ember Desktop. Launch the console. Choose the Admin tab OR * Run a terminal application (e.g., Microsoft Telnet Client, HyperTerminal, PuTTY). Connect to port 4902 or 23 on the Debug Adapter (ISA3). 3. Configure the Debug Adapter (ISA3) using the commands described in Section 7, Debug Adapter (ISA3) Commands. 6.6 Using the Serial Ports Connect to port 4900 or 4901 on the Debug Adapter (ISA3) using either Ember Desktop or a terminal application. Port 4900 connects to the virtual serial port on the EM35x via the Packet Trace 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. Rev. 1.0 25 UG110 6.7 Updating the Firmware Periodically, Silicon Labs provides updated firmware for the Debug Adapter (ISA3). 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. To update a Debug Adapter (ISA3) 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 a Debug Adapter (ISA3) 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 7 Debug Adapter (ISA3) 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 * * * * 26 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. Rev. 1.0 UG110 7.3 Command List * * * * * * * * * * * * button config connections debug help hostname ip port power 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. Example button 1 press 7.3.2 debug debug [on|off|disable] Description Turns BackChannel Debug on (the default), off (for sleepy devices), or disable (for read-protected devices). With no arguments specified, it prints the current debug status. Examples debug debug off debug disable Rev. 1.0 27 UG110 7.3.3 config config Description Displays the configuration of the Debug 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 Ember Desktop. 7.3.4 connections connections Description Displays active and inactive TCP connections across the various Ethernet ports of the ISA3. 7.3.5 help help Description Displays a list of all Debug Adapter (ISA3) commands. 7.3.6 hostname hostname set hostname hostname read Description Sets or displays the hostname of the Debug Adapter (ISA3). The Debug Adapter (ISA3) must be reset for a change to take effect. You can also view the hostname using Ember Desktop. Example hostname set mydevice3 7.3.7 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 Debug Adapter (ISA3) must be reset for a change to take effect. 28 Rev. 1.0 UG110 Examples ip static 192.168.1.100 255.255.255.0 192.168.1.1 ip dhcp off 7.3.8 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.9 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 Ember Desktop. Example power on 7.3.10 reset reset reset adapter reset host [hold] Description Resets the attached EM35x device if no arguments are specified Resets the Debug Adapter (ISA3) when "adapter" argument is specified. Resets the host MCU (if using the EM35x NCP Host Breakout Board and DEI cable is connected to ISA3), optionally holding the host MCU in reset state if "hold" is specified. You can also reset the device using Ember Desktop. 7.3.11 usbaddr usbaddr read usbaddr set [0|1|2|3|FF] Description Displays the USB address configuration of a specific Debug Adapter (ISA3). Sets the USB address configuration, range is 0-3 or FF (default). Rev. 1.0 29 UG110 The Debug Adapter (ISA3) must be reset for a change to take effect. See document AN717, Programming Options for the EM35xx Platform, for step by step instructions on setting the address of a Debug Adapter (ISA3). 7.3.12 version version Description Displays the firmware version of the Debug Adapter (ISA3). You can also view the version using Ember Desktop. 30 Rev. 1.0 UG110 8 Software Tools Overview 8.1 Using the EM35x Nodetest Application The Nodetest application supports a command parser and provides results in a 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 images are also located in the {stack installation directory}\app\nodetest folder, and S37 files used to create these HEX files can be found in the chip-specific build\nodetest-XXX directories. You may communicate with the serial interface of the Nodetest application using the methods described in Section 6, Using the Debug Adapter (ISA3). A command line interface is supported on both the Virtual UART ("Serial 0" tab in the Ember Desktop Console view) and the Physical UART ("Serial 1" tab in the Ember Desktop Console view). If using the Physical UART, ensure that the serial port is configured for 115200 baud, 8 data bits, No parity, and 1 stop bit. By default the Debug Adapter (ISA3) is configured in this way, but it can be adjusted in this manner: * * Connect to the admin interface of the Debug Adapter (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 without a "0x" prefix. 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 each other across two nodes running this application or with the "receive" and "transmit" commands from the legacy Rangetest application used in earlier releases of the EM250 and EM260 platforms. PER measurement procedure: 1. Load the Nodetest application on two EM35x 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.) Rev. 1.0 31 UG110 5. Observe the PER result in the third column of the "rx" command output, for example 4: > rx {{(rx)} test start ('e'nd)} #{{(rx)} {num} {seq} {per} {lqi} { { 1} { 1} { 0} {0x00} { { 2} { 2} { 0} {0x00} { { 3} { 3} { 0} {0x00} { { 4} { 4} { 0} {0x00} { { 5} { 5} { 0} {0x00} { { 6} { 6} { 0} {0x00} { { 7} { 7} { 0} {0x00} { { 8} { 8} { 0} {0x00} { { 9} { 9} { 0} {0x00} { { 10} { 10} { 0} {0x00} {{(rx)} test end} {rssi}{gain} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {-22} {0x31} {status} {0x4000} {0x4000} {0x4000} {0x4000} {0x4000} {0x4000} {0x4000} {0x4000} {0x4000} {0x4000} {time} {0x000F3716} {0x000F9FE6} {0x000008B6} {0x00007186} {0x0000DA57} {0x00014327} {0x0001ABF6} {0x000214C6} {0x00027D96} {0x0002E666} {length}} {0x12} } {0x12} } {0x12} } {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. 8.3 Testing Deep Sleep Current * * * * * * * * 4 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 Debug Adapter (ISA3). The buffer logic on the Debug Adapter (ISA3) consumes extra current which will not allow for accurate measurements. If a Debug Adapter (ISA3) is connected to the Breakout Board, then the Debug Adapter (ISA3)'s Target Power Select Switch should be switched to EXT (External) so that the Debug Adapter (ISA3) is not supplying power. Supply power through the USB jack (J5), the dc jack, or the AAA Battery Pack. (The USB jack (J5) 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-J38 to isolate the DataFlash IC from the rest of the circuit. If using EM35x Breakout Board revision C0 and later, confirm the USB enable (USB_EN) jumper at J40 is configured for SC2 (shorting jumper across bottom 2 pins) and not USB. This example may show different length packets than you see. 32 Rev. 1.0 UG110 These jumper settings can be seen in Figure 19. Figure 19. 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 Packet Trace Port cable, the DEI cable, the RS-232 cable, and remove all four UART jumpers (J22, J24, J25, and J26) from the Breakout Board between the USB and RS-232 connectors to obtain the lowest current settings. All other jumpers may remain installed. Rev. 1.0 33 UG110 * Waking up is accomplished via either activity on the SerialWire debugger or pressing BUTTON0 or BUTTON1. To measure deep sleep while the Packet Trace 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 Packet Trace Port/debugger will not be functional until either the command "swjdisable 0" is issued or the chip resets. 8.4 Example of Opening, Building, and Programming an Application Builder Scenario Application for EmberZNet PRO Follow these steps to create, open, build, and program the HA Light scenario application as included with EmberZNet. If you are working with other protocols, see QSG105, Getting Started with Silicon Labs Wireless Networking Software, for similar instructions. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 34 Open Ember Desktop. From the menus, choose File > New > Application Framework Configuration. Choose "ZCL Application Framework V2", and click Next. Choose the stack installation upon which you'd like to base your application, such as "EmberZNet 5.3 GA EM35X", and click Next. Choose "Start from a selected sample application:", and click on "HaSampleLight". Then click Next. Enter a name for your application, such as "MyLight", and click Finish. Optional: Make any desired changes to your application configuration Click the Generate button in the top right corner of the AppBuilder user interface. If prompted to overwrite the callbacks.c file, make sure to leave this option unselected (don't overwrite). After the generation results are displayed, click OK. Note the location of the EWW file, such as C:\Users\{username}\Ember\EmberZNet5.3.0\EM35x\app\builder\MyLight\MyLight.eww Open the EWW file for your application, such as MyLight.eww, in IAR Embedded Workbench for ARM (EWARM). This can be done by either double clicking the MyLight.eww file (located in the "app\builder\{appName}" subdirectory within your EmberZNet installation) or from inside of EWARM using File > Open > Workspace and navigating to the MyLight.eww file. Select Project > Make (F7) from inside of EWARM. After making the project, the firmware file used for programming is found at "{EmberZNet_Install_Dir}\build\MyLight\MyLight.ebl" (an application image in Ember bootloader file format) To program this file to the node, connect your Debug Adapter (ISA3) to the chip and your computer (this example assumes the Debug Adapter (ISA3) is connected via USB. See the next section for how to program if the Debug Adapter (ISA3) is connected via Ethernet. Open a command line of your choice (such as DOS or cygwin). Navigate to the directory where the MyLight.ebl file was built. 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. To download the EBL file to the EM357 chip, invoke the command "em3xx_load.exe MyLight.ebl". (Note that this application also requires that you load bootloader firmware to the chip. This must be done before the application firmware will run. Bootloader firmware can be found as *.s37 files within the tool/bootloader-em357 or bootloader-em351 directory within your stack installation and is loaded in a manner similar to that of the *.ebl file above. If bootloader firmware is not already present on the chip when the application is loaded, em3xx_load will display a warning about a "bootloading and application mismatch".) Download will complete when em3xx_load prints the string "Run (by toggling nRESET)". Rev. 1.0 UG110 8.5 Programming your Application on the EM35x Programming EM35x flash is accomplished with the em3xx_load.exe utility, either via the Windows Command Prompt or via the Upload Application action in Ember Desktop's Adapters view. The em3xx_load utility is included as part of the Debug Adapter (ISA3) Utilities Installer, in the "bin" subdirectory.. 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. More information about using Ember Desktop to upload application can be found in the online help for Ember Desktop. 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, and these files use the .s37 extension. If you are using a bootloader, em3xx_load can also load a .ebl file, which is a proprietary, binary file format designed for applications that use an Ember Bootloader. 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 Debug Adapter (ISA3) is connected via USB when no other options are given. If the Debug Adapter (ISA3) is connected via Ethernet, use the --ip option to specify the IP address or hostname of the Debug Adapter (ISA3) to be used. Given a Debug Adapter (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 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 UG107, EM35x Utilities Guide. For more information about CIB tokens and how to program them, refer to document AN710, Bringing Up Custom Devices for the EM35x Platform. 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 AN708, Setting Manufacturing Certificates and Installation Codes. 8.7 Using the Debugger in IAR Embedded Workbench with a Debug Adapter (ISA3) 1. 2. 3. 4. Start IAR Embedded Workbench. Open the workspace (*.eww). Select Project > Options. Select the Debugger > J-Link/J-Trace category. Select the Connection tab. Select TCP/IP Communication and enter the IP address of the Debug Adapter (ISA3). Click OK. Embedded Workbench is not able to program the flash on the EM35x. Every time the project is re-built, you must manually load it onto the EM35x (using em3xx_load.exe) before starting a debug session. 5. Once the correct image has been loaded onto the EM35x, select Project > Debug without Downloading to start the debug session. Rev. 1.0 35 UG110 CONTACT INFORMATION 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 For additional information please visit the Silicon Labs Technical Support page: http://www.silabs.com/support/Pages/default.aspx Patent Notice Silicon Labs invests in research and development to help our customers differentiate in the market with innovative low-power, small size, analog-intensive mixed-signal solutions. Silicon Labs' extensive patent portfolio is a testament to our unique approach and world-class engineering team. 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 registered trademarks of Silicon Laboratories Inc. Other products or brandnames mentioned herein are trademarks or registered trademarks of their respective holders. 36 Rev. 1.0 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Silicon Laboratories: EM357-MOD-RF-C EM357-MOD-LR-RF-C EM357-MOD-ANT-C EM357-MOD-LR-ANT-C