APPLICATION NOTE Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide Atmel 32-bit Microcontroller Features • • • • • • • • • Atmel® ATSAM3X8E microcontroller Atmel AT86RF231 2.4GHz radio transceiver 2.4GHz ZigBee® front end module SE2431L integrated PA and LNA 10/100Mbps Ethernet with LED indicators 8Mbit PSRAM Three LEDs and two mechanical buttons are user controllable External power supply 5VDC via Micro-USB AB connector Program/debug interface: JTAG, USB, COM port Wi-Fi module connector Introduction The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X is a hardware platform to demonstrate built-in functions with ZigBee and Ethernet/Wi-Fi. It is a bridge between wireless network (ZigBee) and wired network (Ethernet), and also a bridge between wireless (ZigBee) and wireless (Wi-Fi). For this reference design, the hardware design files (schematic, BoM and PCB gerber) and software source code can be downloaded from Atmel website. The provided hardware documentation can be used with not limitations to manufacture the reference hardware solution for the design. Figure 1. ZigBee to Ethernet and Wi-Fi Gateway with SAM3X 32199D-SAM−08/2013 Table of Contents 1. General Information ........................................................................... 3 1.1 1.2 1.3 Components for set up ...................................................................................... 3 Power supply..................................................................................................... 3 Programming the board .................................................................................... 4 2. Connectors ........................................................................................ 5 2.1 2.2 2.3 Programming headers....................................................................................... 5 Chip erase header............................................................................................. 5 Wi-Fi connector ................................................................................................. 5 3. Peripherals ......................................................................................... 7 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Radio transceiver .............................................................................................. 7 Front end module .............................................................................................. 7 Ethernet ............................................................................................................ 7 Mechanical buttons ........................................................................................... 8 LEDs ….. ........................................................................................................... 8 PSRAM ............................................................................................................. 9 Temperature sensor ........................................................................................ 10 4. Code examples ................................................................................ 13 5. Revision history................................................................................ 14 Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 2 1. General Information The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X is intended to demonstrate Atmel low cost ZigBee to Ethernet and Wi-Fi gateway solution. Figure 1-1 shows the available peripherals on the board. Figure 1-1. Overview of ZigBee to Ethernet and Wi-Fi Gateway with SAM3X. 1.1 Components for set up To fully perform all functions of the board, it should have the components shown in Table 1-1. Table 1-1. 1.2 Components for set up. Component Function Board The main board Antenna Used for ZigBee micro USB cable Power for the board and USB connection RJ45 cable Used for Ethernet connection RS232 cable Used for RS232 connection SAM-ICE™ Debug and programming SAM-ICE adapter Used for connecting with SAM-ICE and PC Power supply The board needs an external power supply that can deliver 5V and up to 500mA. The actual current requirement for the board is much less than 500mA but in order to be able to power optional expansion boards this margin is recommended. The power can only be applied to the board via the Micro-USB AB connector. The 5V (USB supply voltage) is regulated down to 3.3V with an onboard LDO regulator, which provides power to the entire board. Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 3 1.3 Programming the board The board can be programmed through JTAG, COM port or USB interfaces. How a programmer can be connected to the board is described in Atmel AT2242: ZigBee PRO to Ethernet and Wi-Fi Gateway with SAM3X - Getting Started Guide. Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 4 2. Connectors The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X has three header connectors which are shown in Table 2-1. Table 2-1. 2.1 Connector and functions. Connector Function J2 JTAG for programming J3 Chip Erase J6 Wi-Fi connector Programming headers The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X can be programmed and debugged by connecting an external programming/debugging tool to the JTAG header shown in Figure 1-1. It can be connected with SAM-ICE through SAM-ICE adapter. UART can also be connected to PC through SAM-ICE Adapter. For more details of SAM-ICE adapter, please refer to “Atmel AVR2033: SAM-ICE Adapter – Hardware User Manual”. Table 2-2. Pin on programming header JTAG 1 TCK 2 GND 3 TDO 4 P3V3 5 TMS 6 RST 7 P3V3 8 RXD 9 TDI 10 TXD Note: 2.2 Programming and debugging interface – JTAG. RXD, TXD are used for UART. Chip erase header The chip erase header J3 is used to erase flash content. ERASE is connected to PC0. When performing a flash erase operation, PC0 must be tied high during more than 220ms after power on. 2.3 Wi-Fi connector The header J6 in Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X offers SPI interface to connect with external Wi-Fi module. Table 2-3 shows the connection between Wi-Fi module and MCU pins. Note: The available Wi-Fi add-on card is RS-SAM3S-220X designed by REDPINE SIGNALS. It can be found at: http://www.redpinesignals.com/Atmel/rs-sam3s.html. Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 5 Table 2-3. Wi-Fi connector J6. Pin on J6 Name on J6 MCU pin 1 RST PA11 2 PWR PA17 3 INTR PA15 4 - - 5 CS PA14 6 MOSI PA13 7 MISO PA12 8 SCK PA16 9 GND - 10 P3V3 - Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 6 3. Peripherals 3.1 Radio transceiver The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X has a low power 2.4GHz transceiver AT86RF231 for ZigBee. It is a true SPI-to-antenna solution. All RF-critical components except the antenna, crystal and de-coupling capacitors are integrated on chip. Table 3-1 shows the MCU pin connection with AT86RF231. Table 3-1. 3.2 ZigBee connections. Pin on MCU AT86RF231 Test point PA27 SCK TP9 Function PA25 MISO TP8 PA26 MOSI TP10 PA28 CS TP11 PA1 IRQ TP12 Interrupt request signal from AT86RF231 PB21 SLPTR TP6 Control sleep, transmit start, receive states PB20 RST TP7 Reset AT86RF231 SPI interface Front end module The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X contains 2.4GHz ZigBee/802.15.4 front end module SE2431L. It integrates PA with up to 24dBm output power and LNA with programmable bypass. It can be controlled by AT86RF231 shown in Table 3-2. Table 3-2. 3.3 SE2431L connections. Pin on SE2431L Pin on AT86RF231 ANT_SEL DIG1 CSD AVDD CTX DIG3 Ethernet The Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X uses DM9161A as the Ethernet transceiver. The DM9161A is a physical layer, single-chip, and low power transceiver for 100BASE-TX and 10BASE-T operations. The Ethernet connection on the Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X is shown in Table 3-3. Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 7 Table 3-3. 3.4 Ethernet connections. Pin on MCU DM9161A Function PB13 ETH_CRY Control crystal PB12 ETH_RST Reset DM9161A PB0 EREFCK PB3 ETX1 PB2 ETX0 PB1 ETXEN PB6 ERX1 PB5 ERX0 PB4 ECRSDV PB7 ERXER PB8 EMDC PB9 EMDIO PA5 MDINTR EMAC interface Interrupt signal from DA9161A Mechanical buttons There are three mechanical buttons on Atmel ZigBee to Ethernet and Wi-Fi Gateway with SAM3X. One is for system reset and others are for user purpose. All user purpose buttons have external pull-ups so there is no need to activate internal pull-ups in order to use them. When a button is pressed it will drive the I/O line to GND. Table 3-4. 3.5 Mechanical button connections. Pin on MCU Silkscreen text on PCB NRSTB SW1 PA18 SW2 PA19 SW3 LEDs There are six LEDs available on the board that can be turned on and off. D5 is used for power indicator. D2, D3, D4 are used for Ethernet indicator which are controlled by DM9161A. Table 3-5. Hardware LED functions. LED Function D2 Full duplex D3 Speed 100 D4 Link and act D5 Power indicator D6 is used for user purpose on or off. D7 is a bi-color LED for user purpose. Table 3-6. User controllable LED connections. Pin on MCU LED PA20 D6 PB17 D7 (Red) PB18 D7 (Green) Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 8 3.6 PSRAM The ZigBee to Ethernet and Wi-Fi Gateway with SAM3X contains 8M bit PSRAM. The part number is IS66WV51216DBLL-55TLI. More detailed information, see the web site: http://www.issi.com/products-asynchronoussram.htm. Table 3-7. PSRAM connections. Pin on MCU PSRAM PC2 D0 PC3 D1 PC4 D2 PC5 D3 PC6 D4 PC7 D5 PC8 D6 PC9 D7 PC10 D8 PC11 D9 PC12 D10 PC13 D11 PC14 D12 PC15 D13 PC16 D14 PC17 D15 PC22 A0 PC23 A1 PC24 A2 PC25 A3 PC26 A4 PC27 A5 PC28 A6 PC29 A7 PC30 A8 PD0 A9 PD1 A10 PD2 A11 PD3 A12 PD4 A13 PD5 A14 PD6 A15 PD7 A16 PB10 A17 PB11 A18 PB24 CS PA29 OE PC18 WE PC21 LB PD10 UB Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 9 3.7 Temperature sensor The temperature sensor circuitry consists of a serial connection of a normal and a NTC resistor. The NTC sensor is from Murata and some part details are shown in Table 3-8. More information can be obtained from the manufacturer’s (Murata) website. Table 3-8. NTC characteristics. Global part number NCP18WF104J03RB Resistance (25°C) 100kΩ ±5% B-Constant (25/50°C) (reference value) 4250K ±2% B-Constant (25/80°C) (reference value) 4303K B-Constant (25/85°C) (reference value) 4311K B-Constant (25/100°C) (reference value) 4334K Table 3-9 shows the temperature vs. resistance characteristic. The values are available from Murata in the datasheet of the NTC. Table 3-9. Resistance vs. temperature (from Murata). Temp. [°C] NTC resistance [kΩ] Temp. [°C] NTC resistance [kΩ] Temp. [°C] NTC resistance [kΩ] Temp. [°C] NTC resistance [kΩ] -30 2197.225 0 357.012 30 79.222 60 22.224 -29 2055.558 1 338.006 31 75.675 61 21.374 -28 1923.932 2 320.122 32 72.306 62 20.561 -27 1801.573 3 303.287 33 69.104 63 19.782 -26 1687.773 4 287.434 34 66.061 64 19.036 -25 1581.881 5 272.500 35 63.167 65 18.323 -24 1483.100 6 258.426 36 60.415 66 17.640 -23 1391.113 7 245.160 37 57.797 67 16.986 -22 1305.413 8 232.649 38 55.306 68 16.360 -21 1225.531 9 220.847 39 52.934 69 15.760 -20 1151.037 10 209.710 40 50.677 70 15.184 -19 1081.535 11 199.196 41 48.528 71 14.631 -18 1016.661 12 189.268 42 46.482 72 14.101 -17 956.080 13 179.890 43 44.533 73 13.592 -16 899.481 14 171.028 44 42.675 74 13.104 -15 846.579 15 162.651 45 40.904 75 12.635 -14 797.111 16 154.726 46 39.213 76 12.187 -13 750.834 17 147.232 47 37.601 77 11.757 -12 707.524 18 140.142 48 36.063 78 11.344 -11 666.972 19 133.432 49 34.595 79 10.947 -10 628.988 20 127.080 50 33.195 80 10.566 -9 593.342 21 121.066 51 31.859 81 10.200 -8 559.931 22 115.368 52 30.584 82 9.848 -7 528.602 23 109.970 53 29.366 83 9.510 -6 499.212 24 104.852 54 28.203 84 9.185 -5 471.632 25 100.000 55 27.091 85 8.873 -4 445.772 26 95.398 56 26.028 86 8.572 -3 421.480 27 91.032 57 25.013 87 8.283 Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 10 Temp. [°C] NTC resistance [kΩ] Temp. [°C] NTC resistance [kΩ] Temp. [°C] NTC resistance [kΩ] Temp. [°C] NTC resistance [kΩ] -2 398.652 28 86.889 58 24.042 88 8.006 -1 377.193 29 82.956 59 23.113 89 7.738 Two common approximations can be used to model the temperature vs. resistance characteristic; these are the B parameter and the Steinhart-Hart equations. Coefficients for both formulas can be calculated from Table 3-9. When the reference 3.3V is used and the ADC is measuring in signed single ended mode the codes in Table 3-10 can be read from the ADC at the various temperatures. The calculation is based on Table 3-9. Table 3-10. ADC codes vs. temperature (signed single ended mode with 3.3V reference). ADC input [V] Temp. [°C] ADC codes ADC input [V] Temp. [°C] ADC codes 2.076 -14 644 0.347 38 108 2.030 -13 630 0.334 39 104 1.983 -12 615 0.321 40 100 1.936 -11 601 0.309 41 96 1.889 -10 586 0.297 42 92 1.841 -9 571 0.286 43 89 1.794 -8 557 0.275 44 85 1.747 -7 542 0.264 45 82 1.700 -6 527 0.254 46 79 1.653 -5 513 0.244 47 76 1.606 -4 498 0.235 48 73 1.560 -3 484 0.226 49 70 1.514 -2 470 0.218 50 68 1.469 -1 456 0.209 51 65 1.425 0 442 0.202 52 63 1.380 1 428 0.194 53 60 1.337 2 415 0.187 54 58 1.294 3 402 0.180 55 56 1.252 4 389 0.173 56 54 1.211 5 376 0.167 57 52 1.171 6 363 0.161 58 50 1.131 7 351 0.155 59 48 1.093 8 339 0.149 60 46 1.055 9 327 0.144 61 45 1.018 10 316 0.138 62 43 0.982 11 305 0.133 63 41 0.947 12 294 0.128 64 40 0.913 13 283 0.124 65 38 0.880 14 273 0.119 66 37 0.848 15 263 0.115 67 36 0.817 16 254 0.111 68 34 0.787 17 244 0.107 69 33 0.758 18 235 0.103 70 32 0.730 19 226 0.100 71 31 0.702 20 218 0.096 72 30 Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 11 ADC input [V] Temp. [°C] ADC codes ADC input [V] Temp. [°C] ADC codes 0.676 21 210 0.093 73 29 0.650 22 202 0.090 74 28 0.626 23 194 0.086 75 27 0.602 24 187 0.083 76 26 0.579 25 180 0.081 77 25 0.557 26 173 0.078 78 24 0.535 27 166 0.075 79 23 0.515 28 160 0.073 80 23 0.495 29 154 0.070 81 22 0.476 30 148 0.068 82 21 0.458 31 142 0.065 83 20 0.440 32 137 0.063 84 20 0.423 33 131 0.061 85 19 0.407 34 126 0.059 86 18 0.391 35 121 0.057 87 18 0.376 36 117 0.055 88 17 0.361 37 112 0.053 89 17 Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 12 4. Code examples The example application is based on the Atmel BitCloud®. More detailed information about BitCloud can be found at: http://www.atmel.com/tools/bitcloud-zigbeepro.aspx. For more information about the code example, see the application note “Atmel AT2242: ZigBee PRO to Ethernet and Wi-Fi Gateway with SAM3X - Getting Started Guide”. Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 13 5. Revision history Doc. Rev. Date Comments 32199D 08/2013 Updated url link issues. 32199C 08/2013 Updated product line name in footer from AVR to SAM. Updated app note name in url’s in section 1.3 Programming the board and chapter 4.Code examples. 32199B 07/2013 Added some sentences in description section and changed the AN name 32199A 01/2013 Initial document release Atmel AT2200: ZigBee to Ethernet and Wi-Fi Gateway with SAM3X - Hardware User’s Guide [APPLICATION NOTE] 32199D-SAM−08/2013 14 Atmel Corporation Atmel Asia Limited Atmel Munich GmbH Atmel Japan G.K. 1600 Technology Drive Unit 01-5 & 16, 19F Business Campus 16F Shin-Osaki Kangyo Building San Jose, CA 95110 BEA Tower, Millennium City 5 Parkring 4 1-6-4 Osaki USA 418 Kwun Tong Road D-85748 Garching b. Munich Shinagawa-ku, Tokyo 141-0032 Tel: (+1)(408) 441-0311 Kwun Tong, Kowloon GERMANY JAPAN Fax: (+1)(408) 487-2600 HONG KONG Tel: (+49) 89-31970-0 Tel: (+81)(3) 6417-0300 www.atmel.com Tel: (+852) 2245-6100 Fax: (+49) 89-3194621 Fax: (+81)(3) 6417-0370 Fax: (+852) 2722-1369 © 2013 Atmel Corporation. All rights reserved. / Rev.: 32199D-SAM−08/2013 Atmel®, Atmel logo and combinations thereof, AVR®, BitCloud®, Enabling Unlimited Possibilities®, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS 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 products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.