Техническая Спецификация для Atmel ATSAM3S-EK2

Скачать
Страница из 71
 
 
 
 
 
36 
Atmel AVR2055 
 
 
8348D-AVR-06/12 
Tag format 
Description 
BOARD 
Determines the target host platform for the ZAppSI demo 
application. If set to BOARD_PC, then the MinGW 
compiler 
 will be used to compile the binary. Note that 
the MinGW compiler must be manually added to the 
PATH environment variable. The other board settings 
should be selected to build for embedded platforms 
RUNNER_FEATURE_HEADER 
Provides the name of the Makerules header file used to 
create the embedded Runner application for the 
coprocessor board to be controlled. The file is located in 
the 
./BitCloud/lib directory, and describes the 
hardware and software feature sets supported on the 
coprocessor platform 
8.3.4 Using the SPI interface 
A device with the Runner application can be connected to a host device programmed 
with the ZAppSI demo via several interfaces, including USART and USB. The SDK 
additionally supports the  Serial Peripheral Interface  (SPI). To test this type of 
connection, load the Runner firmware to the ATmega128RFA1, and load one of the 
ZAppSI  demo applications provided with the SDK to a SAM7X-EK board. Other 
platforms are currently not supported. 
The implementation of the SPI employs a master-slave mechanism. In this case, the 
device with the Runner application is a slave, while the ZAppSI  demo device is a 
master. Pin connections between the devices should  be established according to 
. 
Table 8-3. Runner - ZAppSI demo pin mappings for the SPI connection. 
SPI signal 
ATmega128RFA1 pin (slave)  SAM7X pin (master) 
MISO 
PB3 
PA24 
MOSI 
PB2 
PA23 
SCK 
PB1 
PA22 
CS 
PB0 
PA21 
IRQ 
PE5 
PA29 
Instructions on programming ATmega128RFA1 devices can be found in Chapter 
. 
Both SE device and HA device demos are acceptable as the ZAppSI application. 
8.4 WSNRunner scripting environment 
One of the more common uses of the Runner application involves pairing a ZigBee 
coprocessor (see 
) with a PC acting as a host processor. For this exact 
reason, this SDK includes a powerful, extensible framework of tools for driving the 
Runner application using a standard Windows PC. This framework enables quick 
testing and prototyping of ZigBee Smart Energy, Building Automation,  and Home 
Automation devices using the industry-standard Python programming language and 
XML-based ZAppSI protocol description format. 
These tools are comprised of: 
  A set of ZAppSI protocol command descriptors in XML format 
  A set of functions that combine these commands, most commonly into ZigBee or 
ZCL command/response pairs