Z-Accel. Introduction. Objectives

Similar documents
AIM: To create a project for implement a wireless communication protocol on an embedded system- ZigBee.

Simple API for Z-Stack

CCZACC06. Z-Accel 2.4 GHz ZigBee Processor. Accelerate your ZigBee Development. Applications. Description. Key Features

Daintree Light Sensor Demo Application Note

ZICM357SPx Thermostat Application Note: ESI

Radiocrafts Embedded Wireless Solutions

Z-Stack Home TI-RTOS Developer s Guide

BT2540 Bluetooth 4.0 BLE (CC2540) Module Users Manual

Zigbee protocol stack overview

Emad Ebeid Ph.D. CS depart University of Verona, Italy

Contents About This Guide Audience Revision History

By Nick Giannaris. ZigBee

ECE 480 Team 5 Introduction to MAVRK module

Z-Stack User s Guide For CC2530 ZigBee-PRO Network Processor Sample Applications

MSP430 Interface to LMP91000 Code Library

ez430-chronos Wireless Watch Development Tool: Teardown & Getting Started

ZICM357P2 - Evaluation Kit User s Guide

TI SimpleLink dual-band CC1350 wireless MCU

OSGi ZigBee Base Driver

Agriculture Wireless Temperature and Humidity Sensor Network Based on ZigBee Technology

MSP430F471xx MCUs offer high accuracy, simultaneous sampling and anti-tamper for three-phase e-metering applications

ARROW ARIS EDGE S3 Board User s Guide 21/02/2018

RF Networking With MSP430 & the ez430-rf2500 Session 2 Miguel Morales, MSP430 Applications 6/5/2008 1

BASICS OF THE RENESAS SYNERGY TM

ZIC2410 Getting Started Guide

Application Note AN045

Application Note AN013

CEL MeshConnect ZICM35x Test Tool User Guide

The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade

Ultra Low Power Microcontroller - Design Criteria - June 2017

Module Introduction. This training module provides an overview of Freescale s scalable solutions for low data rate 2.4 GHz connectivity.

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

RN-171-EK Evaluation Board

1.2 - Introduction to the IAR Workbench IDE *

zigb232 & zigb485 User Guide User Guide TANGENT TECHNOLABS

MSP430 Interface to LMP91000 Code Library

Freescale Development Kits IEEE Wireless design made simple. freescale.com/802154

Guide to Wireless Communications, 3 rd Edition. Objectives

Getting started with X-CUBE-LED channel LED driver software expansion based on LED1642GW for STM32Cube

Embit Binary Interface - IEEE Specific Documentation. embit s.r.l.

ARROW ARIS EDGE Board User s Guide 27/09/2017

BASICS OF THE RENESAS SYNERGY PLATFORM

EmberZNet Stack Release Notes

Davide Quaglia Assistant CS depart University of Verona, Italy

Kinetis ZigBee Stack Demo Applications

ZIGBEE. Erkan Ünal CSE 401 SPECIAL TOPICS IN COMPUTER NETWORKS

AN4869 Application note

Microcontroller Basics

ShortStack 2.1 ARM7 Example Port User s Guide

Network Processor Interface User s Guide

TOSR14x. TOSR14x USB/Wireless Relay Module. User Manual. Tinysine 2015 Version 1.2

ArduCAM CC3200 UNO board

Core2530/XCore2530 User Manual

Example: Enable sleep mode

Sub-GHz Remote Control Dimmer Quick Start Guide. Reference Design for Kinetis KW01 MCU KW01RCDRDQSG

Application Note AN057

Wireless Sensor Networks. FireFly 2.2 Datasheet

Basics of UART Communication

Freescale IEEE Development Kits Wireless design made simple. freescale.com/802154

Application Note: JN-AN-1134

AFE4403 Watch EVM Factory Firmware Update Procedure

RN-174 WiFly Super Module

Design and implementation of ZigBee/IEEE Nodes for

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

Figure 26 CC Debugger Interface

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Topics. Introduction Architecture Node Types Network Topologies Traffic Modes Frame Format Applications Conclusion

