USER GUIDE ZigBit Extension User Guide Introduction ® ® This user guide describes how to get started with the Atmel ZigBit extension boards. The ZigBit extension boards is targeted for evaluating the features of the Atmel ZigBits, currently supporting ATmega256RFR2 wireless SoC, the AT86RF212B and AT86RF233 radio transceivers. 42186C-MCU-07/2014 Table of Contents Introduction .................................................................................... 1 1. Getting Started ........................................................................ 3 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. Features .............................................................................. Design Documentation and Related Links .................................. Board Assembly .................................................................... 1.3.1. Connect to a Xplained Pro Board ................................. 1.3.2. Standalone Node ...................................................... 1.3.3. In Customer Development Assembly ............................. Connecting the Kit ................................................................. 1.4.1. Atmel Studio ............................................................ 1.4.2. Connect the Extension UART to the EBDG COM port ....... Programming ........................................................................ 1.5.1. JTAGICE ................................................................. 1.5.2. Bootloader ............................................................... Available Example Code ......................................................... 3 3 3 3 3 4 4 4 4 4 4 5 6 2. Performance Analyzer ............................................................. 7 2.1. 2.2. 2.3. 2.4. Introduction .......................................................................... 7 Program Installation ............................................................... 7 Program Use ...................................................................... 10 Typical Wireless Nodes ........................................................ 10 3. Xplained Pro .......................................................................... 12 3.1. 3.2. Hardware Identification System .............................................. 12 Standard Headers and Connectors ......................................... 12 3.2.1. Xplained Pro Standard Extension Header ..................... 12 4. Hardware User Guide ........................................................... 14 4.1. 4.2. 4.3. 4.4. Board Overview .................................................................. Headers and Connectors ...................................................... 4.2.1. J100 Xplained Pro Extension Connector ...................... 4.2.2. J1 and J3 .............................................................. 4.2.3. JTAG (J2) .............................................................. 4.2.4. External Power (J4) ................................................. 4.2.5. Current Monitoring (J5) ............................................. Board GUI .......................................................................... 4.3.1. LED's .................................................................... 4.3.2. Button ................................................................... Factory Programmed Data .................................................... 14 14 14 15 16 16 17 17 17 17 18 5. Persistent Memory ................................................................ 19 6. Document Revision History ................................................... 20 ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 2 1. Getting Started 1.1 Features The ZigBit extensions is a range of Extension boards providing a development/prototyping platform for the ZigBits. 1.2 Design Documentation and Related Links The following list contains links to the most relevant documents and software for the extension boards. http://www.atmel.com/tools/ATZB-256RFR2-XPRO.aspx http://www.atmel.com/tools/ATZB-X-212B-XPRO.aspx http://www.atmel.com/tools/ATZB-X-233-XPRO.aspx http://www.atmel.com/tools/ATZB-212B-XPRO.aspx http://www.atmel.com/tools/ATZB-A-233-XPRO.aspx 1.3 Board Assembly The extension board can be used in number of combinations. To provide wireless communication to a Xplained Pro board, to act as a standalone wireless node, to provide wireless communication to your own prototype for SW development and HW verification. 1.3.1 Connect to a Xplained Pro Board The Extension board can be connected to any Xplained Pro main board using the extension header. 1.3.2 Standalone Node The Extension board can be used as a standalone node - use the 2xAAA battery pack available in Atmel store to provide power as shown in Figure 1-1, “Board Powered by External Battery Pack” on page 3. Figure 1-1. Board Powered by External Battery Pack ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 3 1.3.3 In Customer Development Assembly The Extension board can be wired into the customer prototype assembly by using the on-board connectors, all ZigBit signal are available. 1.4 Connecting the Kit How to connect the extension board. 1.4.1 Atmel Studio How to connect the Extension board and the Xplained Pro board assembly to Atmel Studio. 1.4.2 1 1. Download and install Atmel Studio . 2. Launch Atmel Studio. 3. Connect an USB cable to the DEBUG USB port and the kit will be visible in Atmel Studio. Connect the Extension UART to the EBDG COM port This section describes how to connect to the extension board UART by using the EBDG COM port. All Xplained Pro boards have an embedded debugger (EBDG) with a number of features, among them a CDC/ COM port which enables the user to connect to on-board SW and using the boot-loader on the extension boards. 1. Select a Xplained Pro board supported with a "Serial bridge application", currently supported by the SAM4L- XPRO and the ATmega256RFR2-XPRO boards. 2. Download the "Wireless Library hex" extension using Atmel Studio Extension Manager. Atmel Studio: Tools → Extension Manager → Wireless, download and unzip in a directory of your choice. 3. Connect the EDBG USB to the PC and Program the "Serial bridge application" hex file on the XPRO board. Atmel Studio: Tools → Device Programming, select the XPRO-EDBG as Tool and click Apply. Select "Memories" and locate the "Serial bridge application" hex file and click Program. 4. 1.5 The UART on EXT1 should now be connected to the EDBG COM port at 9600baud. Programming How to program the extension. 1.5.1 JTAGICE How to program using the AVR® JTAGICE mkII and JTAGICE3. 1. Connect the JTAGICE USB to the PC. 2. Connect the JTAGICE to the Extension board connector (J2) as shown in Figure 1-2, “Connecting the JTAGICE3” on page 5. 3. Go to Atmel Studio: Tools → Device Programming, and select the JTAGICE connected as Tool and click Apply. 4. Select Device = ATxmega256A3U or ATmega256RFR2. 5. Select "Memories" and locate the source hex or elf file and click Program. 1 http://www.atmel.com/tools/atmelstudio.aspx ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 4 Figure 1-2. Connecting the JTAGICE3 1.5.2 Bootloader This section describes how to use the bootloader to program the ZigBit on the Extension board. 1. Use a Xplained Pro board with a "Serial bridge application" (“Connect the Extension UART to the EBDG COM port” on page 4) to connect the Extension board UART to the Embedded debugger COM port or connect the "Extension board UART" using any other level shifter solution you might have. 2. Start the "Bootloader PC tool" “How to Install the "Bootloader PC tool"” on page 6 3. Set "Connection" to Serial and "Port" to the COM port number. 4. Configure the serial port settings as (clik symbol at the right of Port setting). 5. "Select srec file", the file have to be of SREC format. Atmel Studio output files can be of SREC format. 6. Deselect EEPROM erase if not required. 7. Click "Upload". ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 5 1.5.2.1 8. Press the HW reset button (SW1) on the device if requested. The Bootloader PC tool will be waiting for approximately 30 seconds for the button to be released. If this does not happen, programming will be aborted. 9. Exit the GUI and reset the board - your new application should be up and running. How to Install the "Bootloader PC tool" How to install the Bootloader PC GUI tool. 1.6 1. Run the "Bootloader_PC_Tool_Setup_...exe" provided in the "Atmel AVR2054 Serial Bootloader" extension from the Extension Gallery and complete the installation. 2. The Bootloader PC Tool is now available in the Atmel program folder. Available Example Code SW examples provided in Atmel Studio ASF. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 6 2. Performance Analyzer 2.1 Introduction The Performance Analyzer FW together with the GUI in Atmel Studio Wireless Composer Extension provides a number of basic functional RF tests. A quick start guide and general help is provided in Wireless Composer once started. 2.2 Program Installation How to install necessary SW. 1 1. Install Atmel Studio . 2. Once Studio is installed and started use the Tools - Extension Manager to install the Wireless Composer. Select Wireless and Wireless Composer. 1 http://www.atmel.com/tools/atmelstudio.aspx ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 7 Log in to Atmel Gallery. Click download again and download starts. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 8 Restart Atmel Studio, allow help to make changes and the Performance Analyzer GUI is available in the Tools menu. 3. If not already preprogrammed - program the node with the Performance Analyzer FW available in the "Wireless Performance Analyzer Firmware extension" or from source code provided in ASF. If using an Wireless board with a μC embedded, the Performance Analyzer FW has to be programmed using the Bootloader or JTAGICE. If using a extension board which do not have a μC embedded, the Performance Analyzer FW has to be programmed on the Xplained Pro board using the EBDG from Atmel Studio. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 9 2.3 Program Use How to get started. 2.4 1. Connect the Wireless board assembly, with the Performance Analyzer FW programmed, to the PC USB connector and power on, a COM port should now be available for the kit. 2. Power on any other wireless node assemblies of similar frequency, running the Performance Analyzer FW, and use it as a reference. 3. Start Performance Analyzer GUI, connect to the kit via the COM port and follow the quick start guide. Typical Wireless Nodes Typical board assembly. The Atmel SAM4L Xplained Pro Evaluation Kit with Wireless Extension and remote node consisting of a Wireless extension board and a battery pack. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 10 The Atmel ATmega256RFR2 Xplained Pro Evaluation Kit and remote node consisting of a Wireless extension board and a battery pack. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 11 3. Xplained Pro Xplained Pro is an evaluation platform that provides the full Atmel microcontroller experience. The platform consists of a series of Microcontroller (MCU) boards and extension boards that are integrated with Atmel Studio, have Atmel Software Framework (ASF) drivers and demo code, support data streaming and more. Xplained Pro MCU boards support a wide range of Xplained Pro extension boards that are connected through a set of standardized headers and connectors. Each extension board has an identification (ID) chip to uniquely identify which boards are mounted on a Xplained Pro MCU board. This information is used to present relevant user guides, application notes, datasheets and example code through Atmel Studio. Available Xplained Pro 1 MCU and extension boards can be purchased in the Atmel Web Store . 3.1 Hardware Identification System All Xplained Pro compatible extension boards have an Atmel ATSHA204 CryptoAuthentication™ chip mounted. This chip contains information that identifies the extension with its name and some extra data. When an Xplained Pro extension board is connected to an Xplained Pro MCU board the information is read and sent to Atmel Studio. The Atmel Kits extension, installed with Atmel Studio, will give relevant information, code examples and links to relevant documents. Table 3-1, “Xplained Pro ID Chip Content” on page 12 shows the data fields stored in the ID chip with example content. Table 3-1. Xplained Pro ID Chip Content Data Field Data Type Example Content Manufacturer ASCII string Atmel’\0’ Product Name ASCII string Segment LCD1 Xplained Pro’\0’ Product Revision ASCII string 02’\0’ Product Serial Number ASCII string 1774020200000010’\0’ Minimum Voltage [mV] uint16_t 3000 Maximum Voltage [mV] uint16_t 3600 Maximum Current [mA] uint16_t 30 3.2 Standard Headers and Connectors 3.2.1 Xplained Pro Standard Extension Header All Xplained Pro kits have one or more dual row, 20-pin, 100mil extension headers. Xplained Pro MCU boards have male headers while Xplained Pro extensions have their female counterparts. Note that all pins are not always connected. However, all the connected pins follow the defined pin-out described in Table 3-2, “Xplained Pro Extension Header” on page 12. The extension headers can be used to connect a wide variety of Xplained Pro extensions to Xplained Pro MCU boards and to access the pins of the target MCU on Xplained Pro MCU board directly. Table 3-2. Xplained Pro Extension Header 1 Pin number Name Description 1 ID Communication line to the ID chip on extension board. 2 GND Ground. 3 ADC(+) Analog to digital converter , alternatively positive part of differential ADC. 4 ADC(-) Analog to digital converter , alternatively negative part of differential ADC. 5 GPIO1 General purpose I/O. 6 GPIO2 General purpose I/O. 7 PWM(+) Pulse width modulation , alternatively positive part of differential PWM. 8 PWM(-) Pulse width modulation , alternatively positive part of differential PWM. http://store.atmel.com/CBC.aspx?q=c:100113 ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 12 Pin number Name Description 9 IRQ/GPIO Interrupt request line and/or general purpose I/O. 10 SPI_SS_B/GPIO Slave select for SPI and/or general purpose I/O. 11 TWI_SDA Data line for two-wire interface. Always implemented, bus type. 12 TWI_SCL Clock line for two-wire interface. Always implemented, bus type. 13 USART_RX Receiver line of Universal Synchronous and Asynchronous serial Receiver and Transmitter. 14 USART_TX Transmitter line of Universal Synchronous and Asynchronous serial Receiver and Transmitter. 15 SPI_SS_A Slave select for SPI. Should be unique if possible. 16 SPI_MOSI Master out slave in line of Serial peripheral interface. Always implemented, bus type. 17 SPI_MISO Master in slave out line of Serial peripheral interface. Always implemented, bus type. 18 SPI_SCK Clock for Serial peripheral interface. Always implemented, bus type. 19 GND Ground. 20 VCC Power for extension board. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 13 4. Hardware User Guide 4.1 Board Overview Figure 4-1. Board Overview 4.2 Headers and Connectors The extension board connectors. 4.2.1 J100 Xplained Pro Extension Connector The Xplained Pro extension connectors, used to connect the extension board to the Xplained Pro board. Table 4-1. J100 Xplained Pro Extension Header Pin Name ZigBit 256RFR2 pin pin 1 ID Communication line to the ID chip on extension board. 2 GND Ground. 3 ADC(+) NC NC NC NC 4 ADC(-) 34 NC (R7 NM) NC (R7 NM) 10-DIG2 DIG2. 5 GPIO1 11 49-PE3 2-PA4 NC General purpose IO. 6 GPIO2 39 NC (R6 NM) NC (R6 NM) 17-CLKM CLK_OUT - can be disconnected by not mounting R6. 7 PWM(+) 5 12-RSTN 57-RESET 8-RSTN RESET to Extension board. 8 PWM(-) 38 33-CLKI 41-PE5 CPS U2 FEM_SEL, disable AMP to save power. 9 IRQ/GPIO 40 32-PD7 46-PF0 24-IRQ Interrupt request line to uC on Xplained Pro board. 10 SPI_SS_B/ GPIO 35 50-PE4 (INT4) 38-PE2 11-SLP_TR Wake up interrupt to RF. 11 TWI_SDA 37 26-PD1 36-PE0/ SDA EEPROM Data line for two wire interface. Always implemented, bus type. ® XMEGA pin RF233/ RF212B pin Description ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 14 4.2.2 Pin Name ZigBit 256RFR2 pin pin XMEGA pin RF233/ RF212B pin Description 12 TWI_SCL 36 25-PD0 37-PE1/ SCL EEPROM Clock line for two wire interface. Always implemented, bus type. 13 USART_RX 14 28-PD3TXD1 29-PD3/ TXD0 NC Receiver line of Universal Synchronous and Asynchronous serial Receiver and Transmitter. 14 USART_TX 13 27-PD2RXD1 28NC PD2_RXD0 Transmitter line of Universal Synchronous and Asynchronous serial Receiver and Transmitter. 15 SPI_SS_A 6 36-PB0 30-PD4/ SS 23-SEL Slave select for SPI. Should be unique if possible. 16 SPI_MOSI 7 38-PB2 31-PD5/ MOSI 22-MOSI Master out slave in line of Serial peripheral interface. Always implemented, bus type. 17 SPI_MISO 8 39-PB3 32-PD6/ MISO 20-MISO Master in slave out line of Serial peripheral interface. Always implemented, bus type. 18 SPI_SCK 9 37-PB1 33-PD7/ SCK 19-SCLK Clock for Serial peripheral interface. Always implemented, bus type. 19 GND Ground. 20 VCC Power for extension board. ® J1 and J3 J1 and J3 provide access to all ZigBit pin's not routed to the J100 Xplained Pro interface. Table 4-2. J1 Pin ZigBit pin 256RFR2 pin XMEGA pin RF233 pin RF212B pin J1-1 10 PE2/XCK0/AIN0 PA5 DIG1 DIG1 J1-2 11 PE3/OC3A/AIN1 PA4 FEM_CSD NC J1-3 13 PD2/RXD1/INT2 PD2/RXD0 NC NC J1-4 14 PD3/TXD1/INT3 PD3/TXD0 NC NC J1-5 15 PD5/XCK1 PD1/XCK0 NC NC J1-6 16 PD4/ICP1 PDI_DATA NC NC J1-7 17 PD6/T1 PA6 NC NC J1-8 18 PG2/AMR PA7 NC NC J1-9 19 PB4/OC2A/PCINT4 PB3 NC NC J1-10 20 PB6/OC1B/PCINT6 PB2 NC NC Table 4-3. J3 Pin ZigBit pin 256RFR2 pin XMEGA pin RF233 pin RF212B pin J3-1 25 PF0/ADC0 PA0/ADC0/INT NC NC J3-2 26 PF1/ADC1 PA1/ADC1/INT NC NC J3-3 27 PF2/ADC2/DIG2 PA2/ADC2/INT NC NC J3-4 28 PF3/ADC3/DIG4 PA3/ADC3/INT NC NC J3-5 24 AREF PB0/IAREF/INT NC NC J3-6 23 PE1/TXD0 PF3/OC0D/INT/TXD0 NC NC J3-7 22 PE0/RXD0/PCINT8 PF2/OC0C/INT/RXD0 NC NC ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 15 4.2.3 Pin ZigBit pin 256RFR2 pin XMEGA pin RF233 pin RF212B pin J3-8 21 PB7/OC0A/OC1C/ PCINT7 PF1/OC0B/INT/XCK0 NC NC J3-9 34 PG5/OC0B PE3 DIG2 DIG2 J3-10 39 PE7/ICP3/INT7/CLKO PE4/SYNC/OC1A FEM_SEL CLKM JTAG (J2) J2 is the JTAG programming header typically used by the JTAGICE. 4.2.4 External Power (J4) J4 enable connection of external power supply when not inserted into an Xplained Pro mother board. The connector has reverse voltage protection. Table 4-4. J4 Power J4 pin Function 1 - External power External 3.3V source - typical 2xAAA battery pack 2 - GND Extension board GND ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 16 4.2.5 Current Monitoring (J5) J5 enables current monitoring using an external multimeter. Connect multimeter between J5-1 and J5-2 and measure current used by the ZigBit. Warning When not monitoring current the strap need to be inserted in order to provide power to the ZigBit. Important If the JTAG programmer is attached the current measurement will include any power used by the programmer. Table 4-5. J5 Current Measurement J5 pin Function 1 - ZB_VCC_P3V3 3.3V pin on the ZigBit 2 - VCC_P3V3 3.3V on extension board 4.3 Board GUI 4.3.1 LED's There are three LED's available for use by application SW. Table 4-6. LED's 4.3.2 LED ZigBit pin 256RFR2 pin XMEGA pin AT86RF233/RF212B LED1 - Red 17 31 - PD6 4 - PA6 NC LED2 - Green 18 16 - PG2 5 - PA7 NC LED3 - Yellow 10 48 - PE2 3 - PA5 NC Button There are two buttons - one RESET and one for general use by application SW. Table 4-7. Buttons Button Function ZigBit pin 256RFR2 pin XMEGA pin RF233 pin RF212B pin SW1 ZigBit Reset, press to reset 5 12 - RSTN 56 - RESET 8 - RSTN 8 - RST SW2 User defined high signal, press to negate 22 46 - PE0 48 - PF2 NC NC ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 17 4.4 Factory Programmed Data The ZigBit has a preprogrammed unique MAC address - details available in the ZigBit data sheet and in “Persistent Memory” on page 19. The extension board comes with a Bootloader and the Performance Analyzer preprogrammed. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 18 5. Persistent Memory A persistent memory space is allocated to store product specific information. The organization of the persistent memory is as follows: Table 5-1. Persistent Memory Data Data Type Size Structure Revision uint 16 2 bytes MAC address uint 64 Board information – PCBA Name Board information – PCBA Serial number 8 bytes 1 30 bytes 1 10 bytes 1 ASCII string ASCII string Board information – PCBA Atmel Part Number ASCII string 8 bytes Board information – PCBA Revision uint 8 1 byte Reserved 3 bytes XTAL Calibration Value uint 8 1 byte Reserved 7 bytes Reserved 4 bytes CRC Notes: uint 16 2 bytes 1 '\0' terminated ASCII string. The MAC address stored inside the MCU is a uniquely assigned ID for each kit and is owned by Atmel. User applications can use this unique MAC ID to address the kit. ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 19 6. Document Revision History Document revision Date Comment 42186C 07/2014 Fixed dead links to resources in the "Getting Started" chapter 42186B 06/2014 "J100 Xplained Pro Extension Header" updated 42186A 10/2013 Initial document release ZigBit Extension User Guide [USER GUIDE] 42186C-MCU-07/2014 20 Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 | www.atmel.com © 2014 Atmel Corporation. / Rev.: 42186C-MCU-07/2014 ® ® ® ® ® Atmel , Atmel logo and combinations thereof, Enabling Unlimited Possibilities , ZigBit , XMEGA , AVR , and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. Other terms and product names may be trademarks of others. DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military- grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.