Home

DevelopmentKit ZigBee 2-4 GHz

image

Contents

1. Figure 29 Self extractor Confirm overwriting and or replacing files Note Always install the deRFmacAddon into the same directory as the MAC stack www dresden elektronik de Page 33 of 66 User Manual oe deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Note The Confirm File Replace dialog is a good indicator that you have chosen the right directory Confirm File Replace X Destination folder already contains processed file Would you like to replace the existing file D AMAC ApplicationsX TAL Examples Performance Test Srcmain c 33437 bytes modified on 2010 08 02 13 56 26 with this one Applications TAL_Examples Performance_Test Src main c 34770 bytes modified on 2011 05 06 18 27 58 Yes to All No No to All Auto Rename Cancel Figure 30 Confirm file replace All examples come already pre compiled So you may directly proceed with flashing them into your target Having chosen an application proceed with your target platform and go deeper to the respective GCC bin sub directory Here you will find the respective binary either in HEX format for AVR or in BIN format for ARM For flashing the firmware to your device please refer to Section 6 2 If you like to modify the examples we recommend reading the Eclipse Integration of the MAC Section 6 2 2 5 6 1 3 BitCloud based examples To develop custom applications with more comprehensive features like mesh networkin
2. C C deMAC Applications MAC Examples Basic Sensor Network Src main c Eclipse Platform File Edit Refactor Navigate Search Run Project AVR Window Help wi la e a e e l4 E E E f in Includes Applications BSP Examples amp DE Testsuite brief Main function ofthe E Helper Files nq MAC Examples int main void gt App 1 Nobeacon E App 2 Mobeacon Indireck Tr 6 App 3 Beacon Payload gt App 4 Beacon Broadcast Da 6 App 6 Beacon Indirect Traff FREI REIS RR DR E ATG6RF212 AT32UCS3B11 amp ATS6RF212 AT32UC3LO6 amp ATS6RF212 AT915SAM354 uq amp AT86RF212 AT915AM354 amp ATS6RF212 AT915AM354 amp AT86RF212 AT915AM7S2 amp ATS6RF212 AT915AM7X5 E AT86RF212 AT91SAM7X5 c ATS6RF212 AT91SAM 7XS E ATBG6RF212 AT915AM7X5 E ATS6RF212 AT91SAM 7XS E ATS6RF212 ATMEGA1281 J amp ATB6RF212_ATMEGA1281 SLE ii E ATS6RF212 ATXMEGA12 amp AT86RF212 ATXMEGA25E here amp ATS6RF230B AT32UC3B1 X amp ATS6RF230B AT32UC3LO amp ATS6RF230B AT91SAM3S E ATS6RF230B ATMEGA12 c ATS6RF230B ATMEGA12 amp ATS6RF230B ATMEGA12 E gt ATS6RF230B ATMEGA25E m em amp TR 6DE 3nR ATYMET ui gt Figure 60 Finished ARM build process HHH A A ee de oe a ee de J ee ee www dresden elektronik de Initialize the MAC layer if wpan init MAC SUCC gt Basic Sensor Mebwork t Stay here Check kit documentat
3. Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 The BitCloud stack provides the network functions for mesh networking reliable data transport low power operation and many of the ZigBee Cluster Library clusters Any node using those clusters can operate manufacturer independent and can be fully controlled by the deCONZ application deRFtraining Workshop Smart Wireless Solutions For an introduction into wireless network communications dresden elektronik offers one day workshops for ZigBee and 6LOWPAN The ZigBee workshop is based on the Developmentkit ZigBee 2 4 GHz The theoretical parts in the morning cover all important aspects of IEEE 802 15 4 and ZigBee including security In the practical part participants will setup their first ZigBee network setup the development environment and change the node firmware to support a temperature brightness and an acceleration sensor At the end the participant s first sensor implementation is tested using the deCONZ tool www dresden elektronik de Page 5 of 66 User Manual x e deRFdevelopmentkit ZigBee 2 4 GHz Term Description O N D O Q U gt D Zz o Q lt IPv6 over Low power Wireless Personal Area Networks gt V Application Programming Interface BitCloud SDK Atme s Software Development Kit for ZigBee Board Support Package for BitCloud SDK FFD device which routes packets and can integrate new nodes into the network I Al
4. UJ CD v Coordinator Future Technology Devices International a Scottish privately traded semiconductor device company NU GNU General Public License UI Graphical User Interface I G op Stopover on a route as well as the way from one network node to the next Hypertext Transfer Protocol IL 4 U Integrated Development Environment IEEE 802 15 4 Standard applicable to low rate Wireless Personal Area Networks WPAN IPv6 Internet protocol version 6 version of the Internet Protocol IP intended to succeed IPv4 which is the protocol currently used to direct almost all internet traffic LQI Link Quality Indicator MAC Medium Access Control layer OSI Open Systems Interconnection OSI model a prescription of characterizing and standardizing the functions of a communications system in terms of abstraction layers AL Platform Abstraction Layer HY OSI model layer 1 The physical layer defines electrical and physical specifications for devices It defines the relationship between a device and a transmission medium including the layout of all hardware components DK SN Wireless Sensor Network Low cost low power wireless mesh network standard developed by the ZigBee Alliance i Jio gt Z N Li UU D D www dresden elektronik de Page 6 of 66 User Manual eu E deRFdevelopmentkit ZigBee 2 4 GHz 3 3 Features The following figure gives an overvie
5. kh 4 TTT OTA 1 1 DFD driver instea Customize pU 4 serialInterface h S ade feature on boa Ee ow E WSNDemoApp h Show Key Assignments USE FAKE OFD DEREIV M s P wsNvisualizer h DUE PP USE FAKE OFD DR g in Manager EA E WSNZdManager h z S External Dependencies I3 Program AVR B T Other Files FLIPS Information E Ei A AVR Wireless Studio WE write Flash LETEN a E a B AVR Battery Studio Write EEPROM GI AVR QTouch Studio g Read EEPROM Gj Av R325tudio BITS Start Auto detine PP DEVICE TYPE DEV T Figure 37 Preparing the connection to the AVR programmer www dresden elektronik de Page 43 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz Select AVR Programmer PF 2 X Platform Fort STKEOO as QT600 COM C AMFISE mkll COM o Cne STESO0 M pese AVR Dragon LOM AMAISP Ell COME fe Baud rate changes are l active immediately Tip To auto connect ta the programmer used last time press the Pragrammer button on the toolbar Mate that a tool cannot be used for programming as long as itis connected in a debugging session In that case select Stop Debugging First Disconnected Mode Figure 38 Choosing programmer and kind of connection 15 x ITAGICE mk in JTAG mode with ATmegal2J8RFAL Device and Signature Bytes TAG mode Settings ISP Frequency Daisy Chain Disabled Changes to daisy chain setting
6. C to 125 C In the default configuration the sensor does a single shot measurement and goes back to low power mode The signed integral part of the measurement is returned as C in the callback passed to BSP ReadTemperatureData The callback data format can be changed to a raw format by adding bTMP102 OUTPUT RAW to the define section in the application makefile e TMP102 OUTPUT RAW Then the defined plain 16 bit TMP102 format will be passed to the callback Please refer to the TMP102 sensor datasheet for more information about this format www dresden elektronik de Page 36 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 e Ambient light sensor BitCloud Stack Documentation Nsensors h The ISL29020 is a low power light sensor capable to measure from 0 015 lux to 64 000 lux In the default configuration the sensor does a single shot measurement and goes back to low power mode Ihe measured value is returned as lux in the callback passed to BoP ReadBbrghtbatadt It s possible to change the sensor lux range and integration time by defining the following two symbols in the define section of the application makefile e I5L29020 MODE FSR defines the lux range e ISL29020 MODE FSR 1K 0 015 lux to 1 000 lux e ISL29020 MODE FSR AK 0 06 lux to 4 000 lux e ISL29020 MODE FSR 16K 0 24 lux to 16 000 lux default e ISL29020 MODE FSR 64K 0 96 lux to 64 000 lux e ISL29020 MODE INT defines the internal integr
7. F ty 0 6 66 SUN 856 565 T I MESS e a HNL ET Ac 3 7 LEE LJ gt m ow gt mr coordinator Lom Ls wm P sd d e SX gt lt ee CULEE Pee aes gt 0050099 0 009 0909 505 0096 au p ta rf U UL ULL UL ULL VN LN i Yaa 8X is e LU Figure 12 deRFnode with mounted deRFmega128 module as coordinator Note Check the correct jumper position here USB powered see Section 4 2 www dresden elektronik de Page 17 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz 5 1 3 USB driver installation If you connect the deRFnode 2TNP2 for the first time to the PC or if you change the USB port you are requested to install the required USB device drivers Windows asks you if it should connect to Windows Update to find a suitable driver Select No not this time and continue with Next gt Driver installation under Windows XP Found New Hardware Wizard Welcome to the Found New Hardware Wizard Windows will search for current and updated software by looking on your computer on the hardware installation CD or on the Windows Update Web site with your permission Read our privacy policy Can Windows connect to Windows Update to search for software C Yes this time only C Yes now and every time connect a device ssssssssssssssssspesessssssesssssessss Click Next to continue lt Back Cancel Figure 13 Ins
8. e Click Finish to create the empty project 10 x C Project s Create C project of selected type Project name MAC Stack v Use default location Location Cilpriiorkspace iMac Stack BroWSe Project type Toolchains H rs Makefile project zl Empty Project Other Taalchain v show project types and toolchains only if they are supported on the platform cy 2 Back Next gt Cancel Figure 54 configuration as described above www dresden elektronik de Page 56 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz e Import the Atmel MAC stack by clicking File Import E C C Eclipse File Edit Source Refactor Navigate Search Run Project window Help Mew Alt ShifE M Open File 6 gt 14 8 0 a aae Glase bri alase All Er H SEEEES iy Save Grri 5 Save 5 Save All Gtr Shift 5 Revert love Rename Fz 2 Refresh F5 Convert Line Delimiters To id Print Ctrl F Switch Workspace k Restart py Export Properties Alrt Enter Exit Figure 55 Import files into the project e Choose File System as import source Empore O NER anis Select Import resources From the local File system into an existing project Select an import source type Filter text Ell General pu IE Archive File Re I Existing Projects into Workspace File System E CC H E cvs H E Run Debug FS Tasks H E Team Fi
9. preprogrammed with the WSN Demo application of Atmel s BitCloud Software Development Kit SDK The Java based GUI allows to monitor all sensors of each node the radio signal strength RSSI and the network topology With the deCONZ GUI a powerful ZigBee commissioning tool is also part of the kit This free version is limited to support 5 nodes only It has no limitation in functionality deCONZ provides support for monitoring reporting control and commissioning of any ZigBee sensor network Included in the deRFdevelopmentkit is an analyzer stick USB radio stick with a 30 day trial license of Perytons network and protocol analyzer software full version With Perytons analyzer tool low level data transport and network structures can be observed The different protocol modules allow the graphical representation of the packet content for each layer of a wireless radio stack up to the ZigBee ZCL clusters The ZigBee specifications are published and maintained by the ZigBee Alliance and not part of this manual A great number of implementations of this specification exist from different manufactures One implementation the BitCloud Stack published by Atmel will be discussed in detail in this document 6 I I 1 s I f f lt gt Figure 1 Structure of a ZigBee mesh network source 1 ZigBee ZigBee ZigBee information g g g coordinator router end device flow www dresden elektronik de Page 4 of 66 User Manual
10. supports syntax highlighting and tracking the calling hierarchy of functions procedures which the AVR Studio 4 does not 1 Download the Eclipse IDE for C C Developers at www eclipse org downloads It comes as a ZIP archive 2 Extract it to a directory of your choice An installation is not required www dresden elektronik de Page 40 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 6 2 1 2 Tool chain setup for AVR based MCUs This section describes the tool chain setup for AVR based MCUs required for compiling and debugging The different dresden elektronik products use the following MCUs e ATmegai281 RCBs e ATmega2561 RCBs e ATmegai28RFA1 RCB 6 3 deRFmegai28 modules To install the WinAVR GNU compiler version 2010 01 10 please start the installer from the delivered CD 3rdParty WinAVH This provides the GNU compiler collection tool chain GCC version 4 3 3 as well as any other required utilities like make or rm remove by UNIX 6 2 1 3 Suggested programmers for AVR based microcontrollers dresden elektronik suggests to use one of the following programmer devices R Figure 32 AVR JTAGICE mkll Figure 33 AVR Dragon Notes 1 Even if there are many other programmers on the market they are not listed above since they are unsupported 2 JTAG Programmers for ARM devices cannot be used to program AVR devices and vice versa 3 A programmer is not contained in any devel
11. the different steps using the WSN demo application as an example The project files are shown in the project explorer and a build process can be started from the Build menu of the AVR Studio choose Build Rebuild All E File Project Build Edit View Tools Debug Window Help uu h d p H A sh JA RR ifndef COHI Ctrl F7 E ZI WSNDemo de Rs Compile Alt F Wdefine CONI s DER XX Clean Fi include lt Boe n 5 ws Export Makefile e E WSND tdefine APP n E WSNEndDevice c define AFP Figure 36 Rebuilding the project 6 2 1 6 Downloading the application In the next step the device and AVR Studio have to be prepared for downloading and debugging The AVR Studio has to be told the kind of programmer and AVR device H File Project Build Edit View Tools lig 5 EEG Oi im Tace Disabled ps RUE um mp ERI e GCC ICE50 Selftest IGURATION H_ p WSNDemo default JTAGICE mkII Upgrade IGURATION H Ee ms Source Files QT amp 00 Upgrade icona i E WSNCoord c Ter i AVR ONE Selftest s MI Iemaga i C TERFACE USART U Uxl WSNEndDevice c AVR ONE Upgrade TERFACE VCP UsQ 2 l cere VISNR outer Ar AVRISP mkII Upgrad le TERFACE SP I 0 0 3 WESNSensorMan TERFACE UART x 4 2 Bi slab AVR Dragon Upgrade WSNUARTManager c E WSNVisualizer c o E wsNzdManager c 13 Header Files 5TK600 Upgrade
12. Kit CD structure www dresden elektronik de Page 15 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 5 Preparing and running the WSN Demo application In the following two sections preparations to run the WSN Demo application are described Furthermore installation and startup procedures are explained and the features of the WSN Demo application are described more detailed 5 1 Installation and startup procedures Connecting the radio module to the deRFnode is described in Section 4 2 1 The nodes of the kit are preprogrammed with the firmware of BitCloud WSNDemo As mentioned in Section 4 1 the different devices can be identified by their color white for coordinator orange for router and yellow for the end device Coordinator Router End Device The PC application for the WSN Demo requires Java to be installed 5 1 1 Java and BitCloud WSN Demo application installation Java installation As the WSN Demo application is based on Java some Java Runtime Environment must be installed on your PC or Laptop You can easily check if and what Java Runtime Environment is installed on your machine Check at first if the Java Runtime Environment ts already installed e Open the console Command Prompt Start Execute cmd e Enter java version If Java is installed the Runtime Environment displays the version information as shown in the figure below ca Administrator C AWindowsYsystem32
13. Log packets Node Parameters WSNDemo net view Full ddress 00212E Short amp Address x1E13 SoftwareVer 0x01010100 D Mhin m man mn TE Pe a O O 0xD65D Temperature ShortAddress G OxtE14 OxO0000 Orphaned Modes Nodes list Modes Nodes 3 Orphaned Connected 3 Figure 26 Connected WSN Demo devices www dresden elektronik de Page 26 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 5 2 5 Monitoring WSN Demo application activity Network activity can be monitored in two ways e Observing the red LEDs on the development boards as described in Table 2 also refer to Figure 4 e Monitoring the network topology through WSN Monitor installed on a PC see Section 5 2 1 Node state LED D1 LED D2 LED D3 Searching for network Blinking OFF OFF Joined to network ON receiving data Blinking sending data to UART Blinking coordinator only Sleeping end device only OFF OFF OFF Table 2 LED indication for deRFnode boards used in WSN Demo 5 2 6 Identifying nodes When a user clicks a node in the topology view a button that can be used to identify the node appears under the node s icon When the user clicks this button WSN Monitor sends a command which is delivered to the coordinator through the serial connection and wirelessly to the target node The target node receiving the command blinks with its LED for several seconds 5 2 7 Sensor data visualizati
14. Nodes __ Nodes list Nodes Nodes 3 Orphaned 0 Connected 3 List of connected nodes End device coordinator selected node and router Sensor data view Figure 16 WSN monitor on the PC The topology view displays the network topology in real time which helps the user monitor the formation and dynamic changes in the network while nodes join send data or leave the network The network topology is constructed on the basis of next hop information for each of the nodes and each link is also tipped with RSSI and LOI values Each of the nodes displayed is depicted by an icon with the node s address or name below and sensor readings to the right of the icon if required by settings The sensor data view displays data coming from onboard sensors of the selected node It is presented in graph and table form Other parameters can be observed for each node in table form The node data view includes a sensor selection combo box it can be used to switch between sensor types By default in the topology view nodes are labeled with their short addresses However another title can be assigned to any desired node by a double click If Cancel is pressed in the opened window the node s title is set back to the short address www dresden elektronik de Page 21 of 66 User Manual oe deRFdevelopmentkit ZigBee 2 4 GHz 3 The visualized network features and parameters are arranged spread to several views on the WSN
15. for rapid design in and smooth integration with a range of external peripherals for example IRQ TWI SPI UART 1 Wire where the hardware interface is supported by the platform The board support package BSP includes a complete set of drivers for managing standard peripherals placed on different development boards www dresden elektronik de Page 38 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Building the WSN Demo application The WSNDemo application is built with AVR Studio To start open the AVR Studio project file BitCloud root directory Applications WSNDemoWwsndemoapp aps BitCloud has many parameters to configure the stack At first it is only necessary to adjust the unique ID of the node and its device type To do so open the file configuration h in the editor and adjust the following definitions e CS UID to the MAC address of the node which can be found on the small label at the radio module e APP DEVICE TYPE choose between DEV TYPE COORDINATOR DEV TYPE ROUTER or DEV TYPE ENDDEVICE To build the application choose Build Rebuild All in the main menu of AVR Studio To download the application to the target device please refer to Section 6 2 1 6 6 2 Development tools A development tool chain consists of e An integrated development environment for example Atmel AVR Studio or Eclipse where sample applications may be modified compiled and debugged e a correspondi
16. switches Show Next Statement Alttium ype parameter Device role Duce IYPE COORDINATOR TYPE ROUTER Up Download Memory _ TYPE EHDDIEVIGE JTAGICE mkII Options ator and routers are send tdetine APP TIMER HDIHG PERIOD 10000 Figure 42 Preparing JTAG programming and debugging Select device and debug platform Select debug plattform and device Debug platform Device AVR Dragon ATmegalz81 AVA OME ATmegal 24 AMA Simulator AT megal 254P l AWA Simulator 2 AT megal 284 Ee yesen ICE 50 AT megalbe JT AG ICE AT megal 644 JTAGICE mkll ATmegal b4P p AT megal b4FA ATmegalbb Part Auto v Open platform options nest time debug mode is entered Ver 4 18 715 Finish Cancel Help Figure 43 Choosing device and debugging platform Please make sure that you have selected the Open platform options next time debug mode is entered option before pressing Finish Otherwise the dialog as described in Figure 45 and Figure 46 will not appear and you might lose important information while programming the device www dresden elektronik de Page 47 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz Once device platform and programming options are chosen you can start another debug session by simply selecting the Debug Start Debugging menu entry k g Ctirl shift F5 Erw LS 1s Mili ZL Run F5 iit Break d c Reset omen Step Into F11 P201 J
17. with a blue marker on the top side the color stands for the Perytons analyzer functionality USB plug type A 2 4 GHz chip ceramic antenna deRFusb 23E001 JTAG 3 N 32310 0064 7105 C 00 21 2E FF FF 00 06 17 M ra TS T 7 as HF shielding Figure 7 Top view deRFusb 23E00 JTAG three status LEDs 10 pin connector for JTAG and debug Figure 8 Bottom view deRFusb 23E00 JTAG Alternatively the USB radio stick can be reprogrammed with own software and used for any other application e g turned into a ZigBee network coordinator or into the gateway for deCONZ More information and technical background you can find in 6 7 and 8 www dresden elektronik de Page 12 of 66 User Manual oe deRFdevelopmentkit ZigBee 2 4 GHz 4 4 deRFextract Tool The transparent lever part helps to remove a plugged in deRFmegai28 radio module from the deRFnode board Figure 9 Using deRFextract Tool Notes To remove a plugged in radio module please handle the deRFnode board the deRFextract Tool and also the radio module with the utmost care Do not tilt do not bend the pins of the radio module www dresden elektronik de Page 13 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 4 5 SAM ICE adapter The SAM ICE adapter enables programming and debugging of the deRFusb 23E00 JTAG radio stick It is required to connect the deRFusb 23E00 JTAG stick to the SAM ICE programmer via JTAG in
18. with a proprietary message payload The BitCloud SDK includes the WSN Monitor PC application in binary format and the WSN Demo application as binary format and source code The source code for the WSN Demo application can be modified and extended making it possible to develop WSN applications for a variety of application scenarios For more information please refer to Section 6 The nodes flashed with the WSN Demo form a ZigBee PRO sensor network End device router and coordinator can read the sensor data from onboard light and temperature sensors and forward the collected data to the WSN Monitor for visualization An end device follows a duty cycle i e the microcontroller and radio transceiver are put to sleep periodically and wake up to transmit data to the coordinator Using the serial connection the coordinator transmits the received packets along with its own sensor data to the WSN Monitor These transmitted values are displayed on WSN Monitor views as temperature light and battery level measurements The WSN Monitor also visualizes the network topology by drawing a tree of nodes that have joined the network For each of the nodes parameters like node address node sensor information and link quality data are displayed RSSI indicates a link s current condition and is measured in dBm LQI is a numeric parameter defined within the range of O to 255 it is used to measure the link quality Larger values mean a better link whi
19. 5 www dresden elektronik de Page 2 of 66 User Manual pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Document history owe version Description www dresden elektronik de Page 3 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 1 Overview This document is intended for engineers and software developers evaluating and operating sensor networks designed in compliance to ZigBee specifications and the IEEE 802 15 4 standard The deRFdevelopmentkit ZigBee 2 4 GHz serves as a development environment for quick and easy start up development and evaluation of ZigBee sensor networks The kit contains a complete development environment for a wireless sensor network based on ZigBee If you require more than the three nodes of the kit you can order additional deRFnodes and deRFmodules to connect as many sensors or actuators as your setup requires The kit provides all the software you need to evaluate and develop nodes that operate within a ZigBee PRO network The kit CD contains an extensive software package with many example applications that cover the typical IEEE 802 15 4 features from simple point to point connections to network applications with routing and beacons Documentation data sheets and manuals of the particular hard and software components are also included on the kit CD The three nodes of the kit are delivered as coordinator router and end device
20. AC Examples Basic Sensor Network AT86RF231 AT91SAM7X512 deRFarm7 25X00 deHFgateway 1XXX2 e Browse to the folder GCC there is the Makefiles located C C deMAC Applications MAC Examples Basic Sensor Network Src main c Eclipse Platform E m xi File Edit Refactor Navigate Search Run Project AVR Window Help ro lB T a a e e J amp 0 0 Q e m ig E BP remm FH Debug Rice E l G oe ici rz Ex aE ene a inc 4 2 O Make Targets 23 t gt OF m No inl Includes IMPLEMENTATION ATS6RF230B_4732UC3B1128_REB_2_3_S5TK600 H 6 Applications JI E ATS6RF230B AT32UC3LO64 Rz600 LIC3LEK BSP Examples H E ATS6RF230B AT915AM3S4C SAMS3SEK DE Testsuite t brief Main function of the H E ATS6RF230B ATMEGA1281 RCB 3 2 PLAIN E Helper Files xd H E ATS6RF230B ATMEGA1281 RCB 3 2 SENS TERM BOARD MAC Examples int main void El H E ATS6RF230B ATMEGA1281 REB 2 3 STKS500 STK501 App 1 Mobeacon x3 j amp amp ATS6RF230B ATMEGA2561 REB 2 3 STKS00 STKS01 App 2 Nobeacon Indirect Tr Initialize the MAC layer H E ATB6RF230B ATXMEGA128A1 REB 2 3 STK600 H E App 3 Beacon Payload cdfo wpan init MAC SUCC ATS6RF230B ATXMEGA256A3 REB 2 3 CBB App 4 Beacon Broadcast Da e fg H E ATS6RF231 AT32UC3B1128 REB 4 0 STK600 H E App 6 Beacon Indi
21. ART based on the TINY TAL Example Wireless UART It uses a timer to improve over the air performance through sending data block wise instead of transmitting frames upon every single byte received over the serial connection For more details please refer to the documentation on the delivered CD see Figure 27 MAC stack setup and installation Due to many changes in the MAC stack internal APIs from one version to another the deRFmacAddon is always made for a specific MAC stack Be careful to match MAC stack and deRFmacAddon versions Mixing different versions can lead to none functional dresden elektronik examples as well as none functional stack examples The MAC stack that matches the deRFmacAddon is provided on the development kit CD in the directory Packages MAC It is also strongly recommended to read the file IMPORTANT README_FIRST txt in the root of the Software Package deRFmacAddon The deRFmacAddon is a software product developed by dresden elektronik So only dresden elektronik is responsible for it If you run into any trouble please write to support dresden elektronik de www dresden elektronik de Page 32 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 The deRFmacAddon package adds hardware support for dresden elektronik platforms to the MAC software package It also adds some application examples Which examples have been added and how they are to be used is described here Installatio
22. B AT32UC3B1 EE EE gt aln EE EE Fa H E ATB6RFZ230B_A4T32UC3LO1 gt ATS6RF230B AT91sAM3S li A Search 3 ATS6RF230B ATMEGA12 ATS6RF230B ATMEGA12 gt ATS6RF230B ATMEGA12 H ATS6RF230B ATMEGA25E OS ATSADE22NR ATVME IZ A15 4 b Writable Smart Insert 124 17 Figure 58 Switch to Make Target View and locate your application e Right click on GCC folder and select New e Within new dialog type all to field Target name e Repeat previous step with Target name clean www dresden elektronik de Page 59 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 2013 02 28 Create Make Target xj Target name alll Make Target Same as the target name Make target all Build Command M Use builder settings make Build command Build Settings I Stop on first build error W Run all project builders Figure 59 Target name all and clean Create Make Target x Target name clean Make Target Same as the target name Make target clean Build Command M Use builder settings Build command make Build Settings M stop on First build error M Run all project builders e Double click on all to build the project During the build process you can see in the console which projects are being compiled and linked and how large they are
23. D status cyclically by a timer deRFnative LowPower Platform AVR ARM7 This application requires a deRFnode It demonstrates how the device may be switched between high power consumption and sleep mode Initially the device polls the sensors in a given interval If the button is pressed the device enters sleep mode If the button is pressed again the device wakes up and continues reading the sensors deRFnative MotionDetection Blink Platform AVR ARM7 This application uses the acceleration sensor of the deRFnode or deRFgateway This example turns the device into something like an alarm trigger Once activated the LED starts to blink if the board is moved This alert must be reset manually deRFnative MotionDetection Trace Platform AVR ARM7 This application uses the acceleration sensor of the deRFnode or deRFgateway in a motion tracking way It configures the motion detection threshold of the acceleration and uses the interrupt to read the sensor and print trace messages as long the board is moved deRFnative SPI Flash Platform AVR ARM7 This application uses the on board serial flash of a deRFnode or deRFgateway At application start the flash is erased Than a random pattern is written to it and read back Finally both read and written data are compared deRFnative SRAM Platform AVR This example only works with a Sensor Terminal Board and shows the access to the 32 KB external SRAM of the STB It supports RCBs only deRFnati
24. M L2 Ambient light z f Adjustable P m ib LDO biz 7 i Ls 4 X METTRE S i bpeti HINH Li y C9 Y Button 1 EAE mn Ke bee f s m Button 2 Power USB serial supply assembled on jumper Node AVR Figure 4 deRFnode 2TNP2 board features The deRFnode platform is equipped with several onboard features such as three different sensors temperature ambient light and acceleration two user defined buttons and three LEDs USB interface for AVR a supply voltage supervisor and an expansion header for additional connections and own sensors actuators Before powering up the deRFnode always check or set the correct jumper position JP2 in Figure 4 the jumper is set to USB powered In Figure 5 the JP2 header power supply options are shown without external battery powered jumper power supply EN a N N A Q A E Y 73 rn J T US Figure 5 Power supply jumper setting options on deRFnode board For more information please refer to 4 and 5 www dresden elektronik de Page 10 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 4 2 1 Connecting the radio module to the deRFnode board The three deRFmega128 22A00 radio modules have to be attached to the three deRFnode boards Required parts e 3x deRFmegai28 22A00 e 3x deHfnode 2TNP2 Attach the radio modules topside down carefully to the deRFnode boards Double check tha
25. Monitor window ra WSHNMonitor WSNDemo File Window Help A Log packets Select node param Select link para Figure 17 WSN Monitor window top features Left hand side in the WSN Monitor window the following views can be found Node Parameters Parameter Value 0x01 NodeType FullAddress ShortAddress SofiwareVersion 0x07070700 ChannelMask Ox00008000 WorkingChannel ParentAddress LIQU 00 OO Battery Value Ox0000 Figure 19 Sensor data view containing the Temperature and the Light tab Orphaned Nodes Nodes list Iu J Fulladdress Filter Nodes 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 29 Figure 20 List of connected nodes www dresden elektronik de Page 22 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Right hand side on the topology view the graphical presentation of the nodes in the network is visualized Each node is marked with its role C coordinator R router or end device and short address File Window Help amp Log packets Select node param Select link para w Node Parameters WSNDemo net view Parameter Value MessageTy 0x01 NodeType 0x02 FullAddress 00212EFFFF000349 ShortAddress 0x1E13 SoftwareVer 0x01010100 R OxD66D ShortAddress Time c 15 20 16 AAG l
26. Ycmd exe c gt jJava version java version 1 6 0 19 Java TM SE Runtime Environment build 1 6 0 19 b04 Java HotSpot TM Client VM build 16 2 b04 mixed mode sharing cl gt Figure 11 Java installation If Java is not or not correctly installed an info like unknown or wrong command or command could not be found will be prompted www dresden elektronik de Page 16 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 To install Java use the following exe files either from CD or the internet e 3rdParty Java jre 6u25 windows i586 s exe for 32 bit operating system e 8rdParty Java jre 6u25 windows x64 exe for 64 bit operating system Start the setup and follow the given instructions Note To check your PC s operating system version click on the Windows Start icon e Control Panel System and Security System Windows 7 Editions BitCloud WSN Demo application installation The BitCloud WSN Demo application is provided with a setup for Windows You can execute the setup directly from the CD To access it please change to e Packages Bitcloud WSNMonitorSetup_2 2 1 66 exe e Execute the setup and follow the given instructions 5 1 2 Connecting the WSN Demo coordinator At first the coordinator white marker has to be connected to the PC via USB cable Power supply jumper for USB powered p EENT TIT HEEELETEIT T ESSA LO ALD LOLA B b AN VANS MIHI i
27. and to store it into pal alert T Initialize LEDs xq pal led init xT EE pal led LED ROOT LED OFF ME all pal led LED DAT TX LED OF clean pal_led LED_DATA RX LED OF The stack is initialized ATS6RF230B_AT32UC3B1128_REB_2_3_STK600 4 ATB6RF230B AT32UC3LO064 RZ600 UC3LEK ATB6RF230B AT915AM3S4C SAM3SEK ATB6RF230B ATMEGA1281 RCB 3 2 PLAIN H E ATS6RF230B ATMEGA1281 RCB 3 2 SENS TERM BOARD ATB6RF230B ATMEGA1281 REB 2 3 STK500 STKSO1 H E ATS6RF230B ATMEGA2561 REB 2 3 STKS500 STK501 ATB6RF230B ATXMEGA128A1 REB 2 3 STK600 H E ATS6RF230B ATXMEGA256A3 REB 2 3 CBB ATB6RF231 AT32UC3B1128 REB 4 0 STK600 ATB6RF231_AT32UC3L064_RZ600_UC3LEK we need a ATS6RF231 AT915AM354B deRFusb 23E00 H E ATS6RF231 AT91SAM3S4B deRFusb 23ED6 ATB6RF231 AT915AM354C SAM3SEK AT86RF231 AT915AM75256 deRFusb 24E001 ie descriptors El GCC ie bin E obj ATS6RF231 AT915AM7X512 deRFarm7 25x00 deRFtoRCB amp ATS6RF231 AT915AM7X512 deRFarm7 25X00 deRFtoRCB BREAKOUT E ATS6RF231 AT915AM7X512 deRFarm7 25x00 deRFtoRCB SENS TERI amp ATS6RF231 ATMEGA1281 RCB 4 0 PLAIN im B ri E obj sram CDCL ineCoding o 220 dc obj sram CDCDSerialDriverDescriptors o 70596 113c4 bin Sensor Network sram elf Page 60 of 66 ATS6RF231 AT915AM7X512 deRFarm7 25X00 deRFgateway 1XXX2 E ATS6RF231 AT915AM7X512 deRFarm7 25X00 deRFnode 1XXX2 User Manual Pone deRFdevel
28. ation time and therefore the resolution Be aware that higher values drastically increase measurement time e ISL29020 MODE INT 4BIT ADC e ISL29020 MODE INT 8BIT ADC e ISL29020 MODE INT 12BIT ADC default e ISL29020 MODE INT 16BIT ADC e Acceleration sensor The BMA150 acceleration sensor is currently not supported by the BSP support package 6 1 3 2 API overview The BitCloud internal architecture 10 follows IEEE 802 15 4 and the ZigBee convention for splitting the networking stack into layers Besides the core stack containing the protocol implementation the BitCloud stack contains additional layers implementing shared services for example task manager configuration manager and power manager and hardware abstractions for example hardware abstraction layer HAL and board support package BSP The APIs contributed by these layers are outside the scope of core stack functionality These essential additions to the BitCloud API significantly reduce application complexity and simplify the development effort www dresden elektronik de Page 37 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Task Manager Power Manager T i m T o fo Cc t A Radio MCU Dependent Dependent L User application ENS Core stack p Shared low level services Figure 31 BitCloud block diagram source Atmel Core stack The topmost layer of the core stack APS provid
29. cotucma celo quens uo cet r ei 20 5 2 1 Overview WSN Monitor ss ssescin dotes diede tt dix ota caia dote din otia aio toit Loto ariii 21 5 2 2 Node tiM OutS ccccccceeccceeecceccceeeceeeceucecueceeeceueesseessueesueeseeessuseseeesaas 23 5 2 3 Connecting WSN Monitor to the WSN Demo Coordinator 24 3 24 NetWork StartUp s e etus citi ideis E EEST 25 5 2 5 Monitoring WSN Demo application activity esses 27 ee CM rel HIR OO PERDRE E 27 5 2 7 Sensor data visualization ccsceccccsecessececceeesceecesceeccceaeeccecescseeeceeeesees 27 6 Developing custom network applications and programming sssseussssse 28 D Ts bonae Ore 61 216 gt gt ae eee usu et NR I ERES NOU MS 28 Ov leds Native CXEIMDISS qm 28 6 1 2 MAC based examples ccccccccsececeeecceeeceueeceeeceueeceeceeeeceueeseeessusesseesaes 31 6 1 3 BitCloud based examples ccccccccceececeeeeeseeeeceeeeseeeeeseeeesseeeeseeeseeeeees 34 6 2 Development tOols cccccceccssccceccceeccecceeecceeceueceueceueseueseusseueseueseeeseeeseesseetsaeees 39 6 2 1 AVI CCV CIO DING sarei intimes rependit aote UR menn retenu a aet UPS imr eiA 40 p 22 ARNO VE ONE I cee eee em tatio ane een eter ere re np MM EHE 51 Te 0 0 62 fAs Wel ONS ANGI ZL ENT Urt 62 YES eS UU E ee ere tc tee ee ere 64 Os EOV OMNO oe enn ee eee ne ee eee eee 65 Ei o DD 6
30. cribes how the tool chain has to be set up that is required for re compiling and debugging firmware for the following microcontrollers e ARM7S e ARM7X e Cortex M3 SAM3 Due to licensing issues it is not possible to redistribute all needed tools on the current CD Missing components must be downloaded directly from their producer Compiler Supplementary Tools To set up the arm none eabi based YAGARTO GNU ARM tool chain version 2011 03 28 please start the installer directly from the delivered CD It can be found in the directory SrdParty Yagarto The tool chain consists of the following parts e Binutils 2 20 1 e Newlib 1 19 0 e GCC 4 6 0 e GDB 7 2 It is also recommended to install the YAGARTO Tools This installer is also available on the delivered CD in the directory 3rdParty Yagarto The YAGARTO tools provide typical UNIX like commands such as make sh touch uname and more 6 2 2 3 Suggested programmer for ARM based microcontrollers dresden elektronik suggests to use the following programmer device Figure 48 Atmel SAM ICE The proposed device enables programming of firmware files as well as debugging applications www dresden elektronik de Page 52 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Notes 1 Even if there are many other programmers on the market they are not listed above since they are unsupported 2 JT AG Programmers for ARM device
31. ddon version provided on the Development Kit CD is older than the latest Atmel BitCloud SDK version please contact wireless dresden elektronik de and request the newest BitCloud SDK addon Installation of deRFmega platform e BitCloud SDK After downloading the zip archive BitCloud MEGARF 1 14 O zip from the above link extract it to your hard drive While running the installer please choose a directory without spaces as installation directory e g C Bitcloud as otherwise the compilation will lead into trouble This installation location is referred to as lt BitCloud root directory gt from now on e BitCloud SDK Addon The deRFBitCloudAddon provides a Board Support Package BSP and BitCloud SDK examples for deRFmega128 modules Run the installer deRFBitCloudAddon 1 14 0 MEGAHRF V1 01 exe from the CD directory APackagesBitcloud to install the dresden elektronik specific extensions If asked for a destination directory please chose the same location where you unpacked the BitCloud SDK in the previous step T ip self extracting archive X Extract to D ABitcioudN u cred Click extract and confirm to replace existing files www dresden elektronik de Page 35 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 Note Always install the deRFBitCloudAddon into the same directory as the MAC stack Note The Confirm File Replace dialog is a good indicator that you have chosen the right
32. directory Board Support Package If developing your own applications you may take advantage of the BitCloud SDK Addon which provides the Board Support Package BSP for your selected platform The BSP includes a complete set of drivers for managing standard peripherals sensors LEDs and buttons with a common board independent interface This section contains references to the locations in the BitCloud Stack Documentation 10 where further information about the related API can be found If the interface is configurable the respective options are documented in the related subsection Note The first line of the following subsections always points to the documentation of the related header file which is reachable under BitCloud Stack Documentation Reference Lists File List This documentation will be installed together with the BitCloud ZigBee SDK Software Package e Buttons BitCloud Stack Documentation Wbuttons h Each board has two buttons available which are accessible through bit O button 1 and bit 1 button 2 by the related BSP button functions e LEDs BitCloud Stack DocumentationMeds h Each board has 3 LEDs which are accessible through their ID LED FIRST LED SECOND and LED THIRD by the related BSP led functions e Temperature sensor BitCloud Stack Documentation sensors h The TMP102 is a low power digital temperature sensor capable of readings temperatures to a resolution of 0 0625 C and can operate in a range from 40
33. dresden elektronik e User Manual deRFdevelopmeniKit ZigBee 2 4 GHz for evaluation of radio modules and the ZigBee PRO stack Document version V1 0 2013 02 28 User Manual Version 1 0 Ue Hi deRFdevelopmentkit ZigBee 2 4 GHz Contents DEMO EE 4 A CIAR 6 SERRE 7 A 2 68 eel gage cedes NER T un 9 4 1 deRFmega128 radio modules ccccceeccseecceececseeceeeeceueeseeeceueeceuesseeeseuseseeesseeess 9 4 2 ACW AL MOOS IO AICS ERR TTE T 10 4 2 1 Connecting the radio module to the deRFnode board 11 4 3 deRFusb 23E00 JTAG radio stick eeeesseesssesseeeeeeeneeen nenne 12 Lm Mv iia iied 13 45 SAM IGE adaplol MERECE EEE 14 AO ACCESSO srra E E E VEI RN EDO 15 dO Te CADES praean E UO Y 15 d 62 OD CONE eessen E e a eE Erin niies 15 5 Preparing and running the WSN Demo application cccsccccceeeeeseeeeseeeeseeeeeaeeeesaaees 16 5 1 Installation and startup PrOCECUIeS cccccseccceeecceeeseeeeceeeeseeesaeeesaeeeseeeseueeseeeeaes 16 5 1 1 Java and BitCloud WSN Demo application installation 16 5 1 2 Connecting the WSN Demo COOrdinat0l ccccccceceeeeeeeeeseeeeeeeeeeseeeesees 17 9 1 9 USB driver installalo senripare para E ipaa aA aru e ean a arva Rd 18 5 2 WSN Demo abpliCdllOD sea ete dtenit entes macto etum to maseiheecs
34. eRFnode and deRFgateway development boards It accesses all sensors temperature ambient light and acceleration and prints the read values to a serial link deRFsimple Button Highest stack layer PAL This application toggles LED 0 and LED 1 every time a button is pressed by using PAL layer resources deRFsimple USB Highest stack layer PAL This code shows how to read and write bytes from to USB interface To test it simple open any terminal program on the virtual COM port that is assigned to your Sensor Terminal Board or deRFnode or deRFgateway baud rate 115 kbit 8 data bits no parity 1 stop bit The application waits for an arbitrary character to be sent If the application receives this character the actual temperature is read and the value sent over the USB interface to the terminal program With ATmega128RFA1 modules the internal temperature sensor is used and with RCBs the temperature sensor from the Sensor Terminal Board is selected LowPower Sensor Highest stack layer TINY TAL This application demonstrates how to power down the deRFnode platform and therefore enable battery powered operation Cyclically it wakes determines its current operating conditions battery voltage environment temperature luminosity acceleration and transmits these over the air As receiver an USB dongle is used to decode and print the received messages Wireless UART 2 Highest stack layer TINY TAL The example implements an alternate Wireless U
35. elf Hardware vendors for 2 4 GHz and sub GHz capture e Sample capture files e Help files and User Manual e A free 30 days license 7 2 BitCatcher Alternatively available for network and protocol analysis are the deRFusb23E00 and deRFusb13E00 USB radio sticks These analyzer variants are optimally matched for Luxoft s easy to use network and protocol analysis software BitCatcher BitCatcher allows for monitoring complex network structures as well as observe data flows and runtime performance in detail The analyzer sticks are appropriate for the sub and 2 4 GHz frequency range as a single channel sniffer the software operates with an accuracy of 1 us The BitCatcher comes with the preloaded wireless protocol descriptions for IEEE 802 15 4 MAC ZigBee PRO ZigBee Smart Energy and ZigBee Light Link and proprietary applications The BitCatcher network analyzer software package is available for free download at www luxoft com bitcatcher BitCatcher runs on both Windows and Linux operating systems supports multiple 802 15 4 frequency bands and features auto key type detection for easy management of security keys Drivers are included in the package www dresden elektronik de Page 64 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 8 Revision notes Up to now for the individual components of the deRFdevelopmentKit technical problems malfunctions or any other critical issues are not known Concer
36. er software in this location ca IDE ATA ATAPI controllers lt gt Keyboards P Mice and other pointing devices K amp Monitors amp Network adapters gt Other devices D Driver V Include subroeta Ym deRFnode Ports COM Dp Processors Sound videc Until Update Driver Software gt Let me pick from a list of device drivers on my computer This list will show installed driver software compatible with the device and all driver software in the same category as the device lt gt Storage cont Jm System devic Scan for hardware changes Universal Ser Properties Figure 15 Installation on Windows 7 Editions All necessary files can be found in the Driver directory on the delivered CD www dresden elektronik de Page 19 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 5 2 WSN Demo application In this section an overview of the WSN Monitor as part of the WSN Demo is given Further necessary procedures to prepare the WSN Demo application and options are described and important features of the WSN Monitor are outlined The WSN Demo application consists of the embedded firmware WSN Demo application which supports functions for coordinator router and end device as well as the GUI visualization application WSN Monitor which runs on a PC The WSN Demo nodes communicate based on ZigBee PRO but use a vendor specific cluster
37. er timeout 20 i WSNDemoNode End device timeout 20 cscs Drop changes Apply Figure 22 WSN Monitor preferences menu 5 2 3 Connecting WSN Monitor to the WSN Demo Coordinator To monitor the network a connection from the WSN Monitor to the WSN Demo coordinator must be established For deRFnode boards this is done via USB The driver installation is described in Section 5 1 2 Follow these steps to connect the WSN Monitor to the correct COM port e Open the WSN Monitor e Click on the Connect icon Serial port settings in the WSN Monitor see Figure 16 and Figure 23 e Select the COM port in the list that corresponds to the just connected deRFnode usually the last COM port in the list and click OK see Figure 23 To find out the COM port of your deRFnode Click the Windows Start icon Control Panel System and Security Device Manager Connections Here the deRFnode COMxx with an automatically assigned number for the COM port is shown Windows 7 Editions www dresden elektronik de Page 24 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz o e z L WSNMonitor WSNDemo File Window Help dD Log packets Select node param w Select link para w Node Parameter WSNDemo net view Protocol configuration folder protocal Node History Figure 23 Establish connection to WSN Demo coordinator In case of successful connection the coordinator a
38. erent code functions www dresden elektronik de Page 49 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 6 2 1 8 Basic Troubleshooting In case of any operational problem with your setup please check the following 1 Check the power first and make sure that all of your equipment is properly connected 2 Verify that the PC conforms to the minimum system requirements 3 Verify that the PC USB or UART interface is working and that the correct drivers are installed Check that you have set up the hardware according to specific kit instructions Make sure you have programmed the right images and set the correct fuse values Resetting the node may be required www dresden elektronik de Page 50 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 6 2 2 ARM development Developing custom applications and debugging them requires an appropriate IDE The Eclipse IDE is recommended Further on compiler and supplementary tools are needed Finally an appropriate programmer has to be chosen How to work with the Eclipse IDE together with more information about the other prerequisites is described in the following sections 6 2 2 1 Setup IDE The Eclipse IDE setup is quite simple and involves the following steps 1 Download the Eclipse IDE for C C Developers at www eclipse org downloads It comes as a ZIP archive 2 Simply extract it to a directory of your desire An ins
39. es the highest level of networking related APIs visible to an application ZDO provides a set of fully compliant ZigBee Device Object APIs which enable main network management functionality for example start reset formation join ZDO also implements ZigBee Device Profile commands including Device Discovery and Service Discovery Task power and configuration manager There are three service planes including task manager configuration manager and power manager These services are available to the user application and may also be utilized by lower stack layers The task manager is the stack component which mediates the use of the MCU among internal stack components and user application The task manager utilizes a proprietary priority queue based algorithm specifically tuned for a multilayer stack environment and the demands of time critical network protocols Power management routines are responsible for gracefully shutting down all stack components saving the system state when preparing to sleep and restoring system state when waking up The configuration manager is used by the internal stack components and the user application to provide a common way to store and retrieve network parameters like the extended PAN ID and channel mask HAL and BSP The hardware abstraction layer HAL includes a complete set of APIs for using on module hardware resources for example EEPROM sleep and watchdog timers as well as the reference drivers
40. evice c J2 r c s Step Over Fio D3 4 orManager c Step Out Shift F 11 E 44 Run to Cursor alizer c anager c Auto Step BERND a T Mext Breakpoint Cila bead of real one This option rface h boards without external flash oApp h New Breakpoint FSIVER OD ana Remove all Breakpoints ernal flash memory chip endencies 15DBU041 Trace KRT25F2048 tion h Stack Monitor Darda witohut DIP switches TI Show Next Statement Alt ium ype parameter Device role m Quickwatch TYPE COORDINATOR Select Platform and Device TYFE ROUTER Up Download Memory TXFE EHDDEVICE JTAGICE mkII Options ator and routers are sending tdetine APP TIMER HDIMG PERIOD 10000 Figure 44 Start debugging oet the AVR CPU speed in the Connection tab JTAGICE mkII ES x Connection Debug Status PWM JTAG connection Target clock frequency 6 08 MHz Accurate specication of the target device s clack frequency i necessary in order to comecth set the JTAG part clock frequency Overspecitying this parameter will cause JTAG communications Failure Daisy chain Target device is part of a JTAG daisy chain Devices before fo Instruction bite before fo Devices after 1O Instruction bits after fe Figure 45 Important JTAG programmer settings AVR CPU speed www dresden elektronik de Page 48 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz Then set the Preserve EEPROM contents on the Debug tab Run timers in st
41. g using the BitCloud ZigBee SDK is recommended As with all software examples a suitable IDE a development tool chain and a programmer are required Example IDEs tool chains and programmers are described in Section 6 2 1 for AVR and Section 6 2 2 for ARM boards 6 1 3 1 Overview BitCloud SDK The BitCloud ZigBee SDK Software Package is provided by Atmel Corporation It is a full featured ZigBee PRO stack supporting reliable scalable secure wireless applications running on Atmel wireless platforms The design software is completely standard compliant and certified for the ZigBee PRO platforms www dresden elektronik de Page 34 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 The SDK provides a complete software and documentation toolkit for prototyping developing and debugging custom applications on top of the BitCloud application programming interface After a short registration the package is available from the Atmel BitCloud SDK download site http www atmel com tools BITCLOUD ZIGBEEPRO aspx Please check that you download the correct package for your platform Software Description e BitCloud SDK for AVR Raven QU 31447046 updated March 2011 m BitCloud SDK for ZigBit ZigBit Amp QUE 181MB updated June 2012 Version 1 14 0 m BitCloud SDK for megaRF QUE 113MB updated June 2012 Version 1 14 0 The currently supported version of BitCloud SDK for MegaHF is rev 1 14 0 If the a
42. gramming is finished and you application will start each time you power up the device If you need to debug you application the programming step can be omitted since the AVR Studio can do this and by default does as the first part of the debugging session 6 2 1 7 Debugging the application The selection of the programmer and target device is usually only necessary once To do this follow the pictures below www dresden elektronik de Page 46 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz Project Build Edit View Tools Debug Window Help d g 39 X Ea Fes cd uj ru Start Debugging Ctrl Shift Alt F5 J cc ip j zl ji 1 o gt 3 Stop Debugging Ctrl Shift F5 bled JE NEN te Sigs Ts jg Y XE Run F5 Demo default Freak source Files WSNCoord c WSNDemoApp c Fii PE 0i WSNEndDevice c step Into WSNRputer c Step Over FIO p A WSNSensorManager c Step Out Shift F 11 RETI A e Hip HP Run to Cursor iw q OO wSNVisualizer c WSNZcdManager c Auto Step BEL x ee pu Next Breakpoint Crl4F9 Eead of real one This opt serialInterface h TE boards without external fl WSNDemoApp h ew preakpomn TIVER WSNVisualizer h Toggle Breakpoint g LDRIVER 1 WSNZdManager h Ri 1 all Br aR i tz xternal Dependencies te eakpoin Ed flash memory chip ather Files ae See configuration h oe Makefile Stack Monitor Darda witohut DIP
43. gure 56 Choose the import source for the files www dresden elektronik de Page 57 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz e Inthe Next dialogue click on Browse e Select the path to the MAC stack lt MAC root directory gt e Press Finish to import the source files to your local workspace Bi x File system Import resources From the local File system ay a From directory c prjAktmelMAc_ Stack Browse x B El Le Atmel AAC Stack cpraject Ii settings project E Applications deELILA Ext T gt BSP EULA txt Tc Build IMPORTANT README FIRST Ext T Dac G MAC readme hkml T Include Tc Mac Tl PAL Ili Resources zi Filter Types Select All Deselect All Into Folder MAC Stack Browse Options E Overwrite existing resources without warning C Create complete folder structure Create selected Folders only Advanced gt gt JJ z Back Next Cancel Figure 57 Select the folder that contains the source files you want to import www dresden elektronik de Page 58 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz In the next step the actual binary will be built e Create a new make target by switching to the Make Target view which is on the right hand side of the Eclipse view e Browse to the application you want to build for example the Simple Sensor Network which can be found for ARM under Applications M
44. have identically on the different deRFnodes deRFgateways and other platforms However not all examples are available for each platform and module family The examples may be compiled standalone which means they do not require any stack installation To keep the application code simple and easy to understand some examples use additional source code library modules e g from the AT91Lib for ARM or a TWI library for sensor access In this case the source code is included in the native examples package An overview of the available applications of deRFnative examples is given below deRFnative Button Platform AVR ARM7 This example shows how to change the LED status if a button is pressed deRFnative I2C EEPROM Platform AVR The example code simply writes and reads a test pattern to from the serial EEPROM available on deRFmegai28 radio modules As this EEPROM is only available on the deRFmegai28 modules for evaluation this example is not available for OEM modules ARM7 modules and USB radio sticks www dresden elektronik de Page 28 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 deRFnative I2C Sensors Platform AVR ARM7 The application demonstrates the native access to the temperature light and acceleration sensors available on the deRFnode platform It reads out the actual values from each sensor and restarts if a button is pressed deRFnative_ LED Platform AVR ARM7 SAM3 This example changes the LE
45. he Start menu Perytons Perytons Capture 802 15 4 ZigBee RF4CE 6LOWPAN Protocol j x E a Sa ee 1 Simulate Capture From File Data File C Users admin Documents PerytonsNCapture 4 anl z r USB Dongles Available 1 COM 5 Dongle Type dresden elektronik 2 4GHz JI EN EN MEN MEVS EM EM EM EN Ss Jy qq 7 13 4 15 16 1 8 19 20 21 Search For Activity Refresh Dongles Active Syne M Diversity EN e EN gt EN gt m DataCapture Max Messages 5 00 V Continuous Message Max Time sec 600 Elapsed Time Start Real Time Figure 62 Starting the analyzer In the appearing capture dialog choose the dresden elektronik 2 4GHz as dongle type Then do the following steps 1 Select the channel 2 Setup the protocol e g ZigBee Pro 3 Start the session by pressing Start Real Time www dresden elektronik de Page 63 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Perytons evaluation version 4 0 includes e The Perytons M4 Analyzer Evaluation version 4 0 BOMbyte for IEEE 802 15 4 2006 ZigBee Home Automation HA ZigBee Commercial Building Automation CBA ZigBee omart Energy SE ZigBee Telecom Application TA ZigBee Health Care HC ZigBee RF4CE GDP ZRC ZID Z3D ZigBee Light Link ZLL ZigBee Retail ZRS ZigBee IP and GLoWPAN e Support of a variety of off the sh
46. jects in a Folder called a workspace Choose a workspace Folder to use For this session Workspace Cipri workspace Use this as the default and do not ask again Figure 52 Workspace Launcher To create a new project either use the File menu or right click into the Project Explorer New Project C Project and chose in the following dialog Makefile Project Empty Project Other Toolchain lt e Create a new project www dresden elektronik de Page 55 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz E C C Eclipse File Edit Source Refactor Navigate Search Run Project Window Help Alt Shift N Makefile Project with Existing Code Open File C Project case Chri S C Project Glose l Ctrl 5hift w 5 Project Save Gris Convert Eo CJ C 4 3 Project Save Os 6 Source Folder Save All Ghrl Shift 5 C Folder Revert n Source File E 7 aves K Header File m F2 File From Template Refresh F5 Class Convert Line Delimiters To E Task Print Ctrl F Other Ckrl N Switch Workspace Restart g 3 Import pa Export Properties Alt Enter Exit Figure 53 New C project e Assign any project name such as MAC Stack e Check Use default location to create the new directory in your previously chosen workspace e Choose Makefile Project as Project type e Select Other Toolchain
47. le values close to zero indicate a poor connection In the WSN Demo the number of routers and end devices is limited only by the network parameter settings www dresden elektronik de Page 20 of 66 User Manual Version 1 0 2013 02 28 deRFdevelopmentkit ZigBee 2 4 GHz 3 5 2 1 Overview WSN Monitor The WSN Monitor is the PC counterpart to the WSN Demo application and can be used to display ZigBee network topology and other information about a wireless sensor network A typical WSN Monitor screen is shown in Figure 16 It contains topology sensor data and node data views as well as application toolbars Serial port settings Connect Topology view Show additional data on the topology view Specific parameters for the selected node ini x WS Monitor WSNDemo File Window Help Logpackets Select Node Parameters ode param v Select link para v WSNDemo net view Parameter Value MessageType 0x01 NodeType 0x00 FullAddress AAAAAAAAAAAAAAAA ShortAddress 0x0000 SoflwareVersion 0x01010100 ChannelMask lox00008000 PaniD 0x0B8A WorkingChannel Ox0F ParentAddress OxF FFF Lal jo RSSI 0 Battery 0 00 Node History Battery Tempera Light ShortAddress LQ RSSI y o A Time Value 0x52D9 ho at 00 28 36 584 0x0000 Amem 0x0000 Orphaned
48. llaboration diagram for AVR Examples Application Examples e MAC based Examples Native Examples Modules ARM Examples deRFnative Button AVR Examples Implementation of the native demo application deRFnative Button deRFnative Button deRFnative I2C EEPROM deRFnatiwe 12C Sensors deRFnative I2C EEPROM deRFnative LED Implementation of the native demo application deRFnative EEPROM I2C deRFnative LowPower deRFnative_MotionDetection_Bli deRFnative_MotionDetection_Tr deRFnative_SPI_Flash deRFnative_SRAM deRFnative I2C Sensors Implementation of the native demo application deRFnative I2C Sensors deRFnative Temp deRFnative LED deRFnative USB Implementation of the native demo application deRFnative LED e SAMS Examples Figure 27 deRFgettingStarted Use the Main Page tab deRFdevelopment Modules Application Examples Native Examples select the desired platform and then click on the example Or use the Modules tab by clicking on it then click on the example you want to know details about Installation To install the examples please run the self extracting archive deRFnativeExamples_vx_xx exe from the delivered CD directory Packages deRFnativeExamples and specify any directory of your choice where you wish the files be extracted to 7 Zip self extracting archive Figure 28 self extractor running All examples are already pre compiled So you may directly proceed with flashing them into
49. n The MAC based examples from Atmel are installed during MAC stack setup You can get the IEEE 802 15 4 MAC stack software from the Atmel homepage http www atmel com tools IEEE802 15 4MAC aspx or from the delivered CD directory Packages MAC Software Description P IEEE 8072 15 41 MAC E 30MB updated June 2012 version 2 8 0 IEEE 802 15 4 MAC GU 17 7MB updated October 2011 e version 2 7 1 E IEEE 802 15 4 MAC Ri 43MB updated August 2011 version 2 6 1 The CD always contains the MAC stack version matching the deRFmacAddon Beware of getting a newer version from the Atmel homepage with more advanced features which might be incompatible with the deRFmacAddon While running the installer please choose a top level directory as installation directory e g C Mac as otherwise the path length may cause trouble This installation location is referred to as lt MAC root directory gt from now on Note Always execute the MAC stack setup first Note Choose a directory with a short name e g CAMAC After the MAC Software Package installation you can proceed with the installation of the deRFmacAddon The addon is also provided on the delivered CD under Packages MAC To install the deRFmacAddon run the installer deRFmacAddon for Atmel MAC vx x x Win32 Vx xx exe and choose the directory where you have installed the MAC software package before 7 Zip self extracting archive X Extract to D MAC C
50. n 8 bit AVR microcontroller with a 2 4 GHz transceiver The radio module s two 23 pin male connectors allow full access to all functions of the Atmega128RFA1 With the chip ceramic antenna distances of more than 200 m can be reached for line of sight conditions The integrated transceiver uses 128 bit AES encryption A serial 1 Mbit EEPROM offers high memory capacity e g for a firmware update over the air Figure 3 deRFmega128 22A00 top view The radio modules are labeled each with a marker on the bottom side 1x white 1x orange 1x yellow the colors stand for coordinator router and end device functionality Thus the different devices can be identified at the bottom side by their color Coordinator Router End Device Q Connecting the radio module to the deRFnode 2TNP2 is described in Section 4 2 1 For technical data and detailed information please refer to 2 and 3 www dresden elektronik de Page 9 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 4 2 deRFnode boards The deRFnode 2TNP2 is a demonstration and application platform for the AVR and ARM based dresden elektronik radio modules It supports AVR and ARM programming and communication over Serial and USB interface LEDs 1 3 top down Flash ELETE EEEN Pu Lj MR RETER ee ee ee ee ee FERREA Acceleration a a x P d N p i sensor uM t r gt Temperature _ sensor Supervisor ee ee
51. ng compiler tool chain for example AVRGCC or YAGARTO which provides everything necessary to compile application source code into binary images and e a programming device for example JTAG which may be used to program and debug the application on a target platform Atmel AVR Studio 4 can be used to develop and debug applications for AVR based platforms In AVR Studio each application has corresponding project files identified by the aps extension A project file contains the necessary information about build configuration The Eclipse IDE can be used to develop and debug applications for almost any processor type Due to Eclipse not being able to debug AVR processors using Atmel programmers dresden elektronik recommends the Eclipse IDE mainly for ARM based developments that is for the deRFarm7 deRFsam3 modules and deRFusb sticks However AVR developments can be carried out in Eclipse too but always need to be programmed using either a command line tool like avrdude or the already mentioned AVR Studio For more details and how to work with the Eclipse IDE please refer to Section 6 2 2 5 www dresden elektronik de Page 39 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 6 2 1 AVR development AVR development is often carried out in Atmel s AVR Studio or the newer Atmel Studio Both IDEs support AVR programmers and debuggers from Atmel and represent a full development environment for AVRs However AVR St
52. ning software packages and applications also possible restrictions comments or hints are given within this document 9 References 1 ZigBee Alliance http www zigbee org Specifications ZigBee Network T opology aspx 2 Datasheet Radio modules deRFmega128 22A00 22C00 3 User Manual Radio Modules deRFmega128 22A0x 22C0x BHB en pdf 4 Datasheet deRFnode 2TNP2 pdf 5 User Manual deRFnode_deRFgateway BHB en pdf 6 Datasheet deRFusb 23E00 JTAG pdf 7 User Manual deRFsoftware Programming Manual BHB en pdf 8 User Manual USB Radio Sticks deRFusb BHB en pdf 9 Atmel AVR2033 SAM ICE Adapter Hardware User Manual 10 Atmel AVR2052 Atmel BitCloud Quick Start Guide 11 Perytons Protocol Analyzer Overview http www perytons com files PerytonsAnalyzerOverview pdf www dresden elektronik de Page 65 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 dresden elektronik ingenieurtechnik gmbh Enno Heidebroek StraBe 12 01237 Dresden GERMANY Phone 449 351 318500 Fax 49 351 31850 10 Email wireless dresden elektronik de Trademarks and acknowledgements e IEEE 802 15 4 is a trademark of the Institute of Electrical and Electronics Engineers IEEE e ZigBee is a registered trademark of the ZigBee Alliance e Atmel Atmel logo and combinations thereof AVR ARM and BitCloud are registered trademarks or trademarks of Atmel Corporation or its subsidiaries e Perytons is a t
53. on Each board sends temperature light battery sensor readings to the coordinator which in turn sends it to the PC WSN Monitor displays the readings from onboard sensors within the tabs of the data view and next to a node icon inside in the topology view if the corresponding option is selected in the node link parameters from the quick settings toolbar The user can select any node in the topology view to monitor the node s activity and see the node data in one of three different forms e exttable e Chart e he onboard sensors data displayed next to each node in the topology view These values are also tipped with arrows indicating whether the value increased or decreased in relation to the previous sample A given node is selected when it is clicked on and a dashed frame is visible around it The same values are shown on the sensor data view enabling the user to observe how the values change over a period of time The sensor data view includes a sensor selection combo box Use the button on the sensor control toolbar to display the desired types of sensor data www dresden elektronik de Page 27 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 6 Developing custom network applications and programming In this section an introduction about the available native AVR examples and MAC based examples is given and it is explained how to develop custom applications using Atmel s BitCloud ZigBee SDK Furtherm
54. opment kit It has to be purchased separately www dresden elektronik de Page 41 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 PFA TCK j PF6 TDO E FS TMS VCC lt S DGND Figure 34 Pinout for 10pin AVR JTAG header 6 2 1 4 Connecting the target To program a device the programmer must be connected to the respective JTAG header and the target needs to be powered On the different dresden elektronik products several JTAG programming headers are available e 10 pin AVR JTAG header e 10 pin AVR JTAG mini header pin compatible Note Not all boards e g RCBs deRFmodules have a JTAG header In those cases an additional board may be required for providing this header e g Sensor Terminal Board deRFnode deRFbreakout Board Figure 35 AVR JTAGICE mkll connected to deRFmega128 plugged onto a deRFnode Note The blue cable is not required for programming It connects to a dresden elektronik USB level shifter stick to a PC for serial debug output Although not required a trace debug output connection is largely helpful for any embedded development www dresden elektronik de Page 42 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 6 2 1 5 Open a project in AVR Studio To open a project with AVR Studio the according aps file has to be opened This can be done by simply double clicking on it The following pictures show the AVR Studio views for
55. opmentkit ZigBee 2 4 GHz 3 2013 02 28 e he build process is the same either for ARM and AVR processors e he make program is doing all the build magic you just need a properly installed AVR and or ARM tool chain e To build another application just locate to the corresponding GCC folder generate all and clean target and double click all e The clean target deletes the binaries and objects generated e With the build successfully done you are now ready for downloading the application to your target www dresden elektronik de Page 61 of 66 User Manual oe deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 f Analyzer The analyzer variants of the deRFusb 23E00 or deRFusb 13E00USB radio sticks are optimally matched for Perytons professional network and protocol analysis software or Luxoft s free Bitcatcher 7 1 Perytons Analyzer The USB radio stick in the dresden elektronik development kit ZigBee 2 4 GHz is already programmed with a firmware for the Perytons analyzer To get the free 30 day trial it is necessary to click onto Perytons website http www perytons com downloads Here it is required to enter the contact information email address name phone number and organization and press SUBMIT A link to the download will then be sent to your email address With the valid 30 day trial license you can monitor network structures as well as observe data flows and runtime performance in de
56. opped mode i Preserve EEPROM contents when reprogramming device v Always activate external reset when reprogramming device v Print breakpoint information in output window Disable use of BREAK instruction for breakpoints i Enable 0 Debug Register IDA Yin rum mode Program Startup Entry function warm and break if not found of notin section comesponding to boot reset fuses Program Download C Always reprogram device when loading object file Only reprogram device if object file has changed C Don t reprogram device Restore Defaults Figure 46 Important JTAG programmer settings Preserve EEPROM contents Figure 47 shows the appearance of AVR Studio at the beginning of a debug session with the target halted at the program entry main E File Project Build Edit View Tools Debug Window Help SMa Ut BAGO Swims SAKES BY OOD i IraceDisabled XK ok 7 OM d Me Se eB s Processor param none return none Program Counter 000303 JE 3E 3E 3E 3E 3E JE 3E JE 3E 3E 3E 3E 3E 3E IE 3E 3E 3E JE 3E JE 3E 3E 3E 3E 3E 3E IE JE 3E IE 9E 3E 9E 3E 3E 3E 3E 3E 3E Stack Pointer Ox4 1FF aah REED X pointer x17EC S S SysInit Y pointer hel 1FF Z pointer Ok6C60 M 22 Cycle Counter 0 SYS RunTask Frequency L Stop Watch t ES Teel ie eof WSHDemohpp c Registers Figure 47 AVR Studio debug stop at application entry To run the application either use Go or single step through the diff
57. ore it is described how to connect additional sensors add more nodes and develop or evaluate the network functionality within ZigBee PRO Afterwards instructions for compiling debugging and flashing firmware of AVR based microcontrollers are given and the use and options of the deRFusb 23E00 JTAG analyzer is described 6 1 Software packages In the following sections application examples are described which have been developed by dresden elektronik The examples described in the first two sections belong to the categories of deRFnative and MAC based examples In Section 6 1 3 it is described how prototyping developing and debugging custom applications on top of the Atmel BitCloud application programming interface works This section demonstrates ZigBee technology running wireless sensor networks 6 1 1 Native examples The provided native examples demonstrate how to evaluate the deRFnode board features such as the available sensors buttons and LEDs see Figure 4 The native examples are running locally radio transmission is not involved However a suitable IDE a development tool chain and a programmer are required Example IDEs tool chains and programmers are described in Section 6 2 1 for AVR and Section 6 2 2 for ARM boards Native application examples Each of these applications demonstrates a special feature of a certain piece of hardware of dresden elektronik radio modules and related baseboards Basically all examples be
58. pful for any embedded development SAM ICE programmer m d a gt EEU A Ovir WO2 306505 mam kq potoisaag 1 1 LT SAM ICE adapter USB radio stick Figure 51 USB radio stick with SAM ICE adapter and programmer More technical background is given in 7 it describes in detail how to change the firmware on SAMSS based USB sticks from dresden elektronik www dresden elektronik de Page 54 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 6 2 2 5 Importing a project into Eclipse Setting up the Eclipse IDE is described in Section 6 2 2 1 Setting up the tool chain for ARM based MCUS is described in Section 6 2 2 2 This section describes how to import a package such as the MAC stack into the Eclipse workspace This import requires the following steps 1 Choose a workspace 2 Create a new project 3 Import the MAC stack into the workspace 4 Create build rules 5 Compile the application In the next parts of this section each step is described in more detail After unpacking the Eclipse IDE and starting it for the first time a workspace location has to be chosen If you check the Use this as the default and do not ask again option this dialog will not appear again but you still can switch workspaces via the Eclipse menu commands e Open the Eclipse IDE e Choose a workspace directory Workspace Launcher E Select a workspace Eclipse stores your pro
59. ppears after a few seconds File Window Help i C Log packets Selectnode param v Select ink para Node Parameters WSNDemo net view Orphaned Modes Nodes list Modes Hodes 1 Orphaned 0 Connected 1 Figure 24 Connected to WSN Demo coordinator 5 2 4 Network startup The coordinator organizes the wireless network automatically Upon starting each node informs the network of its role When the coordinator is powered on it switches to an active state even though no child node is present This indicates that the coordinator is ready and that child nodes can join the network with the coordinator s extended PAN ID which is recognized by all routers www dresden elektronik de Page 25 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Starting up router and end device e Insert always three batteries in the battery box of router orange marker and end device yellow marker e Getthe jumper in the right position here battery powered see Section 4 2 Figure 25 Jumper position e Watching the LEDs you can get information about the connection to the coordinator Note that the end device may sleep and be in a switched off state for some seconds see Table 2 e The upper LED shown in Figure 4 is blinking after connection and is permanently switched on after configuration procedure e After a short time all devices are connected and appear in the WSN Monitor File Window Help
60. rademark of the Perytons Ltd e Windows and others are registered trademarks or trademarks of Microsoft Corporation in U S and or other countries All trademarks are registered by their respective owners in certain countries only Other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such Disclaimer This note is provided as is and is subject to change without notice Except to the extent prohibited by law dresden elektronik ingenieurtechnik gmbh makes no express or implied warranty of any kind with regard to this guide and specifically disclaims the implied warranties and conditions of merchantability and fitness for a particular purpose dresden elektronik ingenieurtechnik gmbh shall not be liable for any errors or incidental or consequential damage in connection with the furnishing performance or use of this guide No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or any means electronic or mechanical including photocopying and recording for any purpose other than the purchasers personal use without the written permission of dresden elektronik ingenieurtechnik gmbh Copyright 2013 dresden elektronik ingenieurtechnik gmbh All rights reserved www dresden elektronik de Page 66 of 66
61. rect Traff sse H E ATB6RF231 AT32UC3L064 Rz600 UCSLEK H 6 Basic Sensor Network Stay here we need a amp ATS6RF231 AT915AM3S4B deRFusb 23E00 H ATS6RF212 AT32UC3B11 t Check kit documentat ATS6RF231 AT915AM354B deRFusb 23E06 ATS6RF212 AT32LIC3LO6 and to store it into H E ATS6RF231 AT915AM3S4C SAM3SEK ATS6RF212 AT915AM354 uq ATS6RF231 AT91SAM75256 deRFusb 24E001 gt ATS6RF212 AT915AM3S4 sse pal alert jee ATS6RF231 AT915AM7X512 deRFarm7 25X00 deRFgateway 1XXX2 gt ATS6RF212 AT915AM354 ss xq amp descriptors ATS6RF212 AT91SAM7S2 E E Gcc gt ATS6RF212 AT915AM 7X5 0 Initialize LEDs xq bin gt ATS6RF212 AT915AM 7X5 pal led init 3 m H E ATS6RF231 AT915AM7X512 deRFarm 25X00 deRFnode 1XXX2 ATB6RF212 AT915AM7X5 pal led LED ROOT LED OFF H E ATB6RF231 AT915AM7X512 deRFarm7 25x00 deRFtoRCB H E ATS86RF212 AT91S5AM7X5 pal led LED DATA TX LED OF ATS6RF231 AT915AM7X512 deRFarm 7 25X00 deRFtoRCB BREAKOUT H ATS86RF212 AT91SAM7X5 pal led LED DATA RX LED OF ATS6RF231 AT915AM7X512 deRFarm 7 25X00 deRFtoRCB SENS TERI AT86RF212 ATMEGA1281 ATS6RF231 ATMEGA1281 RCB 4 0 PLAIN H E ATB6RF212 ATMEGA1281 TP H E ATB6RF231 ATMEGA1281 RCB 4 0 SENS TERM BOARD gt ATS6RF212 ATXMEGA12 The stack is initialized ATS6RF231 ATMEGA1281 RCB 4 1 PLAIN ATS6RF212 ATXMEGA25E here X H E ATS6RF231 ATMEGA1281 RCB 4 1 SENS TERM BOARD He ATS6RF230
62. rocontroller and board and RF transceivers based on a new architecture This allows easy portability across various platforms and transceivers and configurability to improve resource usage IEEE 802 15 4 MAC Software Package features e Allows a highly flexible firmware configuration to adapt to the application requirements e Supports different microcontrollers and platforms boards e Supports different IEEE 802 15 4 based transceivers and single chips e Allows easy and quick platform porting e Provides project files for two supported IDEs IAR Embedded Workbench Atmel AVR Studio WinAVR e Supports star networks and peer to peer communication e Supports non beacon and beacon enabled networks The IEEE 802 15 4 MAC Software Package used comes with the complete source code The license conditions only limit its usage to a combination with any Atmel radio hardware MAC based application examples This kind of examples is to be used in combination with the IEEE 802 15 4 MAC stack They involve different modules provided by the stack like the Platform Abstraction Layer PAL You can find these examples under MAC root directory Applications in the respective sub directory of the highest used stack layer www dresden elektronik de Page 31 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 BSP Poll All Sensors Highest stack layer BSP This example shows how to use the Board Support Package for d
63. s the programming dialog is opened Detecting on USB JTAGICE mkll found on USB Figure 39 Choosing device and programming method JTAG www dresden elektronik de Page 44 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Under the Input Hex File field you can choose the program file for the device JTAGICE mkII in JTAG mode with ATmega128RFA1 E Ioj x Bits Advanced HW Settings HW Info Auto Hash C Use Current Simulator Emulator FLESH Memory Input HEX File 22X00 deRFnode 22 000 GCC deRFnative C 9 EEPROM C Use Current Simulator Emulator EEPROM Memory Input HEX File ELF Production File Format Input ELF File Save From FLASH v EEPROM FUSES LOCKBITS fuses and lockbits settings Program Save saving ta ELF eee ee IOM Figure 40 Choose programming file Note If programming fails ensure device and programmer are powered as well as device drivers have been installed properly Also check if the JTAG connector is connected in the right direction oubsequently some important so called fuses of the AVR device have to be set The fuses are configuration options and determine the way the AVR is generating its CPU clock getting its program memory contents and so on The fuse settings can differ for each application so please refer to the applicationReadme txt for the correct fuse settings Attention Do not experiment with
64. s may not be used to program AVR devices and vice versa 3 A programmer is not contained in any development kit It has to be purchased separately 4 For programming deRFusb radio dongles a SAM ICE adapter may additionally be required 5 Some SAM3 based deRFusb radio dongles do NOT have a JTAG connector soldered In this case JTAG programming debugging requires the connector to be soldered manually Pure firmware programming may be done over the USB interface VCC VCC S a o eok GND Figure 49 Pinout for 20pin ARM JTAG header 6 2 2 4 Connecting the target To program a device the programmer must be connected to the respective JTAG header and the target needs to be powered On the different dresden elektronik products several JTAG programming headers are available e 10 pin combined JTAG Debug header e 20 pin ARM JTAG header Note Not all boards e g deRFmodules have a JTAG header In those cases an additional board may be required for providing this header e g deRFnode deRFgateway deRFbreakout board www dresden elektronik de Page 53 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 Figure 50 SAM ICE connected with deRFarm7 plugged onto a deRFgateway Note The blue cable is not required for programming It connects to a dresden elektronik USB level shifter stick to a PC for serial debug output Although not required a trace debug output connection is largely hel
65. t the chip ceramic antenna points to the outside of the node board eeaneaeaad teeeeeeeee Yrs Sui iagi a AE AA y gt PLLLELLIEETETET a a a E MO f PAA BAA HW AR 7 Tre Der Hats Dente DD toe ey Dee RH lege MA 05 I ar ag ni deRFmega 28 22A001 LP B SN 28182 0053 1959 MAC 00 50 C2 FF FF 18 82 BC FCC XVV MEGA22A00 a O TD X M ADD UAE Un DLE Ese LE SOUS WAP w QMUN ae WO EO MES FN oi ht BSISSRENNNREEI Figure 6 deRFnode with mounted radio module To remove a radio module from the deRFnode board use the deRFextract tool see Section 4 4 www dresden elektronik de Page 11 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 4 3 deRFusb 23E00 JTAG radio stick Included in the development kit is a freely programmable USB radio stick with JTAG interface and preprogrammed analyzer firmware for the Perytons Network Analyzer For more details about this Network Analyzer software please refer to Section 6 2 2 and Section 7 The deRFusb 23E00 JTAG contains a Cortex M3 microcontroller with 256 kBytes high speed flash and a 2 4 GHz ISM band transceiver With the integrated chip antenna distances of more than 200 m can be achieved for line of sight conditions The radio stick is equipped at its rear side with a 10 pin connector for development purposes JTAG and Debug and three LEDs for status indication The radio stick is labeled
66. tail without additional effort Especially during the development phase this protocol analysis software will serve as an essential and valuable tool Compared to other analyzer tools the dresden elektronik USB radio stick facilitates synchronous sniffing of all 16 channels The analyzer is operating with an accuracy of 1 us Time view Network view Statistics chart Araw Cilla S r a Statistics Charts Chat lt All gt y 9 Time View Grouping 225 GoTo 0 X M 4 O 8 Network IndecW All v A X Message Tree View ERES Hex Data dy Message Tree View Bh Dog View Message view Message tree view Hex packet data functional analysis detailed analysis Figure 61 GUI analyzer overview www dresden elektronik de Page 62 of 66 User Manual x e deRFdevelopmentkit ZigBee 2 4 GHz The analyzer software of Perytons supports a number of standard protocols such as for example ZigBee ZigBee RF4CE 6BLOWPAN ZigBeelP IEEE 802 15 4 MAC or proprietary protocols For more information about the analyzer GUI please refer to the Perytons Protocol Analyzer Overview 11 All three Perytons software versions are supported for the IEEE 802 15 4 radio range Number of required USB sticks Peryton S__ Single channel analyzer Like S with antenna diversit Peryton M Multi channel analyzer Channels 1 Start the Perytons Analyzer via t
67. tallation is not required Debug Plugin Debugging is an optional feature If required and when working with the Eclipse IDE it is recommended to install the Zylin plugin 1 Change to the eclipse extract path start eclipse exe by double clicking 2 Goto the Help Menu select Install New Software 3 Click the Add button enter the URL http www zylin com zylincdt in the location field assign a name and confirm the dialog with OK 4 n the parent window enable the checkbox for Zylin Embedded CDT continue with a click to Next After a dependency check the download will start 5 Wait until the download completes then accept the license conditions and confirm the security warning 6 Wait until the installer completes 7 Confirm to restart the IDE for applying changes The second step is to install an application which interfaces the Eclipse IDE with the debugger programmer In this case it is required to download and to install the Segger Tools Flash Tool Uploading the firmware to the target requires additional software When using the SAM ICE programmer as suggested SAM BA is required The latest version can be downloaded without registration here Afterwards start the installer and follow the given instructions www dresden elektronik de Page 51 of 66 User Manual Hob uA deRFdevelopmentKit ZigBee 2 4 GHz 3 2013 02 28 6 2 2 2 Tool chain setup for ARM based MCUs The following section des
68. tallation wizard 1 The next step is to manually choose the directory where the driver files are located To do so please select Install from a list or specific location Advanced Found New Hardware Wizard This wizard helps you install software for deRFnode C If your hardware came with an installation CD lt 6 or floppy disk insert it now What do you want the wizard to do C Install the software automatically Recommended tent ee eee e eee e eee eeeee eee eee eee eeeeeEe EEE EEEEEESESEEEEEEESESSESESESEESESSESSEEEE SESE EEEEESEE TEER E ES Click Next to continue lt Back Cancel Figure 14 Installation wizard 2 www dresden elektronik de Page 18 of 66 User Manual x e deRFdevelopmentkit ZigBee 2 4 GHz All necessary files can be found in the Driver directory on the delivered CD Attention Do not get confused if the installation procedure starts twice This is necessary since both drivers for generic USB access and drivers for a virtual COM port have to be installed Driver installation under Windows 7 Editions Connect the deRFnode to the PC Windows 7 will not install a driver for it and mark the device with an exclamation mark in the Device Manager You have to choose the driver manually To do so please open e Control Panel System and Security Device Manager Q3 L Update Driver Software deRFnode Browse for driver software on your computer Search for driv
69. terface RS232 connector RS232 transceiver 6 pin connector MES MA ITIN g m 20 pin connector 10 pin connector Figures 10 SAM ICE adapter components and attached to deRFusb 23E00 JTAG stick For more information please refer to 9 www dresden elektronik de Page 14 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 4 6 Accessories 4 6 1 Cables Three USB cables each with a standard A and B plug are included Though not required in a typical application router might be mains powered and end device powered by batteries the USB connection is very helpful during development providing USB power to the board and allow communication with the application e g for debugging 4 6 2 CD content An overview of the CD content structured in four root directories is given below Name Deseripion 3rdParty Contains different tools and applications from third party vendors necessary Doc for proper working Contains comprehensive documentation files such as data sheets for products of dresden elektronik and Atmel Corporation measurement reports and certification grants product overview dresden elektronik wireless products schematic files manuals and documentation of the wireless modules Contains necessary USB drivers Packages Contains software packages for ZigBee BitCloud deRFnative examples MAC layer Perytons analyzer and deCONZ tool Table 1 Development
70. the fuses as you might destroy important information on the target e g erase the EEPROM content by disabling the EESAVE fuse or even lock yourself out from any further programming actions e g disabling the JTAGEN fuse The fuse settings in the following picture are only applicable for the BitCloud WSN Demo application www dresden elektronik de Page 45 of 66 User Manual x e deRFdevelopmentkit ZigBee 2 4 GHz JTAGICE mkII in JTAG mode with ATmegai28RFA1 E nl x BODLEVEL Brown out detection at VCC 1 8 V OCDEN JTAGEN SPIEN WDTON EESAVE BOOTSZ Boot Flash size 4096 words start address F000 BOOTRST CKDIV8 CKOUT SUT CKSEL Int RC Osc Start up time 6 CK 65 ms gt M Auto read M Smart wamings v Verify after programming Program Verify Setting devi ce parameters OK Entering programming mode OK Reading fuses address Oto 2 kE x31 OxFE OK Leaving programming mode OK Fl Figure 41 Important settings on Fuses tab Chose all necessary fuses in the window and press the button Program to set the fuses in the AVR device After the fuses are programmed verification is recommended This can be done automatically by checking the Verify after programming option If activated as in Figure 41 the reading fuses OxE2 0x91 OxFE OK informs of the successfully programmed fuses If you do not intend to debug you application the pro
71. u Qx1E13 Orphaned Nodes Nodes list Nodes PrN Nodes 3 Orphaned 0 Connected 3 I CRD k r Router I OxD66De ___ l Short address I ie E End device l Li l i GL Coordinator selected node i M E13 OxO000 Figure 21 Topology view 5 2 2 Node timeouts The Window Preferences menu of WSN Monitor contains a number of parameters used to control application behavior Timeouts are used to tune visualization of coordinator routers and end devices as the nodes disappear from the network each time a connection is lost power is down or a reset has occurred A node timeout corresponds to the time the WSN Monitor waits for a packet from a particular node before assuming that the node is no longer part of the network Note that this value does not correspond to the frequency with which data are transmitted by each type of device To get smooth topology visualization setting timeouts to 20 seconds is recommended for coordinator and router and 30 seconds is recommended for an end device Assuming a default application configuration these timeouts cover three periods between sending a packet and so at least three packets would need to be lost before a node is removed from the WSN Monitor topology view www dresden elektronik de Page 23 of 66 User Manual x e deRFdevelopmentkit ZigBee 2 4 GHz 2 Preferences di Nodes Coordinator timeout 20 e t di WSNDema Rout
72. udio 4 requires the installation of some AVR tool chain for compilation dresden elektronik recommends the WinAVR tool chain The newer Atmel Studio already includes the compiler and debugger for AVRs and can therefore be used as single installation development environment For features and supported programmers please refer to Atmel s homepage Developing for different module types e g AVR and ARM switching the development environment can be cumbersome dresden elektronik again recommends the Eclipse IDE for those situations despite the AVR debugging limitation To get a deeper insight into the programming options for AVR and ARM devices the required tools and processes please refer to 7 6 2 1 1 Setup IDE The AVR Studio is a free IDE from Atmel Corporation To install it follow these steps 1 Run the AvrStudio419Setup exe from the delivered CD 8rdParty Atmel or download the latest version of AVR Studio 4 from the Atmel homepage http www atmel com tools studioarchive aspx tab zoverview Note The newer Atmel Studio versions 5 6 and above are not supported by dresden elektronik Software Description m AVR Studio 5 1 build Installer Full Rn 616MB updated February 2012 E AVR Studio 5 0 build 1163 Installer Full QU 631365512 updated July 2009 AVR Studio 4 19 build 730 QE 130984720 updated September 2011 Optionally the Eclipse IDE may be used in parallel or instead Besides many other features it
73. ve Temp Platform AVR This application demonstrates the native access to the temperature sensor either on MCU or platform It supports RCBs the Sensor Terminal Board and deRFmega128 radio modules where it reads out the value from temperature sensor and prints the result to terminal Button presses restart the procedure If you want use the temperature sensor which is provides on deRFnode or deRFgateway platform please see example application deRFnative I2C Sensors deRFnative USB Platform AVR ARM7 SAM3 The native example demonstrates the USB access Each byte which has been read from the USB channel is sent back with a prefix For deRFmega128 modules USB works in conjunction with an FTDI chip This is provided on either the Sensor Terminal Board or the deRFnode board for AVR For deRFarm7 boards the native USB interface is used This requires a deRFnode board for ARM or a deRFgateway For the deRFsam3 boards the native USB interface is used too www dresden elektronik de Page 29 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz For further descriptions details please refer to the documentation on the delivered CD amp e www dresden elektronik de shop media deRFkitCDy1 2 1 Doc GettingStarted html group avr examples html F dresden elektronik l deRFdevelopment v e Main Page Related Pages Modules v deRFdevelopment AVR Examples Main Page Related Pages Native Examples Modules Co
74. w of the parts contained in the deRFdevelopmentkit ZigBee 2 4 GHz e JE d Lu fam gt n aa l l 3 Won o m 2l 7 D PRETETLITIETITILi te a E e eee eee l1 Figure 2 ZigBee development kit content www dresden elektronik de Page 7 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 The kit consists of e 3 x radio module deRFmegal128 22A00 with markers on their bottom side 1x white 1x green 1x orange e 3x development board deRFnode 2TNP2 e 1x USB analyzer stick Perytons deRFusb 23E00 JTAG 2 4 GHz e 1x deRFextract Tool e 1x SAM ICE adapter e 1x Kit CD with extensive software package and documentation e 3x USB cable each with standard A and B plug Features e Development environment for ZigBee applications e Designed for frequency range of 2 4 GHz e Support for user specific sensors the connection of own sensors nodes is possible e Kit CD with many software examples documentation and necessary drivers e Analyzing tool for IEEE 802 15 4 ZigBee and ZigBee profiles e Example applications for ZigBee PRO e Freely programmable USB radio stick www dresden elektronik de Page 8 of 66 User Manual ns deRFdevelopmentkit ZigBee 2 4 GHz 3 4 Hardware description 4 1 deRFmegal 28 radio modules The pluggable compact radio module deRFmega128 22A00 includes Atmel s single chip ATmegai28RFA1 microcontroller which combines a
75. your target www dresden elektronik de Page 30 of 66 User Manual Pone deRFdevelopmentkit ZigBee 2 4 GHz 3 2013 02 28 To select a pre compiled binary first chose your application than your target platform and within the target platform directory open the GCC bin sub directory Here you will find the according binary either in HEX format for AVR or in BIN format for ARM For flashing the firmware to your device please refer to Section 6 2 6 1 2 MAC based examples Working with the MAC based examples requires the availability of the IEEE 802 15 4 MAC ooftware Package a suitable IDE a tool chain and a programmer Please refer to Section 6 2 1 and Section 6 2 2 for examples The MAC examples are based on the IEEE 802 15 4 MAC Software Package provided by Atmel Corporation The MAC layer simplifies the programming procedure by providing all the required HF functions and a lot of example applications for the different features of the Atmel radio transceivers The deRFmacAddon extends Atmel s MAC Software package with the deRFnode board features and additional example applications Overview IEEE 802 15 4 MAC The IEEE 802 15 4 standard defines the protocol and compatible interconnection for data communication devices using low data rate low power and low complexity short range radio frequency RF transmissions in a wireless personal area network WPAN Atmel developed the MAC stack software for different target platforms mic

Download Pdf Manuals

image

Related Search

Related Contents

  PDF Version - The Munich Network Management Team  【技術名称】2−2−2  BACKUP-DA 取扱説明書 - 株式会社日立ケーイーシステムズ    R E PAIR PARTS MANUAL  Vehicle Programming Instructions  ro drinking water system model tfc - 435  Descargar    

Copyright © All rights reserved.
Failed to retrieve file