Getting Started With the Stellaris EK-LM4F120XL LaunchPad Workshop. Version 1.05

Collaborative Mesh Networking. Instructor: Rob Faludi Week 9

Quick Start Guide. USB Packet Sniffer/Dongle for Kinetis MKW22D and MKW24D Wireless MCUs USB-KW24D512

SPBTLE-1S ArTM. October STMicroelectronics

UM0894 User manual. STM32W-SK and STM32W-EXT starter and extension kits for STM32W108xx. Introduction

SimpliciTI. Introduction. Learning Objectives

Software Setup and Introductory Assembly programs for the MSP430 *

L13. Communicating wireless by XBee modules

Indriya_DP_03A14. Features. Block Diagram. XBEE based Wireless Sensor Network development platform

MeshConnect ISP / WNA (ZIC2410USB-WNA-1) User Guide

Introduction to Netburner Network Development Kit (NNDK) MOD5282

STSW-BLUENRG1-DK. BlueNRG-1, BlueNRG-2 DK SW package

User s Guide IoT Microcontroller Development Kit

User Guide: Quick Start - ATZB-256RFR2-XPRO

A brief intro to MQX Lite. Real work: hands-on labs. Overview, Main features and Code Size

Wireless Personal Area Networks (WPANs) Wireless PAN

Comparing the Digi XBee API with EmberZNet EM260 API

Overview of Freescale s Platform

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Programming in the MAXQ environment

Outline. TWR Module. Different Wireless Protocols. Section 7. Wireless Communication. Wireless Communication with

Bluetooth 4.0 Development Board (B-DB001 Base Board with B-001 core module)

Wireless Connectivity Options for IoT. By: MIST Makers John Varela and Nicholas Landy

Using Code Composer Studio IDE with MSP432

Product Overview -A 16 bit Micro Experimenter for Solderless Breadboards

MB95260H/MB95270H. MB95280H Series. MB95260H Series/MB95270H Series/

CM5000 DATASHEET v0.1

nblue TM BR-MUSB-LE4.0-S2A (CC2540)

FAE Summit Interfacing the ADS8361 to the MSP430F449 Low Power Micro Controller

GETTING STARTED GUIDE

Designing a ZigBee Network

WiMOD LR Base Plus Host Controller Interface

Embedded System Project (521423S) - Specifications

Transcription:

Z-Accel Introduction Z-Accel is a new packaging of our, now familiar Z-Stack into a more user-friendly format. If you need to implement a ZigBee solution quickly, Z-Accel could be your most promising alternative. Objectives Look at the Z-Accel architecture Learn about Simple API (SAPI) Look at Z-Accel solutions Do an introductory lab Low Power RF Solutionsp - Z-Accel 9-1

Module Topics *** the greatest hazard in life is to risk nothing. (Dr. Grissom) *** 9-2 Low Power RF Solutions - Z-Accel

Module Topics Module Topics Z-Accel... 9-1 Module Topics... 9-3 Three Paths to ZigBee... 9-5 Z-Accel... 9-6 Simple API... 9-7 Remote Procedure Calls... 9-8 Architecture... 9-9 App Model and Architecture...9-10 Profiles and Endpoints...9-11 PAN Formation and Discovery...9-12 Target Hardware...9-13 Lab9A Z-Accel Sample Application (ZASA)...9-15 Hardware list:...9-16 Software list:...9-16 Procedure...9-17 Open the Project...9-17 Low Power RF Solutions - Z-Accel 9-3

Module Topics *** do you know who ELI the ICEman is? *** 9-4 Low Power RF Solutions - Z-Accel

Three Paths to ZigBee Three Paths to ZigBee Three Paths to ZigBee Z-Accel: (ZigBee Processor) ez430 RF2480 = MSP430 + CC2480 2 What is Z-Accel?... Low Power RF Solutions - Z-Accel 9-5

