Atmel AVR2070 Application Note
Atmel AVR2070 Application Note

Atmel AVR2070 Application Note

Route under mac (rum) with ipv6 and 6lowpan
Table of Contents

Advertisement

Quick Links

AVR2070: Route Under MAC (RUM) with IPv6

Features

• A FREE 802.15.4 networking solution
- Multi-hop Route Under MAC (RUM)
- All Atmel IEEE 802.15.4
®
- Many AVR
microcontrollers supported
• Completely Customizable Firmware
- Ready to use as the basis for a wireless product
- Standalone MAC data layer for small memory footprint
- Optional IPv6/6LoWPAN Interface layer provides worldwide wireless
connectivity over the IPv6 internet

1 Introduction

Wireless Sensor Networks (WSN) have become a low power, low cost means for
communicating data between sensor devices dispersed over an area. Many of
these applications call for small embedded wireless networking solutions to
substantially reduce the cost of all required components. Atmel
MAC (RUM) with support for IPv6 and 6LoWPAN is a highly flexible stack solution
for these low cost applications. Providing Internet Protocol (IP) over low power, low
data rate wireless transceivers enables immediate interoperability with existing
wired networks. With an IPv6 foundation, each wireless node on the network can
be given a worldwide unique IPv6 address and directly communicate with any other
IPv6 device in the world without the need for any translation or a complex gateway.
Free to Atmel customers, the Atmel RUM/6LoWPAN networking stack proves to be
a ready and cost-effective solution for Wireless Sensor Networks.
and 6LoWPAN
TM
transceivers supported
MCU Wireless
Solutions
Application Note
®
's Route Under
Rev. 8240B-AVR-06/09

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AVR2070 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Atmel AVR2070

  • Page 1: Features

    IPv6 address and directly communicate with any other IPv6 device in the world without the need for any translation or a complex gateway. Free to Atmel customers, the Atmel RUM/6LoWPAN networking stack proves to be a ready and cost-effective solution for Wireless Sensor Networks.
  • Page 2: Stack Architecture

    Self-healing network. Nodes re-associate upon a failure to communicate. • Multi-hop routing. Nodes can be multiple hops away from the coordinator. • Source Code Included. Free for use and free to modify if used with Atmel hardware. • Designed to be a base platform for customer applications.
  • Page 3: Overview Of Rum

    AVR2070 2.1 Overview of RUM A RUM network is constructed around a coordinator. The coordinator is the only node that keeps any state information about the network, so that the other nodes do not have to store any network information. This allows for low cost hardware for both routers and end-nodes which comprise the bulk of the network.
  • Page 4: Supported Hardware Platforms

    See the documentation included with the source code for implementation details. 2.3.1 AT91SAM7X-EK The Atmel AT91SAM7X-EK evaluation kit can be purchased from a local Atmel distributor. This evaluation kit embeds an AT91SAM7X256 microcontroller which contains an Ethernet peripheral. By obtaining any of the AT86RF2xx transceivers, the platform can be assembled to operate as a RUM coordinator and/or IPv6 edge router.
  • Page 5: Raven Usb

    AVR2070 2.3.3 Raven USB This is the USB stick that comes with the ATAVRRZRAVEN kit. This board has an AT90USB1287 microcontroller, which includes a built-in USB interface. Building for the RAVENUSB platform includes the driver code for the CDC-USB interface.
  • Page 6: Avr Rum Quickstart

    In order to operate the RUM demo application, make sure one of the platforms described in this document has been selected, or that a custom platform has been properly defined in the hal_avr.h file. Also the use of an Atmel JTAGICE mkII or AVRISP programmer will be required to program the target microcontroller.
  • Page 7 AVR2070 Figure 3-1 AVR Studio RUM Project Options Figure 3-2 AVR Studio RUM Compile Flags 8240B-AVR-06/09...
  • Page 8 RUMSLEEP flag includes code to wake up end nodes and put them to sleep. WDOG_SLEEP Setups the Watchdog timer to act as the timing source for the sleeping operation. Note: If set to 0, sleeping relies on an external 32.768KHz crystal. AVR2070 8240B-AVR-06/09...
  • Page 9 AVR2070 Option Name Possible values Meaning IPV6LOWPAN Compiles in 6LoWPAN functionality, which gives each node in the network a world- unique IPV6 address, and formats packets according to RFC4944. Without this option, smaller RUM-only frames are used. SENSOR_TYPE 0 (None)
  • Page 10: Build Sizes

    These fuse settings can be entered into the target of choice using AVR Studio or AVR Dude for command line operation. Raven (1284p): 0xFE; 0x91; 0xE2 Raven LCD (3290p): 0xFE; 0x91; 0xE2 Raven USB: 0xFB; 0x99; 0xDE ZigBit/ZigBit900: 0xFE; 0x91; 0xE2 AVR2070 8240B-AVR-06/09...
  • Page 11: At91Sam7X-Ek Rum Quickstart

    AVR2070 4 AT91SAM7X-EK RUM Quickstart The Atmel RUM protocol is integrated to run on the AT91SAM7X-EK board which contains an AT91SAM7X256 microcontroller. Additionally, the IPv6/6LoWPAN layers can be compiled in. Compiling in the IPv6 layer will allow the SAM7X platform to act as an IPv6 Edge Router in addition to an 802.15.4 PAN Coordinator.
  • Page 12: Utasker Patches

    5. Copy these files to the same directory containing the uTasker OS with SP4 (eg. C:\project\... should contain these two files plus uTasker directory). 6. Using Windows Explorer, double click the .bat file to patch the uTasker source for use with RUM. Note: Only run this patch procedure once. AVR2070 8240B-AVR-06/09...
  • Page 13: Radio Interface

    AVR2070 This project should now include the original uTasker OS, SP4, and RUM patch files. A test compile can now be tried using the IDE of choice. Appendix D explains two common IDE’s that can be configured to compile uTasker with RUM support.
  • Page 14: Firmware

    To use the USB connection on a PC running Microsoft Windows, a Windows USB driver must be installed. This USB driver is titled uTaskerAtmelVirtualCOM.inf and downloaded from uTasker website site www.utasker.com/software/softwareV1.3.html and complete documentation can be found at www.utasker.com/docs/uTasker/uTaskerV1.3_USB_Demo.PDF. However, AVR2070 8240B-AVR-06/09...
  • Page 15: Network Interfaces

    AVR2070 the source code and precompiled code have USB disabled. Due to limitations on the SAM7X board, if a reset is necessary, the USB cable must be removed and any open USB terminal sessions closed and then the board can be reconnected and the USB terminal session restarted.
  • Page 16: Loading The Program

    AT91SAM7X256. The .bin file can be found in the \bin folder of the source code package. Note: The FLASH tab is selected as the image needs to be loaded into the flash location of the AT91SAM7X256. Be sure the FLASH address is set to 0x100000. AVR2070 8240B-AVR-06/09...
  • Page 17: Simple Web Interface

    AVR2070 Figure 4-6-2 SAM-BA File Selection Once the image has been selected in the “Send File Name” field, connect the SAM- ICE JTAG unit to the AT91SAM7X-EK development board. Power on the target and press the “Send File” button. The programmer will begin communication with the AT91SAM7X-EK board and a lock region message should pop-up shown in figure 4-6-3.
  • Page 18 Additionally, a node can be pinged via its short address. Simply enter the hexadecimal address into the ping address box and click the ping button. Figures 4-7-1 and 4-7-2 show both pages of the simple web interface. Figure 4-7-1 Simple Webserver Main Page AVR2070 8240B-AVR-06/09...
  • Page 19: Sd File Handling

    AVR2070 Figure 4-7-2 Simple Webserver Network Table 4.8 SD File Handling The maximum size of SD card is 2 GB. The card should be formatted as FAT32. Note that the SD file handling is rudimentary. Users needing more advanced file handling can adapt the system as source code is available.
  • Page 20: Running The Rum Demo

    The telnet and serial menu selections are meant to be self descriptive however a more detailed description is offered here. Note: Many of these are only available with the compile flag APP=SENSOR. Also, for the ARM some of these require the compile flag IPV6LOWPAN=1. AVR2070 8240B-AVR-06/09...
  • Page 21 AVR2070 Table 5-1 ARM Telnet Menu Commands ASCII Command Description a (lowercase) IP Address. This is the current IPv4 address of the SAM7X. A (uppercase) IPv6 Address. This is the IPv6 address that has been self configured or configured as a result of connecting to a true IPv6 router.
  • Page 22 Note: This only works for AVR based devices Wake. If a node has been loaded with code that allows sleep (SLEEP=1) then it must be woken up before it can respond to commands such as “r”. AVR2070 8240B-AVR-06/09...
  • Page 23: Running The Ipv6 Demo

    AVR2070 6 Running the IPv6 Demo This demo requires the AT91SAM7X-EK to be used as the PAN Coordinator, due to the Ethernet interface available on the board. The demo is separated into four parts. The first is the ‘ping’ demo which simply verifies IPv6 network connectivity. The next is the ‘UDP’...
  • Page 24 IPv6 support enabled. Then try to ping the node: ping6 2001:db8:1e1:1:baad:ff:fe00:1 Several ping replies should be seen, along with an LED blink for each ping on the node. This validates that the 6LoWPAN / IPv6 network is working as expected. AVR2070 8240B-AVR-06/09...
  • Page 25: Using The 6Lowpan / Ipv6 Code On End Nodes

    AVR2070 6.3 Using the 6LoWPAN / IPv6 Code on End Nodes The 6LoWPAN / IPv6 API is documented using the Doxygen documentation system. What follows is an overview of how the example application works, and is not the full API documentation. Refer to Appendix C for the entire API documentation.
  • Page 26: Commands On Port 61616

    As an example connect to the node with netcat6 on port 61616. For these examples <enter> means to press enter, and anything that is underlined is a response back from the node. C:\> nc6 -u 2001:db8:1e1:1:baad:ff:fe00:1 61616 <enter> T<enter> T22.5 H<enter> AVR2070 8240B-AVR-06/09...
  • Page 27: Commands On Port 61618

    AVR2070 A<enter> A1<enter> A<enter> HTL<enter> H50T22.5L50 A0A<enter> This also demonstrates how multiple commands could be sent at once. The sensor always sends its packets back to the source port specified in the original packet. Note If a response is not received, try sending either the 'A1' or 'A0' command to turn on and off the LED.
  • Page 28: Sensor App Example

    The RUM example described in section 5 uses the RUM networking layer to pass messages around. This allows end nodes to communicate with the coordinator to exchange sensor readings, calibration data, etc. With IPv6 support enabled however, these messages can then be passed along an IPv6 link instead. AVR2070 8240B-AVR-06/09...
  • Page 29: Tftp Bootloading

    AVR2070 By passing the messages over an IPv6 link, it does not matter if the sensors communicate directly with the coordinator or with some other computer. As well multiple sensor networks could report to a single coordinator device, even if that coordinator is physically located far away from the other networks.
  • Page 30: Sleeping Nodes

    5. normal 6LoWPAN applications SIXLOWPAN_PERIODIC_TIME SIXLOWPAN_PERIODIC_APP_TIME are set in the sixlowpan_application_init() function. They can also be changed at run-time, for instance to switch to shorter sleep intervals during certain times of the day when power is abundant. AVR2070 8240B-AVR-06/09...
  • Page 31: Appendix A - Route Under Mac (Rum) Protocol

    AVR2070 Appendix A - Route Under MAC (RUM) Protocol A.1 Overview This appendix outlines the scheme used by RUM for implementing a route-under network, where the routing of network packets is done at the MAC layer. This has a number of advantages: •...
  • Page 32: Implementation Details

    3. In event of a tie with hops, pick the highest RSSI value for the link. Note: If the compile flag DEMO is set, these criteria above are altered to only find the best RSSI during association. This provides a mechanism to demonstrate multi-hop routing. AVR2070 8240B-AVR-06/09...
  • Page 33: Router Node

    AVR2070 Figure A-4-2 Direct Association Message Sequence End/Router Node Pan Coord Node Association Request Association Response The node then associates to its parent as illustrated in figure A-4-2 (above): The node sends an Association Request packet to the chosen router (or coordinator).
  • Page 34 “my” denotes the router’s point of view. • If the final destination address is my child node, then send the packet to the child. • If the frame was sent from my child node, send the packet to my parent. AVR2070 8240B-AVR-06/09...
  • Page 35: Coordinator Node

    AVR2070 • If neither of the above conditions apply, then send the packet to the last routed address used for sending (which was stored from a routing frame). 4. If an association response is received with the router's short address as parent, then add the child node to a table of child nodes and short addresses, and forward the association response to the new child node.
  • Page 36: Examples Of Network Operation

    A.5 Examples of network operation For the following examples, see Figure A-5-1. Note that IEEE 802.15.4 headers are variable-length, with some fields omitted depending on the value of the various fields within the FCF. AVR2070 8240B-AVR-06/09...
  • Page 37: Example 1 - End Node Connecting To Coordinator

    AVR2070 Figure A-5-1 Example Network Commissioning Diagram SA: 0x0000 SA: 0x0002 (always) SA: 0x0003 SA: 0x0004 SA: 0x0005 SA: 0x0006 SA: 0x0007 Legend: C = coordinator Rn = Router En = End node SA = Short address FCF - Frame Control Field, see IEEE 802.15.4 Spec.
  • Page 38: Example 2 - Router R1 Connects To Coordinator C

    R1 selects C as it is the only available network, and sends an association request. Table A-5-6. Association request (direct) R1 FCF –assoc req C SA R1 MAC addr Parent SA Type 0xC863 0x1234 0x0000 0x3333444455556666 0x0000 0x02 AVR2070 8240B-AVR-06/09...
  • Page 39: Example 3 - Router R3 Connects To Coordinator C

    AVR2070 C sends association response. Table A-5-7. Associaton response (direct) FCF – assoc rsp E1 MAC Coord SA MAC Cmd R1 SA 0x8C63 0x1234 0x3333444455556666 0x0000 0x0003 R1 stores two addresses: Parent (coord) SA and R1 SA. A.5.3 Example 3 – Router R3 connects to Coordinator C This example is identical to example 2, except that R3 receives a beacon from R1 as well as C.
  • Page 40: Example 5 - End Node E2 Connects To Network

    R2 notices that the new node's parent is R2, and sends a “direct association response” packet to E2, and stores E2's SA in its child table. Table A-5-17. Association response (direct) R2 FCF – assoc rsp E2 MAC addr R1 SA E2 SA 0x8C63 0x1234 0x887766... 0x0003 0x0007 AVR2070 8240B-AVR-06/09...
  • Page 41: Routing Packets

    AVR2070 A.6 Routing packets There is a special packet used to create a route for a packet leaving the coordinator toward any router or end node. Each router node keeps track of the last address it sent a routing packet to, and will send each later (non-routing) packet from its parent to the same address (unless the packet is addressed to a child node).
  • Page 42: Packet Formats

    Table A-7-1. Pre-defined packet types Type MAC CMD Beacon request 0x0803 Beacon 0x8000 Association Request- direct 0xC863 Association Request- indirect 0x8863 Association Response – indirect 0x8863 Association Response – direct 0x8C63 Routing packet 0x8863 0xBB Data packet 0x8861 AVR2070 8240B-AVR-06/09...
  • Page 43: Appendix B - Firmware Api Overview

    AVR2070 Appendix B - Firmware API Overview This appendix discusses how the RUM firmware is implemented, what Application Programming Interface (API) functions are present, and gives some detail about what functions are called to implement the RUM protocol. The firmware source, available with this Application Note, has been extensively documented in source code comments.
  • Page 44 If a frame was received by the radio, it is transferred from the transceiver into a receive buffer in the host processor. End-of-transmit interrupts and energy detect interrupts are dispatched from the ISR and values stored for later processing from the main loop. AVR2070 8240B-AVR-06/09...
  • Page 45 AVR2070 Figure B-2 appInit overview 8240B-AVR-06/09...
  • Page 46 Figure B-3 macTask overview AVR2070 8240B-AVR-06/09...
  • Page 47 AVR2070 Figure B-4 macDataIndication overview 8240B-AVR-06/09...
  • Page 48 Router Send packet to child (destination) Is destination Resend packet to my child? child (destination) Packet is from Is this frame child – resend to from parent? my parent Send to default router (see macConfig.lastRoute) AVR2070 8240B-AVR-06/09...
  • Page 49 AVR2070 Figure B-6 Radio ISR overview 8240B-AVR-06/09...
  • Page 50: Rum Api

    The MAC calls back to either appPacketSendSucceed() or appPacketSendFailed(). • macDataIndication() is called by the MAC if a packet is received that is addressed to this node. AVR2070 8240B-AVR-06/09...
  • Page 51 • macSetOperatingChannel() can be used to manually set the radio channel. • radioGetPartnum() will query the Atmel transceiver and return the part number. • radioGetSavedRssiValue() returns the last measured received signal strength indication (RSSI) value for a received packet.
  • Page 52: 6Lowpan Api

    The 6LoWPAN and IPv6 stack on the ARM device are based on uIPv6 integrated into Contiki. See www.sics.se/contiki and the RUM source code for integration details. This process is shown for AVR devices in figure B-7 and for ARM devices in figure B-8. • void sixlowpan_DataIndication(ftData * frame, uint8_t payloadlen) AVR2070 8240B-AVR-06/09...
  • Page 53 AVR2070 Figure B-7 AVR 6LoWPAN DataIndication 8240B-AVR-06/09...
  • Page 54: Writing A Custom Application Using Rum

    SPI. In addition to the SPI interface, the radio has an IRQ output that must be supported as an interrupt on the AVR. This can be an external interrupt, pin change interrupt, or timer capture interrupt. The 'RF230 has a rising edge interrupt signal, AVR2070 8240B-AVR-06/09...
  • Page 55: Step 2: Define A New Platform For The Hardware

    AVR2070 and the RF231 and RF212 radios can be configured for rising or falling edge via the IRQ_POLARITY register value. In addition, there are some GPIO signals that must be connected to the microcontroller: • RST – Reset signal, active low •...
  • Page 56 // Define which AVR vector handles the radio interrupt. define RADIO_VECT INT0_vect // Define Macros to handle setting up interrupts and // ADC functionality #define HAL_ENABLE_RADIO_INTERRUPT( ) EICRA |= 3, EIMSK |= 1 #define HAL_DISABLE_RADIO_INTERRUPT( ) EICRA&=~3, EIMSK &= ~1 AVR2070 8240B-AVR-06/09...
  • Page 57: Step 3: Verify That The Transceiver Is Communicating With The Microcontroller

    AVR2070 define HAL_INIT_ADC() DIDR0 |= (1 << ADPIN), \ ADMUX = 0xC0 | ADPIN, ADCSRA = 0x84 define HAL_STOP_ADC() ADCSRA &= ~0x80 define HAL_SAMPLE_ADC() ADCSRA |= (1 << ADSC) \ | (1<< ADIF) define HAL_WAIT_ADC() while (!(ADCSRA | (1<<ADIF))) {;}...
  • Page 58: Step 4: Verify That The Rum Network Is Working On The Hardware

    If there is no network connection between the two nodes, check the following: 1. Are both nodes working in the same band? 2. If the band is 900MHz, are both radios using the same modulation scheme? 3. Is the coordinator set to a single fixed channel? See the PAN_CHANNEL keyword. AVR2070 8240B-AVR-06/09...
  • Page 59: Appendix C - Ipv6 / 6Lowpan Background

    Appendix A. C.1 The problem with RF-Only Networks Atmel® provides the RUM network layer as a very easy method of passing messages around the wireless network. Problems occur when messages need to be passed outside the wireless network. Any wireless protocol designed specifically for the 802.15.4 radios (RUM included) will have poor support outside the physical wireless...
  • Page 60: Ipv6 Neighbor Discovery

    This router solicitation will also be periodically sent by the router to inform nodes of any changes in network information. AVR2070 8240B-AVR-06/09...
  • Page 61: Node Auto-Configuration

    AVR2070 Figure C-4-1 IPv6 Router Discovery C.4.3 Node Auto-configuration On power-up a node uses these packets to acquire an address using stateless auto- configuration. It first auto-configures a link-local address by using the fe80:: prefix followed by an interface identifier description (IID) based on its physical address. It then sends a neighbor solicitation packet looking for someone else with this same address –...
  • Page 62: 6Lowpan Basics

    Since the standard is evolving, this is not the most recent version of the header-compression standard. The most recent version will be available at http://tools.ietf.org/wg/6lowpan. The following quickly describes what features are present in HC01, and supported by this code: AVR2070 8240B-AVR-06/09...
  • Page 63: 6Lowpan Compressed Header

    AVR2070 Traffic Class and Flow Label encoding A message will be properly parsed by end-nodes regardless if traffic class and flow label is compressed or uncompressed. However the value itself is not read, hence to avoid wasting space all messages should have the traffic class and flow label set to zero.
  • Page 64 Compared to normal IPv6 networks, there are some differences to how a node acquires its IPv6 address. A typical startup sequence on this Atmel 6LoWPAN network is (shown in Figure C-4-1): 1. Node associates to coordinator using RUM protocol, and is assigned an 802.15.4 short address...
  • Page 65: Appendix D - At91Sam7X-Ek Development Tools

    D-1-1. This is the folder structure as downloaded from www.atmel.com. The RUM specific source is located in the \rum_src folder. The \patch folder contains the modified uTasker files to support RUM. Follow the uTasker patch procedure described in section 4.1.1 to create the new folder structure shown in...
  • Page 66: Rowley Crossworks Ide

    Request Eval license by email (one day processing). 2. Download Support Packages a. Open Tools -> Download Packages From WEB b. Download Board Support: Atmel - AT91SAM7X-EK.hzq c. Download CPU Support: Atmel - AT91SAM7.hzq d. Complete installation procedures for both packages.
  • Page 67: Rowley Rum Project

    AVR2070 5. Load J-Link .dll for debugging a. Target -> Connect Segger J-Link b. Should see “DLL WARNING” c. Select Tools -> Targets d. Highlight “Segger J-Link”, right-click and select “Properties” as shown in figure D-3-1. e. Find Properties window in lower right corner, make sure properties of “Segger J-Link”...
  • Page 68 CHINA=0,1 • DEBUG=0,1 • DEMO=0,1 • IPV6LOWPAN=0,1 • PAN_CHANNEL=0 or integer 0 – 26 • PAN_ID=0 or 2 byte user defined • PLATFORM=0 Note: Not needed for SAM7X • BAND=BAND2400, BAND900 • CHINA_MODE=0, 1 • RUMSLEEP=0,1 • SENSOR_TYPE=0 AVR2070 8240B-AVR-06/09...
  • Page 69 AVR2070 Figure D-2-3 Rowley Project Properties Then click on the ellipsis button to bring up the Preprocessor Definitions window. Figure D-2-4 Pre-processor Definitions The code can be built by either pressing the F7 key or by clicking on the Build the menu item and then clicking on Build ->...
  • Page 70: Eclipse Ide

    D.3.1.2 Eclipse Eclipse is the graphical interface that will be used. Get the C/C++ Edition from www.eclipse.org/downloads/. D.3.1.3 J-Link Software and Documentation Pack from Segger This provides the GDB-Server that allows the Atmel SAM-ICE to be used for debugging. Obtain software...
  • Page 71 AVR2070 Figure D-3-1 Eclipse Workspace Selection In this example they are stored in the f:\eclipse_projects directory. With that, the Welcome screen will appear: Figure D-3-2 Eclipse Welcome Screen Clicking the “workbench” icon on the far right will then open the workbench view:...
  • Page 72 Finally the RUM project can be imported. This is done by going to the “File -> Import” menu. Select the type as “Existing Projects into Workspace”, and click next: figure D-3-4 Eclipse Import Selection Screen AVR2070 8240B-AVR-06/09...
  • Page 73 AVR2070 Point the root directory to the RUM source code. It should automatically find the project, and optionally one can check the “Copy projects into workspace” option to copy the source files to a local Eclipse workspace. Figure D-3-5 Eclipse Import Project Screen Upon hitting the “Finish”...
  • Page 74 Change the “compiler invocation command” to point to the YAGARTO installation. In this example it is located at C:\Program Files\yagarto\bin\arm-elf-gcc.exe: Figure D-3-6 uTasker Project Properties Compiler Setting AVR2070 8240B-AVR-06/09...
  • Page 75: Debugging Rum Step-By-Step

    The result should be a message printing the size of the resulting ELF file. D.3.4 Debugging RUM Step-By-Step An Atmel SAM-ICE can be used to debug RUM on the SAM7X board. Connect the SAM-ICE to the debug port, and ensure the Segger J-Link tools are installed, along with any needed drivers.
  • Page 76 OK. Now select the “zylincdt” and hit “Install”: Figure D-3-9 Eclipse Zylincdt Install Completing the install will require agreeing to the terms of the license agreement. If asked to restart Eclipse, press “Yes” to do so. AVR2070 8240B-AVR-06/09...
  • Page 77: Programming The Flash

    AVR2070 D.3.5 Programming the FLASH First programming the FLASH memory with SAM-PROG will be covered. With the SAM-ICE connected, open the SAM-PROG program. Point to the file at Applications\UTaskerV1.3\GNU_SAM7X\uTaskerV1.3.bin. Ensure the “None” and “Auto-mode” checkbox are checked. Figure D-3-10 SAM-PROG Flash Programmer Then hit the “Yes”...
  • Page 78 Figure D-3-11 Segger J-Link Connection Screen Next Eclipse needs to be set up to work with the GDB Server. To do this click the small downward-pointing arrow beside the “Bug” button, and select “Debug Configurations”: Figure D-3-12 Eclipse GDB Server - Main AVR2070 8240B-AVR-06/09...
  • Page 79 AVR2070 A new window will pop up, and select the “Zylin Embedded debug (Native)” category, and hit the new button. Set the name, and then set the project by hitting the “Browse” button and selecting the project. Assuming the project has successfully been built, pressing the “Search Project”...
  • Page 80 Note the following lines are commented out: #monitor flash download = 1 #monitor flash breakpoints = 1 To use these features requires the purchase of an additional license. The flash download feature means that the FLASH can be programmed from within Eclipse. In AVR2070 8240B-AVR-06/09...
  • Page 81 AVR2070 this tutorial the external SAM-PROG tool is used instead. The flash breakpoints feature removes the limit of two hardware breakpoints. Figure D-3-14 Eclipse GDB Server - Commands Now hit the “Debug” button, and Eclipse should ask to open the debug perspective.
  • Page 82 If an attempt is made to start a new debugging session while an old debugging session is connected, it will result in a number of errors. To correct this switch to the debug perspective, then right click on a debugging session and choose the “terminate all” option. Then re-launch the debugger: AVR2070 8240B-AVR-06/09...
  • Page 83 AVR2070 Figure D-3-20 Debug Terminate/Disconnect Option Once debugging is finished, the process can begin again. After re-compiling, it is imperative to ensure the flash is reloaded with the SAM-PROG program. Simply starting a debug process again does NOT download new code, unless the extra flash programming module is purchased.
  • Page 84: Appendix E - Third-Party Reference Designs / Platforms

    The REB can also be connected to the AT91SAM7X-EK board with a REX_ARM adapter board. The Atmel IEEE 802.15.4 radios can be controlled via SPI and a few discreet IO signal lines. Please refer to the respective datasheets for detailed information on the radio –...
  • Page 85 AVR2070 Figure E-1-1 AT91SAM7X-EK Standard Board Figure E-1-2 REB and REX_ARM adaptor Figure E-1-3 AT91SAM7X-EK with REB/REX_ARM Connected 8240B-AVR-06/09...
  • Page 86: Rcb212

    This platform is the original version of RCB (Radio Control Board) from Atmel, designed for the AT86RF230 radio (in the 2.4GHz band). This platform is also used for the original version of REB (Radio Extender Board) from Atmel. The REB must be ®...
  • Page 87: Dsk001

    AVR2070 E.5 DSK001 This platform is a small circular PCB containing an RF230 or RF231 radio transceiver, an ATmega48/88/168/328 family microcontroller, a temperature sensor, and a three axis accelerometer. This board is available from TRT Technology (www.trttech.com), along with programming hardware and a compact plastic case. This platform has been FCC certified.
  • Page 88: Glossary

    AVRISP - An Atmel programming tool for writing object code into most Atmel processors. Another similar tool is the JTAGICE MK-II. Beacon - A special frame used to identify a network. A new node sends a beacon request packet, and receives back a beacon frame from a network that can be joined.
  • Page 89 The AT86RF2xx chips communicate using SPI. WinAVR - A windows-specific version of the GCC compiler for AVR microcontrollers, which is meant to be used with AVR Studio, a free, fully functional IDE for Atmel AVR microcontrollers. WSN - Wireless Sensor Network.
  • Page 90: Table Of Contents

    5.1.2 Application Interface ....................20 5.1.3 Main Menu....................... 20 6 Running the IPv6 Demo..............23 6.1 Computer/Network Setup .................. 23 6.2 Ping Demo......................23 6.3 Using the 6LoWPAN / IPv6 Code on End Nodes..........25 6.4 IPSO App Example ................... 25 AVR2070 8240B-AVR-06/09...
  • Page 91 AVR2070 6.4.1 Commands on Port 61616..................26 6.4.2 Commands on Port 61618..................27 6.5 Sensor App Example..................28 6.6 TFTP Bootloading ..................... 29 6.7 Sleeping Nodes ....................30 Appendix A - Route Under MAC (RUM) Protocol ......31 A.1 Overview ......................31 A.2 Features ......................
  • Page 92 Appendix E - Third-Party Reference Designs / Platforms ..... 84 E.1 REB and REX_ARM Adaptor................84 E.2 RCB212......................86 E.3 RCB230......................86 E.4 RCB231......................86 E.5 DSK001......................87 E.6 Compile Time Settings..................87 E.7 Fuses ........................ 87 Glossary .................... 88 Table of Contents................90 AVR2070 8240B-AVR-06/09...
  • Page 93 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein.

Table of Contents