STEVAL-IDZ3xxV1 demonstration kit for the SPZB32W1x2.x series

UM1454 User manual STEVAL-IDZ3xxV1 demonstration kit for the SPZB32W1x2.x series of 802.15.4/ZigBee® radio communication modules Introduction The STEVAL-IDZ3xxV1 is a demonstration kit from the SPZB32W1x2.x series of 802.15.4/ZigBee® RF modules based on the STM32W108CB microcontroller that integrates a 32-bit ARM® Cortex™ M3 microprocessor and a 2.4 GHz, IEEE 802.15.4 radio. Accordingly, with the loaded protocol stack and application SW, the STM32W108CB microcontroller is suitable for different types of wireless network scenarios. Each STEVAL-IDZ3xxV1 kit enables the user to test the RF module performances, the features of the protocol libraries defined for the microcontroller, and to prototype the target 802.15.4/ZigBee application. The kit includes a development board and a software library that can be integrated into the structure of the packages available from the ST website for the use of ZigBee PRO, Zigbee RF4CE and simplified MAC on the STM32W108CB microcontroller. The STEVAL-IDZ3xxV HW integrates an RF module belonging to the SPZB32W1x2.x series together with an extended number of external connectors that allow the integration of peripherals as requested by the target application. The STEVAL-IDZ3xxV1 kit can be used for the following purposes. ■ Demonstration: ZigBee PRO. By using the sensor/sink application example integrated in the kit and two development boards, the user can easily set up a demo showing a few of the basic features of the ZigBee protocol stack. ■ Development: by using external equipment consisting of a development environment for the STM32W, the kit can be used to prototype and debug a target application. This document describes the hardware and software components of the STEVAL-IDZ3xxV1 and provides instructions for setting up the hardware and loading and running the application examples. This document is not meant to be a ZigBee tutorial and assumes that the user is familiar with IAR development tools and the basic features of the STM32W108CB microprocessor. Figure 1. December 2011 STEVAL-IDZ301V1 Doc ID 022085 Rev 2 1/28 www.st.com www.BDTIC.com/ST Contents UM1454 Contents 1 Kit parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 External equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.1 1.5 2 HW and SW compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 HW description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1 STEVAL description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3 Board connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.4 STEVAL layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.5 HW general features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.6 2/28 IAR toolset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5.1 I/O signal voltage configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5.2 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5.3 Configurable button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5.4 Voltage battery meter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5.5 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5.6 Ground points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5.7 Test points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5.8 Setting up STEVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.5.9 Powering setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.5.10 Serial communication interface setup . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.5.11 Boot mode setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Getting started with the kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.6.1 Installing the IDZ3LIB library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.6.2 IDZ3LIB content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.6.3 Integration of IDZ3LIB in EmberZnet 4.0.2 . . . . . . . . . . . . . . . . . . . . . . 18 2.6.4 Integration of IDZ3LIB in EmberZnet 4.3.0 package library . . . . . . . . . . 18 2.6.5 Install the CP2102 drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.6.6 Install and run the Flash loader demonstrator tool . . . . . . . . . . . . . . . . 19 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 3 4 Contents Install and run the sink-sensor application . . . . . . . . . . . . . . . . . . . . . 21 3.1 Sink-sensor sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 Load sink-sensor on the STEVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.3 Setting-up a network and running the sink-sensor application . . . . . . . . . 22 RoHS compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Appendix A STEVAL electrical schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Doc ID 022085 Rev 2 www.BDTIC.com/ST 3/28 List of tables UM1454 List of tables Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. 4/28 The STEVAL-IDZ3xxV1 versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Board connections and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 STEVAL interfaces maximum voltage configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 List of figures List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. STEVAL-IDZ301V1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 STEVAL block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 STEVAL image and main components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 STEVAL layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 STEVAL mechanical dimensions (mm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Ground points for daughterboard connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Test points for RCM power measuring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Jumper positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 External power supply JP conf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Mini-USB power supply JP conf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Mini-USB connection JP conf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 RS-232 connection JP conf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Boot JP conf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Disabled boot JP conf. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 COM associated to USB-to-UART bridge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 stm32w-flasher command syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Sink advertise and form network messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Sink: join and data messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Sensor: join and data messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Sink: “i” command output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Doc ID 022085 Rev 2 www.BDTIC.com/ST 5/28 Kit parts 1 UM1454 Kit parts As specified in Table 1, several versions of the STEVAL-IDZ301V1 and STEVAL-IDZ302V1 are defined based on the SPZB32W1x2.x module type that is integrated. Table 1. The STEVAL-IDZ3xxV1 versions Order codes Integrated module STEVAL-IDZ301V1 SPZB32W1A2 STEVAL-IDZ302V1 SPZB32W1C2 The following abbreviations are used throughout this document. Table 2. Abbreviations Full name Abbreviation STEVAL-IDZ3xxV1 The kit STEVAL-IDZ3xxV1 HW STEVAL STEVAL-IDZ3xxV1 SW IDZ3LIB Radio communication module RCM SPZB32W1xx RCM STM32W108CB STM32W The kit consists of the parts described in the following sections. 1.1 Hardware Fully featured development board that targets the prototyping of network devices. External connectors allow to integrate the peripherals as desired. The board can be supplied by means of an external +5 V supply or through the integrated mini-USB connector. STEVAL integrates the following: 6/28 ● An RF module belonging to the series of ZigBee/802.15.4 SPZB32W1x2.x modules ● A 20-pin JTAG connector for programming and debugging purposes ● Hardware support for application development: – Temperature sensor – Voltage battery measure circuitry – Two configurable pushbuttons – Two configurable LEDs ● Mini-USB connector and USB-RS-232 bridge ● A reset pushbutton ● A DC power source selection between the external power supply or external USB supply Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 1.2 Kit parts ● Power indicator LED ● A jumper for boot activation ● Jumpers for serial communication setup (RS232 or mini-USB) ● 24-pin double-row header for access to the remaining STM32W GPIO signals and interfaces. Software The kit contains a software package including application samples and utilities for using the STEVAL. 1.3 CD The kit includes a CD that contains the software and documentation for use of the kit. A datasheet, application notes, and user guides for use of STM32W, and an IAR tools suite can be found at the ST and IAR websites respectively. 1.4 External equipment The following minimum external equipment is required to use the kit functions: 1.4.1 ● A PC with Windows XP® ● A mini-USB cable to connect the board with the PC via the mini-USB interface ● The IAR toolset to debug and reprogram the STM32W micro ● An IAR J-Link or an ST-Link in-circuit debugger/programming ● The kit is compatible with the tools, IAR and Perytons supported by the STM32W-SK kit for STM32W108xx. See related documentation for details. IAR toolset The IAR embedded Workbench IDE for ARM is a very powerful integrated development environment used for developing and managing complete embedded application projects. Note: For programming (and/or debugging) using the IAR toolset, an IAR J-Link JTAG emulator is required. The IAR J-LINK is a JTAG emulator designed for ARM cores. It connects via a USB port to a PC running Windows 2000 or XP. It has a built-in 20-pin JTAG connector, which is compatible with the standard 20-pin connector defined by ARM. When using the IAR J-Link, an external power supply is required to power the STEVAL board. The first time the IAR J-Link is plugged into the PC's USB port, the user is requested to provide the relative J-Link driver. To do this, browse to the IAR installation directory and select the folder ARM > Driver > J-Link. The IAR toolset and the IAR J-Link are not provided with the kit. For detailed information and documentation about IAR products, refer to www.iar.com. As an alternative, ST-Link can be used in place of the IAR J-Link emulator. ST-Link is a very lowcost, in-circuit debugger/programmer for STM32. It connects to the application or demonstration board for programming and debugging via a JTAG std connection. The complete ST-Link documentation is available from www.st.com. Doc ID 022085 Rev 2 www.BDTIC.com/ST 7/28 1.5 HW and SW compatibility The STEVAL-IDZ301V1 and STEVAL-IDZ302V1 have been successfully tested with the following libraries and ToolSuite versions: EmberZnet package, versions 4.0.2. and 4.3.0 STM32W_flasher.1.1.0 available on the CD of the kit Sink-Sensor example. Included in the kit IAR version 5.41.2 CP2102 driver. Available at www.silabs.com and also included in the CD of the kit. 8/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 HW description 2 HW description 2.1 STEVAL description Figure 2. STEVAL block diagram "ATTERY0OWER *ACK6 MINI53"6 0OWER 3UPPLY 3ELECTOR *UMPER 3UPPLY MAIN VOLTAGE REGULATOR *4!' #ONNECTOR 34- 4EMPERATURESENSOR 2ESET0USH "UTTON 30:"7X ,%$3 0USH"UTTONS )-$! '0)/ %XTCONNECTOR *UMPER FOR 3ERIAL"OOT 53"5!24 "RIDGE MINI53" 5!24 3ERIAL3ELECTOR *UMPER 3ERIAL !-V Figure 3. STEVAL image and main components IMD9A Power Led Conf. buttons STLM75 Reset Conf. Leds P Power J k Jack Boot Jmp P Power JMP MiniUSB RS232/USB Bridge SPZB32W1xx Serial JMP 24 pin Exp. Connector JTAG Connector AM09416v1 Doc ID 022085 Rev 2 www.BDTIC.com/ST 9/28 HW description 2.2 UM1454 Recommended operating conditions Table 3. 10/28 Recommended operating conditions Symbol Parameter Conditions Min. Typ. Max. Unit J1- Ext.VIN Main board supply voltage -20 °C < T < 70 °C 4 5 6 V J2- Ext.VIN Alternate board (ext. battery) supply voltage -10 °C < T < 60 °C 4 5 6 V Tamb Operating ambient temperature +70 °C -20 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 HW description 2.3 Board connections Table 4. Board connections and configuration Description J1 J2 (2 poles) Ext. VIN (typ. +5 V) external power supply plug 1 Extension connector: +Vext. - Positive pole for an external +5 V supply (i.e battery). To be used as an alternative to J1. See Section 2.5.9 for use of the JMP1 2 Extension connector: GND - Negative pole for an external + 5 V supply (i.e. battery). To be used as an alternative to J1. See Section 2.5.9 for use of the JMP1 3 Extension connector: +3.3 V_O - (current limited 3.3 V output, max. 10 mA) 4 Extension connector: GND - (system ground 0 Volt) 5 Extension connector: PC5 - (STM32W108CB signal) 6 Extension connector: PC1 - (STM32W108CB signal) 7 Extension connector: PA7 - (STM32W108CB signal) 8 Extension connector: PA6 - (STM32W108CB signal) 9 Extension connector: PB6 - (STM32W108CB signal) 10 Extension connector: PB7 - (STM32W108CB signal) 11 Extension connector: PB5 - (STM32W108CB signal) 12 Extension connector: PB0 - (STM32W108CB signal) 13 Extension connector: PA5 - (STM32W108CB signal) 14 Extension connector: PA4 - (STM32W108CB signal) 15 Extension connector: PA3 - (STM32W108CB signal) 16 Extension connector: PA0 17 Extension connector: - (STM32W108CB signal) 2Cbus SDA) - (STM32W108CB signal) (I2Cbus SCL) - (STM32W108CB signal) PA1 (I 18 Extension connector: PA2 19 Extension connector: PC0/JTRST - (STM32W108CB signal) 20 Extension connector: PC3/JTDI - (STM32W108CB signal) 21 Extension connector: PC4/JTMS - (STM32W108CB signal) 22 Extension connector: SWCLK/JTCK - (STM32W108CB signal) 23 Extension connector: PC2/JTDO - (STM32W108CB signal) 24 Extension connector: nRESET 1 JTAG connector +3.3 V supply output (warning: current limited, max. 10 mA) 2 JTAG connector +3.3 V supply output (warning: current limited, max. 10 mA) 3 JTAG connector - JTRST 4 JTAG connector - GND (system ground 0 V) 5 JTAG connector - JTDI 6 JTAG connector - GND (system ground 0 V) - (STM32W108CB signal) J3 Doc ID 022085 Rev 2 www.BDTIC.com/ST 11/28 HW description Table 4. UM1454 Board connections and configuration (continued) Description 7 JTAG connector - JTMS 8 JTAG connector - GND (system ground 0 V) 9 JTAG connector - JTCK 10 JTAG connector - GND (system ground 0 V) 11 JTAG connector - (R6 - 10 kΩ pull-down connection) 12 JTAG connector - GND (system ground 0 V) 13 JTAG connector - JTDO 14 JTAG connector - GND (system ground 0 V) 15 JTAG connector - nRESET 16 JTAG connector - GND (system ground 0 V) 17 JTAG connector - (R7 - 10 kΩ pull-down connection) 18 JTAG connector - GND (system ground 0 V) 19 JTAG connector - (R8 -10 kΩ pull-down connection) 20 JTAG connector - GND (system ground 0 V) 1 Mini-USB-RS232 bridge connector: USB_VCC - (+5 V USB power supply) 2 Mini-USB-RS232 bridge connector: USB_D- - (USB DATA- signal) 3 Mini-USB-RS232 bridge connector: USB_D+ - (USB DATA+ signal) 4 Not connected 5 Mini-USB-RS232 bridge connector: USB_GND - (USB GND) J3 J4 JP1 Jumper Configurable power jumper. See Section 2.5.10 for configuration cases JP2 Jumper Configurable boot jumper. See Section 2.5.11 for configuration cases JP3 Jumper Configurable serial jumper. RTS pin on the Zigbee module. See Section 2.5.10 for configuration cases JP4 Jumper Configurable serial jumper. CTS pin on the Zigbee module. See Section 2.5.10 for configuration cases JP5 Jumper Configurable serial jumper. RX pin on the Zigbee module. See Section 2.5.10 for configuration cases JP6 Jumper Configurable serial jumper. TX pin on the Zigbee module. See Section 2.5.10 for configuration cases SW1 Pushbutton nRESET - pushbutton acting on the STM32W108CB reset pin SW2 Pushbutton FW configurable pushbutton - this pushbutton acts on the STM32W108CB “PB6” pin SW3 Pushbutton FW configurable pushbutton - this pushbutton acts on the STM32W108CB “PB0” pin LED1 Green LED showing the presence of the 3.3 V board internal voltage LED2 Yellow User configurable LED showing status of PA7 internal signal - (supplied by +3.3 V board voltage) LED3 Red User configurable LED showing status of PB7 internal signal - (supplied by +3.3 V board voltage) 12/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 2.4 HW description STEVAL layout Figure 4. STEVAL layout !-V Figure 5. STEVAL mechanical dimensions (mm) !-V Doc ID 022085 Rev 2 www.BDTIC.com/ST 13/28 HW description UM1454 2.5 HW general features 2.5.1 I/O signal voltage configuration Table 5. STEVAL interfaces maximum voltage configuration Connector Pin Pin 1 J2 extension connector J3 emulator connector 2.5.2 Range values Description Max. 6 V external power supply voltage (may be used also as supply This pin is totally user settable (pay attention input if selected by user using the to avoid power supply conflicts). proper jumper positioning). Pin 2 0 V interface GND - system ground (0 V) Pin 3 3.3 V output board power supply (10 mA maximum current available). Take care when used to supply external circuits Pin 4 0 V interface GND - system ground (0 V) Pin 5 to 24 Max. 3.3 V interface voltage All the system logic signals and I/O signals must be interfaced by a maximum 3.3 V level voltage Pin 1,2 Max. 3.3 V interface voltage Supply and enable for the external emulator (pay attention to avoid power supply conflicts). Pin 4,6,8,10,12, 14,16,18,20 0 V interface GND - system ground (0 V) Pin 3,5,7,9,13,15 Max. 3.3 V interface voltage All the emulator interface logic signals must be interfaced by a maximum 3.3 V level voltage Pin 11,17,19 10 kΩ pull-down interface 10 kΩ resistor connected to GND internally on the board Reset STEVAL integrates a reset pushbutton that generates a reset pulse for the STM32W. The reset signal can also be externally generated via pin 24 of the J2 connector. 2.5.3 Configurable button STEVAL integrates two SW-configurable pushbuttons that are connected to the PB6 and PB0 pins of the STM32W micro. 2.5.4 Voltage battery meter STEVAL allows to measure the residual voltage available when an external battery is used. The function is enabled through the SW and is derived by means of an IMD9A component whose output is connected to one of the analog ports of the STM32W micro. 14/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 2.5.5 HW description Temperature sensor An STM-STTS75 CMOS digital temperature sensor is integrated in STEVAL. The sensor presents an accuracy of +/- 2 °C in the -25 °C to +70 °C range. Refer to the relevant datasheet available at http://www.st.com for detailed specifications of the device. 2.5.6 Ground points The A and B ground points shown in Figure 6 facilitate the stacking of a daughterboard. Figure 6. Ground points for daughterboard connection A B AM09419v1 2.5.7 Test points The test points shown in Figure 7 can be optionally used to measure the RCM power consumption. To use them, the user needs to unsolder the 0 Ω R18 resistor that is, by default, integrated in the STEVAL. Figure 7. Test points for RCM power measuring TP2 TP3 AM09420v1 Doc ID 022085 Rev 2 www.BDTIC.com/ST 15/28 HW description 2.5.8 UM1454 Setting up STEVAL Figure 8. Jumper positioning Board Positioning Reference JP2 JP1 JP3 JP4 JP6 JP5 AM09421v1 2.5.9 Powering setup STEVAL can be supplied with a standard DC 5 V external power supply via the Jack J1 connector, or via the mini-USB connector, or by connecting an external supply to pin1 of the J2 connector. The jumper JP1 is used to select the power source supply. Warning: The user is recommended to use only one power source supply at a time and in particular to remove any other supplier when the mini-USB is selected with JP1. Figure 9 and 10 show how the J1 jumper must be configured in the different cases. Figure 9. External power supply JP conf. Figure 10. Mini-USB power supply JP conf. "OARD 0OSITIONING 2EF&IG *0 *0 *UMPER CONFIGURATION 4O SELECT THE6*JACKORAN EXTERNAL POWER SUPPLY CONNECTED TO RI THE WKH - * THEPIN OF *UMPER CONFIGURATION 4O SELECT THEMINI53" AS A 6POWER SUPPLY !-V 16/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST !-V UM1454 2.5.10 HW description Serial communication interface setup STEVAL can be connected via the mini-USB or via an RS-232 based connection. The jumpers JP3, JP4, JP5, and JP6 are used to select which serial interface to use, as shown in Figure 11 and 12. When jumpers are configured for using the RS-232, the following RS-232 signal configuration is available (Zigbee module side). JP3 --> RTS JP4 --> CTS JP5 --> RX JP6 --> TX Figure 11. Mini-USB connection JP conf. Figure 12. RS-232 connection JP conf. "OARD 0OSITIONING 2EF&IG "OARD 0OSITIONING 2EF&IG *0 *0 *0 *0 *0 USE *UMPERCONFIGURATION 7R XVH MINI53" CONNECTED WITH THE53"5!24 INTEGRATED BRIDGE *0 *0 *UMPER CONFIGURATION 4O USE THE23 VHULDO SERIAL FRQQHFWLRQ CONNECTION !-V 2.5.11 *0 !-V Boot mode setup It is possible to boot the STM32W via the serial connection by configuring the JP2 jumper as shown in Figure 13 and 14. The Flasher utility integrated in the kit is used to run the boot function, as explained in Section 2.6.6 of this manual. Figure 13. Boot JP conf. Figure 14. Disabled boot JP conf. "OARD 0OSITIONING 2EF&IG *0 *0 *UMPER CONFIGURATION 4O ENABLE THESERIALBOOT *UMPER CONFIGURATION 7HEN THESERIALBOOT IS NOT USED !-V Doc ID 022085 Rev 2 www.BDTIC.com/ST !-V 17/28 HW description UM1454 2.6 Getting started with the kit 2.6.1 Installing the IDZ3LIB library The protocol packages libraries defined for use of the STM32W micro with the STM32W-SW kit can be also used with the STEVAL-IDZ3xxV1. Customized files and utilities are provided in the IDZ3LIB to allow the use of a STEVAL board in place of the MB851/MB850 boards on which the STM32W-SK kit is based. The content of the IDZ3LIB can be integrated into the STM32W protocol packages as described below. 2.6.2 IDZ3LIB content Copy the file IDZ3LIB.zip contained in the CD in a folder of the PC and unzip it. In the following the installation folder is indicated as $IDZ3PATH. The library contains: pro/idz3lib which contains a customization of the sensor-sink application for version 4.0.2 and 4.3.0 of the EmberZNet protocol stack library – prebuilt contains binary files – sensor contains source files and an IAR project tailored to this application HAL contains the hardware configuration files for STEVAL documentation/idz3lib contains documents related to the kit and the SPZB32W1x2.x series of modules tools/idz3lib contains 2.6.3 – flasher utility to be used with STEVAL for loading a bin file on the STM32W – CP2102 contains a driver and a configuration tool for use of the CP2102 USB bridge device – batch files for installation of idz3lib in the package EmberZnet 4.0.2 or EmberZnet 4.3.0, as detailed in the following paragraphs. Integration of IDZ3LIB in EmberZnet 4.0.2 Install the EmberZnet 4.0.2 package available from ST. The package is installed in C:\Program Files\STMicroelectronics\EmberZnet-4.0.2 Run the batch file “set IDZ3LIB v402.bat” in $IDZ3PATH --> tools --> idz3lib. The batch file integrates the files contained in IDZ3LIB in the structure of EmberZNet 4.0.2. 2.6.4 Integration of IDZ3LIB in EmberZnet 4.3.0 package library Install the EmberZnet 4.3.0 package available from ST. The package is installed in C:\Program Files\STMicroelectronics\EmberZnet-4.3.0 Run the batch file “set IDZ3LIB v430.bat” in $IDZ3PATH --> tools --> idz3lib. The batch file integrates the files contained in IDZ3LIB in the structure of EmberZNet 4.3.0. 18/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 2.6.5 HW description Install the CP2102 drivers The following steps are needed to install the driver for use of the USB-UART bridge CP2102 on your PC. Note: The driver can be found on the silicon labs web page at www.silabs.com, and a copy is also included in the IDZ3LIB. Unzip the file CP210x_VCP_Win2K_XP_S2K3.zip Double click on CP210x_VCP_Win2K_XP_S2K3.exe to install the driver Connect the STEVAL by inserting the USB connector in one of the USB slots of the PC. To use the USB-to-UART bridge, the jumpers JP3, JP4, JP5, and JP6 must be configured as shown in Figure 11. When the driver is correctly installed, it is possible to see the COM associated to the STEVAL listed in the “Ports” field of the computer management utility of the PC (see Figure 15). If you want to connect multiple STEVALs to the PC via the USB-to-UART bridge, it is necessary to appropriately reprogram the ID associated to the CP2102 component. A tool from silicon labs can be used for this operation. That tool and related documentation is also available (an144sw.zip) in the IDZ3LIB. Figure 15. COM associated to USB-to-UART bridge 2.6.6 Install and run the Flash loader demonstrator tool STM32W Flasher, is a useful utility for loading the bin files on the STEVAL via the USB connector. Running stm32w_flasher.exe without arguments shows all the available command options, as shown in Figure 16. Doc ID 022085 Rev 2 www.BDTIC.com/ST 19/28 HW description UM1454 Figure 16. stm32w-flasher command syntax Also refer to the batch file contained in tools/idz3lib for the syntax of the command to be used to run the flasher. Remember to configure the options in the batch file by specifying the correct file name to be uploaded and the COM port to be used. 20/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 3 Install and run the sink-sensor application Install and run the sink-sensor application The sink-sensor application included in the IDZ3LIB is provided to allow the STEVAL user to easily set up a ZigBee network by using the hardware included in the kit. The sink-sensor is derived from the homonymous application included in the EmberZnet package libraries and shows the basic features of a distributed sensor network for remote monitoring. The sink-sensor application requires the use of at least two different STEVALs (or other compatible hardware), respectively running sink and sensor applications in the same network. 3.1 Sink-sensor sample application The sensor-sink application is an example of a complete application that implements a distributed sensor network with one or more data collection points (called “sensors”) and one data storage point (called “sink”). This application uses a “push” style of communication, where the sensor periodically sends reports to the sink without needing to be asked for this data. In this specific case, sensors capture temperature data measured by the sensor that is integrated in the STEVAL and sends that data to a sink that is connected to a PC. Data collected by the sink are then available at serial ports associated to the STEVAL when it is connected to a PC and they can be used by every kind of application running on it. The sink node is also set up to be the ZigBee coordinator device, and it forms the network automatically on first startup, therefore retaining these settings across reboots. The sink sends out advertisements (SINK_ADVERTISE) at regular intervals using a multicast (after making a many-to-one route request). If the joining procedure is activated by pushing a button on the board, a not joined sensor hearing a SINK_ADVERTISE sends a message (SENSOR_SELECT_SINK) requesting to use that sink (after setting its address table entry to the sink). If the sink has a free address table entry it responds with a sink ready message (SINK_READY) and, at that point, the sensor is free to send data (DATA) to the sink at fixed intervals (as set by SEND_DATA_RATE). The sink sensor communication is set with the following network parameters: CHANNEL - 26 PANID 0x01ff APP_EXTENDED_PANID {'s','e','n','s','o','r',0,0}. The payload of the packet sent by the sensor is 12 bytes long and it includes: 8 bytes corresponding to the 64-bit address of the sender 2 bytes corresponding to the temperature values as captured by the sensor integrated in the STEVAL 2 bytes corresponding to the voltage level as measured on the voltage meter integrated in the STEVAL. The sensor-sink application allows the user to interact with STEVAL by sending commands through a serial port (the COM associated to STEVAL when connected to the PC). Refer to the sink and sensor source files for the list of supported commands and implementation. Doc ID 022085 Rev 2 www.BDTIC.com/ST 21/28 Install and run the sink-sensor application 3.2 UM1454 Load sink-sensor on the STEVAL The kit includes the “bin” images of the sink-sensor application that can be loaded onto the STEVAL by using the Flasher downloader tool. The following steps should be followed. Configure the jumpers JP3, JP4, JP5 and JP6 as in Figure 11 for use of USB-UART bridge Configure the jumpers JP2 as in Figure 13 to activate the boot signal Plug the STEVAL into one of the USB slots on the PC and identify the serial port associated to the STEVAL (by using the Computer Management Utility of the PC) (See Figure 15). The power-LED (LED1) goes on to indicate the STEVAL is powered via the USB Run the Flasher as described in Section 2.6.6 by using the batch file where the user has specified the COM port to use and the sink.bin or sensor.bin (from C:\Program Files\STMicroelectronics\EmberZNet-4.x.x\STM32W108\app\idz3lib\prebuilt\sensor) file as per user needs Unplug the STEVAL and configure the jumper JP2 as in Figure 14 to use the loaded application. Note: The previous step can be followed to load any other “bin” images on the STEVAL. 3.3 Setting-up a network and running the sink-sensor application This section describes how to use the STEVAL to run the sink-sensor application. Refer to the source code files for details on the implementation and use of the EmberZnet APIs. The sensor-sink application can be run once the user has successfully loaded the sensor and sink applications as described in Section 3.2 on two different STEVAL boards Verify that jumper JP2 is configured as represented in Figure 14 In the procedure described below, the choice made was to connect both sensor and sink to a PC via the mini-USB connector. That allows to monitor the serial messages of both the sensor and the sink by using the HyperTerminal utility on your PC Connect sink. Verify JP3-4-5-6 are as in Figure 11 and connect STEVAL-sink to one of the USB slots of the PC. LED2 and LED3 start toggling which indicates the sink has appropriately formed the network as coordinator Open a HyperTerminal by specifying the COM associated to STEVAL-sink (see Figure 15) and by using the configuration 115200-8-NONE-1-NONE. The serial messages are seen, as shown in Figure 17. Press the reset button on STEVAL to make the sink application start from the beginning. The init, form and sink advertise messages are shown in Figure 17. 22/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 Install and run the sink-sensor application Figure 17. Sink advertise and form network messages Connect sensor. Verify JP3-4-5-6 are as in Figure 11 and connect STEVAL-sensor via the mini-USB to the PC. You see LED3 ‘on’ Open a HyperTerminal by specifying the COM associated to STEVAL-sensor (see Figure 15) and by using the configuration 115200-8-NONE-1-NONE To allow the sensor to join the network set up by the STEVAL-sink, press the SW3 button on STEVAL-sink and the SW3 button on STEVAL-sensor in an interval shorter than 60 seconds. If this join operation sequence runs successfully the LED2 and LED3 on the STEVAL-sensor start toggling Figure 18 and 19 respectively show the serial messages of sink and sensor respectively during the join phase. After the network is set up, the sensor sends a data packet every 10 seconds that contains the temperature value, the power supply voltage and the node ID, as also shown in the same figures. Figure 18. Sink: join and data messages Doc ID 022085 Rev 2 www.BDTIC.com/ST 23/28 Install and run the sink-sensor application UM1454 Figure 19. Sensor: join and data messages Commands can be sent through the HyperTerminal to both the STEVAL-sink and the STEVAL-sensor. For example, in Figure 20 the result of the command “i=print node info” sent to STEVAL-sink can be seen. Figure 20. Sink: “i” command output Note: The application uses a constant called MISS_PACKET_TOLERANCE as a threshold for fault tolerance. On the sensor, this threshold controls how many message timeouts can be permitted between the sensor and sink before the sensor decides to attach itself to a different sink. For a sink, this controls how many data reports can be missed from a sensor before the sink “forgets” about the sensor (stops maintaining a record of its attachment). Although bindings are kept on the sink node to track the attached sensors, these could easily be made temporary (used only for the SINK_READY message) to allow the sink application to support more nodes without enlarging the binding table, assuming that the sink application does not care which sensors and how many sensors are attached to it. 24/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST UM1454 RoHS compliance Note: The sensor advertisement is a broadcast. The behavior of such a broadcast in the network depends on the network topology and density. ZigBee limits the number of broadcasts that can be active in a network to 10 to minimize the network disruption and loss of bandwidth. As this network increases in size or density, the rate of the sensor advertisement should be reduced in frequency. 4 RoHS compliance ST modules and demonstration boards are RoHS compliant and comply with ECOPACK® norms. Doc ID 022085 Rev 2 www.BDTIC.com/ST 25/28 26/28 "96 $ Doc ID 022085 Rev 2 www.BDTIC.com/ST -).)53"#/..%#4/2 53"'.$ #/.! 53"?6 # N # U 6 408 $ 6 $ $ '.$ $ 5 53"5&7 53" 2 .- 53"23INTERFACE 40 # N 2 + 2 + #0 6"53 234 .# 3530%.$ 3530%.$ .# .# # U& $$# 2) $'. $ $ D 6D .') 2% * 2 + ! ! ! 6D D 4%-0%2!452%3%.3/2 '.$ /3).4 3# , 3$! N& # '2 %%. ,% $ 53"6CC 53"$ 53"$ 2 + 0#*4$/ N2%3%4 5 2 +/HM 2 +/HM 0! 0" # U 6 4!.4 5 $42 $32 48$ 28$ 243 #43 .# 4! " 37 # N 37053("544/. 0" 2 + *0 *0 *0 *0 37 # N 3#48$ 3#28$ 5!24?#43 5!24?243 + 2 0" 2 + 6 # N 4YPE 2%3%4053("544/. 37053("544/. 37 37053("544/. 6 40 2 /(- 40 ,%$ 2%$ /HM 2 ,%$ 9%,,/7 /HM 2 408 # N 6 0" 0! :)'"%%-/$5,%30:"7 *0 "OOTLOADER%NABLE 2 + 0#*4234 0#*4$) 6 )-$! 0OWERSUPPLYOREXTBATTERYMEASURING CIRCUIT6MAX6EXT 34,- 37#,+*4#+ 1 # N /HM 2 6 0! 0! 0! 2 + '. $ 6 0! 0! 0# 0! 0! 0" 0" 0# 0# 0# 0# #+ *4 0" 0" 0" 0# 0#*4-3 "Y0ASS ,OWQUIESCENTCURRENTOPTIONALREGULATOR $4RC $4RE $4RIN $4RIN $4RE $42C 2 + '.$ ).()")4 6OUT ,$3-2 5! -#04%44 6IN 6OUT 6IN 5 0! * 2 + # N # 6 U 53"?6 N2%3%4 0" 0! 0! 0! %3%4 N2 0" 0" 0! 0! 0! $'. TBA6$$ 6 *4!'%-5,!4/2#/..%#4/2 # N *0 0" %84%.3)/.#/..%#4/2 6BATT '.$BATT 6OUT '.$ 0# 0# 0! 0! 0" 0" 0" 0" 0! 0! 0! 0! 0! 0! 0#*4234 0#*4$) 0#*4-3 37#,+*4#+ 0#*4$/ N2%3%4 0,5' :" Appendix A #/. * * STEVAL electrical schematic UM1454 STEVAL electrical schematic Figure 21. Schematic !.4%..! 0# 0! 0! 0" 0" 4 23 *4 0# -3 *4 0# $) *4 0# $/ *4 0# #+*4+#, 37 0" 0# .# .# .# .# .# .# .# !-6 UM1454 Revision history Revision history Table 6. Document revision history Date Revision Changes 29-Nov-2011 1 Initial release. 12-Dec-2011 2 Minor text changes to improve readability Doc ID 022085 Rev 2 www.BDTIC.com/ST 27/28 UM1454 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. © 2011 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 28/28 Doc ID 022085 Rev 2 www.BDTIC.com/ST
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Related manuals
Download PDF
advertisement