Z-Accel Z-Accel What is Z-Accel and the CC2480? Z-Accel is a ZigBee Network Processor that communicates with any MCU via an SPI or UART interface CC2480 is the first-generation ZigBee 2006-compliant network processor in the Z-Accel family Z-Accel allows customers to work with their favorite MCU Z-Accel provides complete ZigBee functionality without having to learn the complexities of a full ZigBee stack 3 Key Features... Z-Accel Key Features Reduce Development Complexity Preprogrammed / preconfigured ZigBee Node Easy to Deploy Accelerate ZigBee Connectivity for existing solution Easily added as serial peripheral Easy to Use Split Application and Network processor Application Processor running Application Framework & Profile Standardized protocol Network Infrastructure reused by multiple applications Manufacturer Specific Profiles to enable interoperability whenever possible Z-Accel supports SimpleAPI SimpleAPI has only 10 API calls to learn, which drastically simplifies the development of ZigBee applications 4 SAPI... 9-6 Low Power RF Solutions - Z-Accel

Simple API Simple API Benefits of using SimpleAPI Shorten time from idea to launch Shorten learning curve No need to read the ZigBee specification SimpleAPI documentation is less than 30 pages in total (ZigBee2006 specification is 534 pages) Very little code space needed on the application MCU Small application microcontroller can be used (4kB+) Advanced API can still be used if needed ~90% of all applications can be done with SimpleAPI 5 SimpleAPI implements: Device configuration Commissioning of networks Binding of devices Sending and receiving data Functions & Callbacks... 6 SimpleAPI Functions and Callbacks zb_systemreset Resets network zb_startrequest Starts network zb_permitjoiningrequest Allow nodes to join network zb_binddevice Establish a binding (connection) zb_allowbind Allow binding request zb_senddatarequest Send data zb_readconfiguration Read configuration parameters zb_writeconfiguration Write configuration parameters zb_getdeviceinfo Get current address, PAN ID etc zb_finddevicerequest Search for a device on the network zb_startconfirm Network start up callback zb_allowbindconfirm Accepted bind request callback zb_senddataconfirm Send data status callback zb_receivedataindication Incomming data callback zb_finddeviceconfirm Search results callback zb_handlekeys EVM key push callback zb_handleosalevent Operating system callback SPI RPC... Low Power RF Solutions - Z-Accel 9-7

Remote Procedure Calls Remote Procedure Calls Z-Accel Transport Overview: Remote Procedure Calls (RPC) CC2480 s 10 Simple API calls are abstracted to 4 Physical Transport Layer Command Types AREQ Asynchronous Request Callback Events Function call with a return value POLL Polling for Data Retrieve Queued Data SREQ Synchronous Request Immediate Response SRSP Synchronous Response Response to a SREQ command 7 Architecture... 9-8 Low Power RF Solutions - Z-Accel

Architecture Architecture Z-Accel Architecture Z-Accel Host processor ( MSP430 ) HAL Application Simple API ZACC RPC SPI/UART interface ZigBee Processor (CC2480) ZigBee Processor Server Simple API Z-Stack API Z-Stack Radio 8 App Model... Low Power RF Solutions - Z-Accel 9-9

App Model and Architecture App Model and Architecture Z-Accel - Application Model Register your Application Devices and End Points Join Network as a: Source (Router or End Device) Create periodic sensor reports (Temperature, Battery). Transmit data to one or more Sink Devices to which it is bound Sink (Coordinator) Destination for Data. Receive data from one or more Source Devices Source EP Source EP Temp Read Cluster examples supported by ZASA Sink EP Cluster Cluster Cluster Sink Cluster example added by user Source EP Source 9 Temp Read Configuration EP ZASA Z-Accel Sample Application Architecture... Application Device Architecture Application processor MSP430 Sample Application ZASA SAPI Simple API ZACC (RPC) HAL / BSP Physical Layer (SPI/UART) 10 Profiles... 9-10 Low Power RF Solutions - Z-Accel

Profiles and Endpoints Profiles and Endpoints Profiles CC2480 only supports Manufacturer Specific Profiles (Private Profile) Privately developed by individual manufacturers CC2480 only supports ZigBee 2006 06 devices can only join a PRO network as End Devices ZigBee 06 and 07 network seamlessly A profile ID must be unique and use a ZigBee Alliance allocated profile identifier Commercial products developed using this profile must undergo network capable testing 11 Endpoints... Endpoint 0 (EP0) is the ZDO application running on the CC2480 Endpoints Additional Endpoints run on the application processor (MSP430) Sink Binding EP 1 Source EP 2 Manufacturer Specific Profile Cluster List Cluster ID Cluster ID Cluster List Cluster ID Cluster ID 12 PAN Formation... Low Power RF Solutions - Z-Accel 9-11

PAN Formation and Discovery PAN Formation and Discovery PAN Formation (Sink: Coordinator) Application processor MSP430 ZASA Register Device (Coordinator) Simple API App & Start Req AF Register Remote Procedure Call SREQ/SRSP AREQ SREQ/SRSP SPI Port Network Form Start Confirm AREQ 13 PAN Discovery... Pan Discovery/Join/Bind (Source: Router or End Device) Application processor MSP430 ZASA SAPI RPC SPI Register Device (Router/EndDevice) Register Device confirmed App & Start Req Start Confirm Bind Request Bind Confirm SREQ/SRSP AREQ SREQ/SRSP AREQ 14 Target Hardware... 9-12 Low Power RF Solutions - Z-Accel

Target Hardware Target Hardware Z-Accel Lab Target Hardware MSP430F2274 processor SPI connection to CC2480 2 LEDs (1 red, 1 green) 1 Pushbutton Photo-resistor 5 exposed MSP430 GPIO (P2.2 P2.4, P2.4 &P4.5) MSP430F2274 features: 32K Flash / 1K RAM Two 16-bit timers USCI Comm Interface 10-Bit, 200Ksps ADC Two Op-Amps 15 Lab time... Low Power RF Solutions - Z-Accel 9-13

Target Hardware *** it s later than we ALL think *** 9-14 Low Power RF Solutions - Z-Accel

Lab9A Z-Accel Sample Application (ZASA) Lab9A Z-Accel Sample Application (ZASA) Lab 9A ZASA Project Open ZASA project Update channel and PAN ID parameters Configure, build and load Start PC Demo Application Start Coordinator-Sink, then Router-Source then End Device-Source Observe PAN traffic on Daintree SNA Channel PAN ID 1 0x0C (12) 0x0AAA 2 0x0D (13) 0x0BEE 3 0x0E (14) 0x0CEE 4 0x0F (15) 0x0DEE 5 0x10 (16) 0x0EEE 6 0x11 (17) 0x0EFF 7 0x12 (18) 0x0BAB 8 0x13 (19) 0x0ACE 16 Another lab... Low Power RF Solutions - Z-Accel 9-15

Lab9A Z-Accel Sample Application (ZASA) Hardware list: 1 ez430-rf2480 Emulator Board 3 ez430-rf2480 Target Boards 2 Battery Modules 4 AA Batteries 1 USB Extender cable 1 SmartRF04EB board 1 CC2430EM board 1 antenna Software list: IAR Embedded Workbench for MSP430 version 4.11D TI Packet Sniffer version 2.10.1 Daintree Sensor Network Analyzer version 2.3.0.8 ez430-rf2480 Wireless Sensor Monitor version 1.1.4 (swrc096c.zip) (You will find shortcuts for the above applications on the desktop) ez430-rf2480 ZASA Installer (Rev.B) (swrc097b.zip) CC2480 Software Examples (swru169.zip) 9-16 Low Power RF Solutions - Z-Accel

Procedure Procedure Open the Project 1. Open the ZASA project Open C:\Texas Instruments\eZ430-RF2480\ZASA\IAR\SampleApp.ewp with IAR Embedded Workbench. 2. Set your channel and PAN ID In the App workspace group, open sample_app.cfg for editing and select the channel and PAN ID that your workgroup was assigned. Make sure to only select a single channel. 3. Check the Options In the options for the project, in the FET Debugger category, make sure that the Connection port is set to Automatic. 4. Build/Download Connect the ez430-rf emulator to an open USB port on your PC with the USB extender cable. Connect one of the ez430-rf2480 target boards to the emulator and build/download the ZASA code to it. Do the same for the other two target boards. Leave the last target board attached to the emulator and connect the other two boards to the battery modules. 5. Operation of the ZASA Code The following description is pretty much verbatim from section 6 of the ez430-rf2480 Demo Kit User s Guide (in the ez430-rf2480 folder). My additions, on exactly what actions to take, will be in BOLD. The ZASA application is comprised of two types of devices, Sources and Sinks, operating in potentially all three ZigBee roles; Coordinator, Router, and End Device. Sources provide temperature and bus voltage readings collected by the MSP430 using its on chip temperature sensor and ADC converter. The ZASA application provides code for operating as either type of device, and allows for easy configuration via the button on the CC2480 target board. After power up, the Sample Application (the host), is in the state appiniting which is to say, it is waiting to initialize the CC2480. CC2480 will always restore its previous network state from NV memory, unless it was pre-configured not to do so by the host before the last reset. This Sample Application does not take advantage of the NV restore behavior so as to have a perfectly predictable out-of-the-box behavior. Whenever the CC2480 resets, it always sends a SYS API message to indicate that it has reset. Thus, the host is waiting for this indication when it is in the appiniting state. Upon receiving the reset indication, the host preconfigures CC2480 to not perform NV restore on the next reset and transitions to the appwaiting state. When the host is in this appwaiting state, both LEDs will blink at 1-Hz. Low Power RF Solutions - Z-Accel 9-17

Procedure Connect the power jumpers on both battery modules and click the Go button in IAR Embedded Workbench now. The LED on each board should be blinking at 1-Hz. The user can configure the device as follows: One momentary button push in a two-second window configures the device to be an FFD (Full Function Device a device capable of routing). Two momentary button pushes in a two-second window configures the device to be an RFD (Reduced Function Device an End Device). When the two-second window expires, the device is configured and transitions to the appjoining state. An FFD will try to join an existing network as a ZigBee Router for 10 seconds. If it fails to join, it will start a new network as a ZigBee Coordinator. An RFD will try to join an existing network as a ZigBee End Device for 10 seconds. If it fails to join, it will stop, the state will transition to appjoinwaiting, and it will enter low-power for 30 seconds, and try again repeating the sequence until it succeeds in joining. While in the appjoining or appjoinwaiting state, the LEDs will be off. On the target board attached to the emulator, press the button once. After about 10 seconds, the red LED will light, indicating that the device has configured itself as the Coordinator. When an FFD starts a new network as a ZigBee Coordinator, it will set the red LED solid on and allow devices to bind the state will transition to apprunning and its sub-state will be allowing joins as set by the flag apppermittingf in the variable appflags. The device also maintains a tertiary state, that it is sinking data, as set by the flag appsinkingf in appflags. Whenever a message is acknowledged, the device blinks the green LED once. The sub-state of allowing joining can be toggled on the Coordinator by a momentary button press. The sub-state transitions to not allowing joining by clearing the apppermittingf and the red LED starts blinking at 1-Hz. Pick one of the target boards attached to a battery module and press the button once. After a moment, the green LED will light, indicating that the device has configured itself as a Router. Take a Post-it flag and label the board Router. When an FFD successfully joins an existing network as a ZigBee Router, its state transitions to appbinding, and the device sets the green LED solid on. The device uses the SAPI to negotiate OTA and find the device that is sinking data. The FFD will continue to request a bind from the SAPI every 30 seconds until it is successful. Upon successful binding the state will transition to apprunning and its sub-state will be allowing joins as set by the flag apppermittingf in the variable appflags. The sub-state of allowing joining can be toggled on the Router by a momentary button press. The sub-state transitions to not allowing joining by clearing the apppermittingf and the green LED starts blinking at 1-Hz. Every 10- seconds, the device sets a tertiary state, that it is sending data, as set by the flag appsendingf in appflags. The device requests that the sinking device should acknowledge receipt of the data message OTA, so it retries sending the same data OTA up to 3 times every time that the SAPI feedback from the CC2480 indicates that the message has not been acknowledged. When the message is acknowledged or the retries have expired, the sub-state of sending data is cleared by clearing the appsendingf flag. Whenever a message is acknowledged, the device blinks the red LED once. 9-18 Low Power RF Solutions - Z-Accel

Procedure On the last target board, press the button twice within a 2 second window. This will configure the device as an End Device. Data transmissions and acknowledgements will be indicated by the flashing LEDs. Take a Post-it flag and label the board End Device. When an RFD successfully joins an existing network as a ZigBee End Device, its state transitions to appbinding, and the device starts blinking the green LED at 1-Hz. The device uses the SAPI to negotiate OTA and find the device that is sinking data. The RFD will wait up to 10 seconds for a bind request to succeed and then transition the state to appbindingwait and enter low power for 30 seconds. The device will continue to alternate between the two binding states and low power every 30 seconds until it is successful. Upon successful binding the state will transition to apprunning and its sub-state will be allowing low power as set by the flag applowpwrf in the variable appflags. Every 10-seconds, the device sets a tertiary state, that it is sending data, as set by the flag appsendingf in appflags. The device requests that the sinking device should acknowledge receipt of the data message OTA, so it retries sending the same data OTA up to 3 times every time that the SAPI feedback from the CC2480 indicates that the message has not been acknowledged. While awaiting the acknowledge, the device enters low power and awakes every 2 seconds by a timer in order to poll for the SAPI feedback from the CC2480. When the message is acknowledged or the retries have expired, the sub-state of sending data is cleared by clearing the appsendingf flag. Whenever a message is acknowledged, the device blinks the red LED once. 6. GUI for Sample Application We have a PC GUI that displays the data received by the Coordinator (Z-Accel sink) via a UART connection through the USB port. Stop Debugging in IAR Embedded Workbench and minimize the tool. Poweroff the Router and End Device boards. Start the GUI by clicking on the ez430-rf2480 Sensor Monitor shortcut on your desktop. Cycle power to reset the Coordinator by unplugging/plugging the USB extension cable attached to the emulator/target board. After a moment, the SINK RX bubble in the GUI should turn red, indicating that the GUI is connected to and reading from the device. Press the button on the target board once to configure the board as a Coordinator-Sink. After about 10 seconds, the red LED on the board will light. Connect power for the Router, and then press the target button once to configure the device as a Router- Source. A blue bubble should appear on the PC GUI with data inside. The bubble will flash each time a data packet is received. Inside the bubble you ll see four pieces of information: a. The temperature reported by the device s MSP430 internal temperature sensor (don t worry if this is incorrect; it has not been calibrated. b. The short address of the ZigBee device. (being the first Router to join the Coordinator, this should be 0x0001) c. The time that the last data was received (PC time) d. The battery voltage of the device. Connect power for the End Device, and then press the target button twice within 2 seconds to configure the device as a End Device-Source. After a few seconds, the LEDs will flash occasionally, indicating data transmission and acknowledgement. A green-ish bubble should appear on the PC GUI with data inside. The bubble will flash each time a data packet is received. Note the data inside the bubble. Close the Sensor Monitor GUI and power off all three Z-Accel boards. Low Power RF Solutions - Z-Accel 9-19

Procedure 7. Run the Packet Sniffer Turn on your sniffer board, making sure that it is connected to the PC s USB port. Start the Daintree Sensor Network Analyzer. Don t forget to select your source and your workgroup s channel before clicking the Start Capture button. Watch the action on the SNA as you follow the steps below. Make sure that the packets you see make sense in terms of the ZigBee network activity that you d expect. Power on the Coordinator board and press the target button once. Power on the Router and press the target button once. Power on the End Device and press the target button twice within 2 seconds. 8. Power down Close Daintree SNA and IAR Embedded Workbench. Power all the boards down. You re done 9-20 Low Power RF Solutions - Z-Accel