Home

User Manual deRFnode / deRFgateway - Digi-Key

image

Contents

1. Pin Function deRFmega128 Function deRFarm7 1 GND GND 2 VCC VCC 3 SW2 or PD6 T1 SW2 or PA4 CTSO SPI1_NPCS3 4 PB5 OC1A PCINT5 PB15 ERXDV ECRSDV 5 PD2 RXD1 INT2 PAO RXDO 6 PB4 OC2 PCINT4 PB6 ERX1 7 PE2 XCKO AINO PB9 EMDIO 8 PB3 MISO PCINT3 PDO PA16 SPIO MISO 9 PE3 OC3A AIN1 PB21 PWM2 PCK1 10 PBO SSN PCINTO PBO ETXCK EREFCK 11 PB6 OC1B PCINT6 PB8 EMDC 12 PB2 MOSI PCINT2 PDI PA17 SPIO MOSI 13 PE4 OC3B INT4 PB19 PWMO TCLK1 14 CLKI PA3 RTSO SPI1_NPCS2 15 PFO ADCO PB27 TIOA2 PWMO ADO 16 PB1 SCK PCINT1 PA18 SPIO SPCK 17 PF1 ADC1 PB28 TIOB2 PWM1 AD1 18 PD5 XCK1 PB2 ETXO 19 PE6 T3 INT6 PB5 ERXO 20 PG1 DIG1 USBDM 21 PE7 ICPS CLKO INT7 PB7 ERXER 22 PD4 ICP1 USBDP 23 PF2 ADC2 PB1 ETXEN 24 PD7 TO PB25 TIOA1 DTR1 25 PD3 TXD1 INT3 PA1 TXDO 26 PD1 SDA INT1 PA10 TWD 27 PG5 OCOB PB26 TIOB1 RI1 28 PDO SCL INTO PA11 TWCK 29 PG2 PB3 ETX1 30 RSTN RSTN dresden elektronik ingenieurtechnik gmbh Enno Heidebroek Str 12 01237 Dresden Germany Tel 49 351 31 85 00 Fax 49 351 3 18 50 10 wireless dresden elektronik de www dresden elektronik de Page 23 of 56 User Manual Versi Reeg deRFnode and deRFgateway 31 PB7 OCOA OC1C PCINT7 PB18 EF100 ADTRG 32 AREF ADVREF 33 VCC VCC 34 GND GND 7 6 Jumper configuration The following table shows the possible jumper configur
2. 1 1 i 1 H j VCC w VCC 1 1 R49 adjustable Vcc nb h b azi OROO 2M 820k best ckt 3 3V cie 1 b nur 820k bestiickt 2 7V Via nur 2M best ckt 1 8V 1uF eee eee d DGND Be DGND TPS79433DGN fixed version Current measurement of radio module JPS voe t O O ve module JP 2 VBUS Monitoring Vee vocc VCC VOC R28 e in36 USBSV 7 iem lt Ping gt Programmable Supervisor R29 47k0 overlapping pads of same net DGND VBAT Monitoring JP3 R42 f vaart OL D emm OO JP 2 820k R43 LTC2935ITS8 1 220k S2 S1 S0 Low High High gt gt Vth 3 00V 2 S1 SO High Low High gt gt Vth 2 40V DGND DGND DGND DGND dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFgateway 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 103 02 Power Supply SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 25 DrawnBy NOS APA Sheet 2 of 6 Rev 2 0 VBUS DGND R30 1K50 C28 USB Data ARM 15pF R31 USBDM_ARM 7R Pin4 USBDP_ARM Pin32 Se OEE OE R32 H 7R USB Device Connection R34 place pads directly on usb R35 R36 M OROD data lines to avoid stubs in assembly variants GR S 15pF X10 i VBUS USBDM H USBDP DGND DGND DGND i R37 R38 OROOL OROO D9 H IP4220CZ6
3. Title Telefon 0351 31 85 00 deRFnode 2TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 105 02 Flash Sensors SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 14 04 DrawnBy NOS APA Sheet 6 of 6 jRev 2 0
4. radio transceiver in listening state 2 depends on external load 5 3 2 Current consumption Test conditions T 25 C Firmware executed from Flash no external cabling i e Level Shifter JTAG unless stated otherwise 5 3 2 1 DC powered The used AC DC converter has an output voltage of 5VDC Table 6 HW Setup 1 Sleep Idle Typ Max deRFgateway 1 TNP2 00N00 deRFarm7 24mA 97mA 161mA 9 200mA deRFnode 1TNP2 00NO00 deRFarm7 250uA 37mA 41mA 80mA deRFnode 2TNP2 00NO00 deRFarm7 5mA 34mA 38mA 80mA deRFnode 2TNP2 00NO00 deRFmega128 10pA 10mA 20mA 40mA 5 3 2 2 Battery powered variable voltage When battery powered the current consumption does not significantly differ from the values given above only if using an AVR based MCU the current consumption sinks slightly Re mark the notes on working voltage above 5 3 2 3 USB powered When USB powered the current consumption increases to the values given above due to USB transceiver activity dresden elektronik Tel 49 351 31 85 00 Page 12 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual ee deRFnode and deRFgateway Table 7 HW Setup 2 Sleep Idle Typ Max deRFgateway 1TNP2 00NO00 deRFarm7 24mA 97mA 166mA 9 200mA
5. Title Telefon 0351 31 85 00 deRFnode 2TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 105 02 USB SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 14 03 DrawnBy NOS APA Sheet 3 of 6 Rev 2 0 Ethernet Plug amp PHY R2 Wee ETH 0R00 X4 R3 Z Al C on Soo 220R Ki LED LINK ETH E TD ETH TD RD 9 f D avcc ETH ETx1 RD ETxO BX ETxEN AGND ext to RJ45 C2 C3 Pin39 100nF 100nF lt Pin39 gt ERKER X AGND AGND SHIELD Kors w l kono nm ERx1 R10 Aco WEN Eni AVCC X de 792 66 4 LED ACT Ch bs 07 b BSCS EBC4 39 4 100nF 100nF four 10uF ERXDM 2 406549 1 RJ45 vollgesch m LED 19 42 40 AGND x R12 pak a EMDC ge B Hee 4k7 EMDIO R13 742 792 66 xe e 1K50 7 Pin20 EC SEE C13 RC Io SERCH lt Pin20 gt MDINTR 10uF 100nF 100nF 100nF 29 Pin5 me gt RSTN DGND vee N LED ACT Eur is 100nF 100nF LED LINK DP83848l dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Telefon 0351 31 85 00 deRFnode 2TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 105 02 Ethernet SchDoc Nr nderung Datum Name Date 18 03 2011 Time 10 14 03 DrawnBy NOS APA Sheet 4 of 6 Rev 2 0 swa gt sw2
6. p 4ypF ebe Ts DGND DGND USBsV USB 3 3V A A DGND Figure 19 Serial USB interface part 1 The control of the FT245RL is established over the following signals USBRD Pin 27 USBWR Pin 10 RX Pin 30 TX Pin 21 dresden elektronik Tel 49 351 31 85 00 Page 30 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual GE deRFnode and deRFgateway USB D1 18 USB Dn USB D2 17 USB Bit2 USB D3 16 USB Bit3 USB D4 15 USB Bit4 USB D5 14 USB D6 13 USB D7 12 do bam DGND TXB0108 B 3 3V A 1 8V 3 3V Voca lt Vccb NSsasszrse lt gt REEBREERS Voca lt Vecb Figure 20 Serial USB interface part 2 8 4 Ethernet The Ethernet interface is offered only on the deRFgateway platform and can be used in combination with the deRFarm7 radio module which contains an Ethernet MAC The deRFgateway is assembled with the Ethernet PHY DP83848l and runs in RMII mode with a 50 MHz clock The Ethernet PHY is connected with the radio module microcontroller over the following sig nal pins ETXO Pin 12 ETX1 Pin 6 ERXO Pin 37 ERX1 Pin 19 ETXEN Pin 41 ERXER Pin 39 ERXDV Pin 21 EMDC Pin 18 EMDIO Pin 30 MDINTR Pin 20 dresden elektronik Tel 49 351 31 85 00 Page 31 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless
7. 28 8 3 AE AER 28 8 3 1 Native USB only for ARM based radio modules nanne 29 8 3 2 USB serial for AVR based radio modules 29 Ss EOE INN ori routed neten ene aces gedEege 31 De 32 MES alic c M RRt 34 8 7 Cutrentitigas DIBITIGIL E 36 8 8 USB supply voltage monttorimg en 36 8 9 Battery supply voltage monttortng eennnennn neer eneeenennnennnven 37 dresden elektronik Tel 49 351 31 85 00 Page 2 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway SPEM EE 38 9 1 Requirements EIWASWW soccisunontcs cvonceatcasoeneteneeseunaigebioretesei ediass dorenecebweateranecanenl 38 9 1 1 Source code and compiler toolchain ANEN 38 9 1 2 JTAG programming and adapter selection nnn eenen 38 9 1 3 JTAG programming software nn annnnnnneeneneeeeennneneneerenenenennnennneen 38 9 2 AVR based radio modules over ITA 39 9 3 ARM based radio modules over ITA 41 9 4 Software programming model teat betta xoa nnb t pura px naren dee 42 9 4 1 Enabling the reset supervisor 42 9 4 2 Initialize and use I2C devices AEN 42 9 4 3 Using the USB interface une 44 9 4 4 Measuring the battery voltage AAA 45 9 4 5 Accessing the external flash AAA 47 9 4 6 Initialize and use the Ethernet transceiver nnen eenen 48 9 4 7
8. CPingd gt Pin44 Debug Header X5 DEBUG HEADER TDI TMS TCK TDO RSTN JTAG HEADER AVR DGND Separated PCB only for case version l O Header d 3 VCC IO HEADER Buttons for User Input SWI for AVR E ET swi 2 JP6 Mied JP 3 Taster for ARM Pin14 SW2 PEN aes 0 e Sw2 xu DGND Taser swi sw2 DGND Sw Extension LEDs for User Output VCC Separated PCB only for case version EC be i Sw3 I i X3 L 1 Taster SW1 I SW2 L sw4 i s Taster DGND Sw Extension I po ee nnn elektronik ingenieurtechnik gmbh dresden D 01237 Dresden Enno Heidebroek Str 12 Title deRFnode 2TNP2 00NO0 Telefon 0351 31 85 00 Telefax 0351 31 85 010 Size Document Number A4 5 646 16 02 105 02 Document File Name Interfaces SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 14 04 DrawnBy NOS APA Sheet 5 of 6 jRev 2 0 4M Bit Flash Memory vee VCC Acceleration Sensor Internal TWI Address 0111 000 R W R W 0 gt Write R W 1 gt Read Ambient Light Sensor Internal TWI Address 1000 100 R W R W 0 gt Write R W 1 gt Read Temperature Sensor Internal TWI Address 1001 000 R W R W 0 gt Write R W 1 gt Read ISL29020IROZ T7 TMP102AIDRLT 100nF 100nF dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12
9. JP5 vec t O O voe module JP 2 VBUS Monitoring R28 USB5V lt Pins C pings gt 30k0 R29 47k0 overlapping pads of same net i 1 1 DGND VBAT Monitoring JP3 R42 f i vaart OO Pinot pat gt JP 2 820k R43 LTC2935ITS8 1 220k S2 S1 S0 Low High High gt gt Vth 3 00V S2 S1 S0 High Low High gt gt Vth 2 40V DGND DGND DGND DGND dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFnode 2TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 105 02 Power Supply SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 14 03 DrawnBy NOS APA Sheet 2 of 6 jRev 2 0 VBUS DGND A R30 1K50 USB Data ARM USBDM_ARM Pin4 USBDP ARM Pins fine c reme beers PEAR USB Device Connection R33 R34 place pads directly on usb OROOL OHOD data lines to avoid stubs in 330k 330k 1 bly variants pet E x10 assembly vai VBUS USBDM USBDP DGND DGND DGND D9 IP4220CZ6 PIRA E DE USB TypeB SHIELD USB Data AVR USBDM AVR 1OnF 2kV DGND SE DGND TXB0108 B 3 3V A 1 8V 3 3V USBRD Vcca lt Vecb USBWR USB 3 3V USBWR 41 100nF 5 NS ro aaa ab DGND DGND TXB0108 NC7SZ02M5 B 3 3V A 1 8V 3 3V Vcca lt Vccb dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12
10. 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 8 1 Onboard sensors Both platforms are assembled with onboard sensors temperature ambient light and accel eration All sensors are accessible over two wire interface of deRFnode and deRFgateway The device addresses are noted in the following subsections The data and clock lines are assembled with 10k pull up resistors R22 and R23 TWI clock Pin 7 TWI data Pin 9 8 1 1 Temperature sensor The temperature sensor TMP102AIDRLT communicates over two wire interface with the mi crocontroller of the radio module Details of operation are described in the datasheet TWI address 1001 000 R W Write R W 0 Read R W 1 IC7 Pin7 Pin9 ALERT GND TMP102AIDRLT DGND Figure 13 Temperature sensor TMP102AIDRLT 8 1 2 Ambient light sensor The assembled ambient light sensor ISL29020IROZ T7 communicates over two wire interface with the microcontroller of the radio module Details of operation are described in the datasheet TWI address 1000 100 R W Write R W 0 Read R W 1 VCC C26 A SDA VDD SCL REXT AO GND Figure 14 Ambient light sensor ISL29020IROZ T7 dresden elektronik Tel 49 351 31 85 00 Page 26 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik d
11. When working with FTDI the chip encapsulates the USB protocol The only interface are the control RD WR RXF TXE and data lines Here the initialization procedure consists of 1 switching RD and WR to output pins internal pull up s enabled 2 set RXF TXE and data lines as input pins 3 optionally empty USB FIFO buffer by performing dummy reads Data bytes available for reading are signalized by RXF being L as long as the buffer is not completely empty A byte can be read by toggling RD from H to L then get the state on all 8 data lines and put RD back to H level Writing bytes is performed vice versa First check the level on TXE If it is H the transceiver is busy or the internal buffer is full Otherwise the transmission may start by setting the 8 data lines according to the transmit byte then toggle WR from H to L and back To improve per formance writing should always be done block wise The octal bus driver is automatically enabled by the internal USB CE signal if at least one of the RD or WR goes L means reception transmission in progress On the other side you should ensure that RD and WR are permanently driven H if you do not use the USB over FDTI to prevent the bus driver energizing back the FTDI circuit For simplified detecting whether a USB cable is plugged or not the VBUS signal may be used active high On the FTDI variant this only works reliable if RD and WR are driven H The device driver required
12. enable twi interrupt During the next step the devices are configured This includes activity intervals resolution sensitivity triggers when exceeding falling below given limits etc Usually the sensors power up idle and must be explicitly started Additionally the acceleration sensor includes a configu ration EEPROM in which an overriding startup configuration may be saved Configuration is usually done by writing to device registers and incorporates 1 initiate a TWI start condition 2 write the configuration register address 3 write the configuration register value 4 send a TWI stop condition So if you i e want to activate the TMP102 temperature sensor measuring temperatures only upon request select the configuration register MSB 0x01 and write in 0x80 to shut down the device Here TWID Write encapsulates all the required steps in one function define BOARD SENS ADDR TEMP 0x48 sensor address lbit shifted unsigned char ucBuf 2 buffer for twi transmissions ucBuf 0 0x01 configuration register MSB ucBuf 1 0x80 shutdown mode TWID Write amp twid BOARD SENS ADDR TEMP 0x00 0x00 ucBuf 0x02 NULL As like as configuration is performed sensor values are read from device registers Depend ing on the device you may either read the current register value directly or must send a start command first and wait a certain time until measurement is available otherwise you would read
13. USBTypeB suppl 145 Ica USB Data AVR FT245RL USBDM AVR 16 USB USBDP AVR 5 USB 3 USB 10nF 2kV 18 UE C30 EBBBC31 USB 47pF 47pF USB USB DGND DGND USB DGND USB5V USB 3 3V RXF TX80108 A A TXE B 3 3V A 1 8V 3 3V USBRD Vcca lt Vccb Dn ee USBWR PWREN gh 100nF Ch mco 100nF 100nF DGND DGND DGND IC9 USBWR USB 3 3V Ri E USBWR 4 USBWR 41 100nF 5 DGND USB 3 3V d So 3 bats DGND TXB0108 w s i B 33V A 1 8V 3 9V Vcca lt Vecb dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFgateway 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 103 02 USB SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 25 DrawnBy NOS APA Sheet 3 of 6 Rev 2 0 Ethernet Plug amp PHY vee R3 K i At Ll z 220R LED_LINK TD 16 TD RD D avec RD lh to RU45 o AGNI SHIELD RIO 2 406549 1 RJ45 vollgesch m LED AVCC 742 792 66 C10 our 100nF IN Net DGND Tie 2Hei AGND 1 Ton BR Wier d LED ACT 742 792 66 C6 10uF AGND DGND C12 C11 C14 C13 10uF 100nF 100nF 100nF VCC DGND R16 R15 R14 2K7 2K7 2K7 LED_ACT LED_LINK DP83848l R2 OROO DGND 50 0 MHz
14. Minimize device power Consumptton eener eennnnnnnnen 49 10 Ordering information as es mmm 52 IBN UEM TRE UE 53 dresden elektronik Tel 449 351 31 85 00 Page 3 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway Document history Mailing list Initial version Update feature list DE Dev A Palm Author Check Release Author DE Dev A Palm Check Release dresden elektronik Tel 49 351 31 85 00 Page 4 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway Abbreviations Analog to Digital Converter Advanced RISC Machine A kind of processor architecture A A A Names a family of microcontrollers from Atmel Brownout Detection Consumer Electronics DBGU Debug Unit An UART dedicated to print debug traces available on ARM microcontrollers only EMAC Ethernet Media Access Controller FTDI USB to serial converter from FTDI GPIO Generals Purpose Input Output IC Inter Integrated Circuit another name for TWI Low Dropout Regulator JTAG Joint Test Action Group defines a standardized
15. mv Tel 49 351 31 85 00 Fax 49 351 3 18 50 10 wireless dresden elektronik de www dresden elektronik de dresden elektronik ingenieurtechnik gmbh Enno Heidebroek Str 12 01237 Dresden Germany either 1 6 or 3 3 left AVDRI External reference voltage on AVDREF pin deRFnode and deRFgateway V ES pin open selected by default lt gt MUX5 0 0b00000 Prescaler 32 Prescaler 16 Prescaler Prescaler gt no changes required Page 46 of 56 User Manual M deRFnode and deRFgateway 9 4 5 Accessing the external flash Each deRFnode gateway board provides a serial flash device which is accessed via the SPI interface Although being from Atmel s AT25 family if behaves similar to the well known AT26 Flash devices So when using an ARM MCU the AT91 Library functions from memo ries spi flash spid c and at26 c may be employed to allow chip identification you still may add its JEDEC ID 0x0001441F to the table of device identifiers such like Array of recognized serial firmware dataflash chips static const At26Desc at26Devices Other AT25DF041 Ox0001441F 1 512 1024 256 64 1024 be A typical initialization of the SPI flash driver may look like SPIO pin definitions define PIN SPIO MISO 1 lt lt 16 AT91C BASE PIOA AT91C ID PIOA PIO PERIPH A PIO PULLUP define PIN SPIO
16. 100nF 100nF 100nF 29 Pin5 me gt RSTN DGND vee N LED ACT Eur is 100nF 100nF LED LINK DP83848l dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Telefon 0351 31 85 00 deRFnode 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 101 02 Ethernet SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 44 DrawnBy NOS APA Sheet 4 of 6 Rev 2 0 swa gt sw2 CPingd gt Pin44 Debug Header X5 DEBUG HEADER TDI TMS TCK TDO RSTN JTAG HEADER AVR DGND Separated PCB only for case version l O Header d 3 VCC IO HEADER Buttons for User Input SWI for AVR E ET swi 2 JP6 Mied JP 3 Taster for ARM Pin14 SW2 PEN aes 0 e Sw2 xu DGND Taser swi sw2 DGND Sw Extension LEDs for User Output VCC Separated PCB only for case version EC be i Sw3 I i X3 L 1 Taster SW1 I SW2 L sw4 i s Taster DGND Sw Extension I po ee nnn elektronik ingenieurtechnik gmbh dresden D 01237 Dresden Enno Heidebroek Str 12 Title deRFnode 1TNP2 00N00 Telefon 0351 31 85 00 Telefax 0351 31 85 010 Size Document Number A4 5 646 16 02 101 02 Document File Name Interfaces SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 44 DrawnBy NOS APA Shee
17. 6 5 4 Ping ET 3 Pint2 2 Pin4t E i ETxEN Pins pas gt ERxER Pin19 ERx1 Pina gt mn nar ERO __ ERXDV R11 Pini8 EMDC EMDIO gt VCC R13 Fee em 1K50 I Pin20 Pingg gt MDINTR 29 Pin5 lt m gt RSTN 48 A Een C16 C15 100nF 100nF 35 s Sj dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Telefon 0351 31 85 00 Title deRFgateway 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 103 02 Ethernet SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 25 DrawnBy NOS APA Sheet 4 of 6 Rev 2 0 swa gt sw2 CPingd gt Pin44 Debug Header X5 DEBUG HEADER TDI TMS TCK TDO RSTN JTAG HEADER AVR DGND Separated PCB only for case version l O Header d 3 VCC IO HEADER Buttons for User Input Pin20 SWI for AVR swi 2 JPG Taster JP 3 for ARM Pint4 SW2 L 2 sw2 Si DEND Taster ah sw2 DGND Sw Extension LEDs for User Output Separated PCB only for case version Ve emm min mm ER Em b Sw3 I i X3 L 1 Taster SW1 I SW2 L sw4 i 1 a Taster DGND Sw Extension I po ee See EE regel dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title deRFgateway 1TNP2 00N00 Telefon 0351 31 85 00 Telefax 03
18. JTAG header for AVR programmer X8 User Interface 34 Pin user header X9 5 VDC connector for power supply X10 USB type B plug for power supply and data exchange dresden elektronik Tel 49 351 31 85 00 Page 14 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual e ids deRFnode and deRFgateway PE BEE GES EW SE EEEE EE v X8 8 ay apk ay ay ajal X5 OPEM qu Siete E 6 pin debug a Ke hii X6 X1 X2 gt 20 pin JTAG radio module gt CX 55 md X7 m S Ec mms 10 pin JTAG E paer TTG r t X9 5 VDG X10 uS ER USB type B Ethernet RJ45 Figure 3 deRFgateway 1TNP2 dresden elektronik Tel 49 351 31 85 00 Page 15 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Re deRFnode and deRFgateway A ANNEN KN a xc d Le 4 E x xt Sa x na Dep LLTLLELLELLELET HUULDU OH AS eJ eJ e o t er e DAMM TIT ATA Figure 4 deRFnode 1TNP2 peraueeererereeers HaT tdi Figure 5 deRFnode 2TNP2 dresden elektronik Tel 49 351 31 85 00 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germa
19. clock interface between MCU and transceiver set the MAC address 2 Initialize the PHY power up setup up connection preferences like Auto negotiation LinkSpeed and Duplex behavior This is done by writing to the PHYs register set 3 Initialize local reception and transmission buffers 4 Enable receiver and transmitter Afterwards it s up to the application to process incoming frames and handle changes of the link state Ethernet cable plugged unplugged changes of link speed Since the transceiver only throws interrupts upon state changes the application has to poll for incoming frames Due to complexity we skipped printing code snippets here If you bought a deRFdevelop ment kit the included KitCD will provide code examples in near future Otherwise a good starting point is the At91Lib s basic emac project application example All EMAC Library functions are to be found in peripherals emac emac c while the PHY transceiver abstraction resists under components ethernet The AT91Lib assumes you have a DM9161 transceiver which unfortunately is not compatible with the DP83848C assembled on the deRFgateway board For further information please refer to the datasheets 9 4 7 Minimize device power consumption Optimizing the energy consumption is especially important when the device is battery pow ered to ensure a long battery lifetime If the USB cable is plugged the device gets its power through the USB line so in this case
20. deRFnode 1TNP2 00NO00 deRFarm7 2504A 37mA 41mA 85mA deRFnode 2TNP2 00NO00 deRFarm7 14mA 45mA 49mA 85mA deRFnode 2TNP2 00NO00 deRFmega128 12mA 20mA 30mA 50mA peripherals and MCU put to sleep as far as possible all peripheral initialized but not accessed Ethernet cable not plugged 9 Ethernet cable plugged 100Mbps Link established dresden elektronik Tel 49 351 31 85 00 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 01237 Dresden Germany www dresden elektronik de theoretical value every onboard peripheral accessed wireless dresden elektronik de typical application scenario sensors accessed once each second Transceiver off Page 13 of 56 User Manual Versi Reeg deRFnode and deRFgateway 6 Overview of platforms O S mu HEHBEISUgUUUHELUUUI A m 778 X8 m E N 1 CH j A X2DO0XXDXOOOOOODOOOOOOOUE I Ric A x 000000000 B gu ce HE EE EJ OH UI D LI al E TEE Figure 2 Overlay of deRFnode and deRFgateway Table 8 Overview headers Name Description x1 Radio module interface 2x23 Pin Radio module header only available for plugga x2 ble platform variant X3 3 Pin Button extension only available for case variant X4 Ethernet RJ45 socket X5 Debug interface 6 Pin Debug header X6 JTAG for ARM 20 Pin JATG header for ARM programmer X7 JTAG for AVR 10 Pin
21. dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 deRFnode and deRFgateway 3 2011 07 15 Qi VCC 3 1 DUL OF ls 33 i DGND 50 0 MH C1 100nF E di Es DO ra LLL Ent E xEN ETxEN ERxER Pini9 ERG ERxO L ERXDV DP VCC gt EMOC MDIO EMDIO L pewo 1K50 Pin20 MDINTR Pin5 RSTN C16 C15 100nF 100nF Figure 21 Ethernet PHY DP83848l 8 5 Power supply The deRFgateway and deRFnode platform have two different low dropout regulators LDO The first variant is a fixed 3 3VDC supply voltage output for DC and or USB powered applica tions like deRFgateway with Ethernet The second variant is an adjustable supply voltage output a low quiescent current LDO the output voltage can be configured by assembling the resistors R56 and R57 Fixed LDO TPS79433DGN Adjustable LDO TPS78001 dresden elektronik Tel 49 351 31 85 00 Page 32 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual GE deRFnode and deRFgateway R49 R48 Figure 22 Resistors adjustable supply voltage Table 16 LDO configuration R57 R56 Platform fixed adjustable R48 R49 R56 R57 Vout deRFnode 1TN2P 00NOO x na OR na ma 3 3VDC deRFnode 2TN2P 00NO00 X OR na 2M
22. gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi z Reeg deRFnode and deRFgateway 4 Hardware selection examples The growing number of platform and radio module combinations makes it difficult and com plex for the customer to make the right choice of hardware depending on the customer ap plication The following section should give some examples for different applications 4 1 Battery powered nodes in a small wireless sensor network Application A small network consisting of about 30 end devices nodes should measure and transmit the temperature sensor data every minute to one network coordinator master The coordi nator is DC or USB powered all the time The nodes are battery powered and are sleeping all the time except when they should measure and transmit the sensor data Required components Platforms deRFnode 2TNP2 00N00 Radio modules deRFmega128 22A00 Software based on Atmel s MAC Stack available on Development Kit CD 4 2 6LoWPAN tree network application Application A wireless network that can be monitored and controlled via Ethernet by a Remote Access The nodes have their own unique MAC address and a user defined IP address They can be equipped with sensors and or actuators that read out sensor data and or switch on off a re lay Required components Platforms deRFnode 2TNP2 00NO00 deRFgat
23. interface for programming and debugging microcontrollers uC MCU Micro Controller Unit PCBA Printed Circuit Board Assembled Physical layer refers to the lowest possible layer in a layered communica tion model Radio Frequency RMII Reduced Media Independent Interface Surface Mount Technology Serial Peripheral Interface Through Hole Technology Transceiver Transmitter Receiver V O C Ke D H R M P H W Two Wire Serial Interface U S JART Universal Synchronous Asynchronous Receiver Transmitter DC RM R BOD CE Federal Communications Commission LDO PHY F T T B Universal Serial Bus dresden elektronik Tel 49 351 31 85 00 Page 5 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual ee deRFnode and deRFgateway 3 1 Overview The deRFnode and deRFgateway are demonstration and application platforms for the AVR and ARM based dresden elektronik radio modules They support AVR and ARM program ming and communication over Serial USB and Ethernet interface Assembled environmental sensors supplies data for a huge bandwidth of user defined applications 2 Application The main applications for the deRFgateway platform are Coordinator and Router device for IEEE 802 15 4 compliant networks 6loWPAN nodes ZigBee Gatew
24. it makes no sense to think about power down modes If finally Ethernet should be invoked the power consumption is too large for reasonably power ing the device via batteries so here DC power should be used which implies that the ener getic optimization is also obsolete Reference values of power consumption are given in chapter 4 The following list describes what might be done to decrease the power consumption De pending on your application requirements not all points may be realizable 1 Power down the Ethernet transceiver If you did not explicitly activate it the transceiver already is powered down Otherwise configure the transceiver PWR DOWN INT line to be a Power Down line by writing a log ical zero to the MII Interrupt control register MICR address 0x11 bit 0 Also ensure that the MCU pin connected to the PWR DOWN line has no internal pull up activated The onboard pull down resistor will now force an Ethernet transceiver power down 2 Power down the 12C sensors In factory default state and if you didn t configure them only the acceleration sensor is active Although we recommend to explicitly disable all three sensors This comprises of sending stop conversion commands as well as disabling any auto conversion mode dresden elektronik Tel 49 351 31 85 00 Page 49 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden ele
25. outdated values To continue with the temperature sensor a code snippet looks like ucBuf 0 0x01 configuration register MSB ucBuf 1 0x81 shutdown mode one shot TWID Write amp twid BOARD SENS ADDR TEMP 0x00 0x00 ucBuf 0x02 NULL wait at least 26 ms depends on selected resolution then select temperature register MSB and read 2 bytes from it ucBuf 0 0x00 TWID Write amp twid BOARD SENS ADDR TEMP 0x00 0x00 ucBuf 0x01 NULL TWID Read amp twid BOARD SENS ADDR TEMP 0x00 0x00 ucBuf 0x02 NULL convert value to a human readable format Besides the TC communication lines the acceleration sensor includes an interrupt line which may trigger under certain circumstances i e acceleration increases above decreases be low changes relatively to a configured threshold These features might be used to detect the device falling or its motion at all For all these cases the sensor might drive its INT line high as long as the condition is met For detailed information please refer to the BMA150 datasheet Using this feature requires JP1 to shortcut pins 2 3 and configuration of an inter rupt trigger on the MCU side dresden elektronik Tel 49 351 31 85 00 Page 43 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFg
26. perform read and write operations erase protect and unprotect the flash memory For fur ther details please refer to basic serialflash project main c dresden elektronik Tel 49 351 31 85 00 Page 47 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manua M deRFnode and deRFgateway If you like to access the external flash with an AVR MCU a code snippet suitable for reading the manufacturer and device IDs see AT25DF041 datasheet chapter 10 is uint8 t i data 4 Set MOSI SCK and CS output all others input DDRB 1 lt lt PB2 1 lt lt PB1 DDRE 1 lt lt PE5 Enable the SPI interface make the MCU SPI master SPCR 1 lt lt SPE 1 lt lt MSTR Select the serial clock SCK to be FOSC 4 and double it i e if CPU runs at 8MHz SPI clock will be 4MHz SPCR amp 1 lt lt SPRO 1 lt lt SPR1 SPSR 1 lt lt SPI2X Start SPI transaction by setting CS low PORTE amp 1 lt lt PE5 Send the command byte Read Manufacturer and Device ID SPDR Ox9F wait for termination while SPSR amp 1 lt lt SPIF for i 0 i lt 4 i Do dummy write for initiating SPI read SPDR SPI DUMMY VALUE wait for termination while SPSR amp 1 lt lt SPIF Upload the received b
27. properties 1 Native USB 2 USB over FTDI T THT S SMT A ARM7X M ATMEGA N None no delivered radio module P Plain only PCBA 2 Revision 2 radio module properties 1 Sub GHz transeiver 2 2 4GHz transceiver 128k internal Flash 5 512k internal Flash A THT pluggable C SMT solderable 0 0 Chip antenna 0 2 Coaxial plug other 0 0 Nj0 0 wo radio module 3 3 Feature list This section gives an overview of the supported radio modules and features in combination with deRFnode and deRFgateway The solderable radio modules will not be offered in all variants dresden elektronik ingenieurtechnik gmbh Enno Heidebroek Str 12 01237 Dresden Germany Tel 49 351 31 85 00 Fax 49 351 3 18 50 10 wireless dresden elektronik de www dresden elektronik de Page 8 of 56 User Manual Versi Reeg deRFnode and deRFgateway Table 3 Feature list Native USB Serial USB LEDs and Buttons USB powered deRFmega128 22A00 deRFmega128 22A02 deRFarm7 15A00 deRFarm7 15A02 deRFarm7 25A00 deRFarm7 25A02 Low Quiescent Curr LDO 1TNP2oono0 x x x x itnc2 oonoo x x x x gmP2oNO x x j Ex x ft x x x x ft x xix x 2TNC2 00N00 deRFgateway 1 TNP2 00NO00 1TNC2 00N00 dresden elektronik Tel 49 351 31 85 00 Page 9 of 56 ingenieurtechnik
28. use functions On AVR MCUs you may use Peter Fleury s library or its improved version from Manfred Langemann ask your favourite search engine On ARM the AT91Lib provides equivalent functionality under drivers twi and peripherals twi Independently of the implementation you usually must decide for a interface speed 100 up to 400kHz is a good value TWI libraries may either run interrupt driven or in polling mode The latter case is enough for first tests while if excessive using the DC interface interrupt based implementations should be pre ferred dresden elektronik Tel 49 351 31 85 00 Page 42 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual M deRFnode and deRFgateway Assumed that you use an ARM MCU the initialization might look like define PINS TWI 1 lt lt 10 1 11 AT91C BASE PIOA AT91C ID PIOA PIO PERIPH A PIO DEFAULT static Twid twid managing datastructure const Pin pins PINS TWI Jj SDA SCL pins PA10 PA11 PIO Configure pins PIO LISTSIZE pins PMC EnablePeripheral AT91C ID TWI enable twi peripheral TWI ConfigureMaster AT91C BASE TWI 100000 BOARD MCK 100kHz TWID Initialize amp twid AT91C BASE TWI initialize datastructure AIC ConfigureIT AT91C ID TWI 0 ISR Twi configure and AIC EnableIT AT91C ID TWI
29. 00 Page 41 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 9 4 Software programming model This chapter is designated to describe how selected components of the deRFnode gateway baseboard series may be accessed from a developer s point of view As stated in the previ ous chapters we only support the GCC so the following explanations may not fully work with different compilers Since this should not become a programming tutorial please refer to the individual device datasheets for details Also the code snippets given in the following chap ters are only extracts If you like to use them it s up to you to surround them with a working main application and add inclusions for necessary header files that may have been left For ARM MCU based development the AT91SAM7 Software Package 12 delivers besides many application examples the so called AT91Library a large collection of higher level functions simplifying the development process Since all following chapters base on it down load and extract it to a directory of your desire Now change to the packages subdirectory where you will find a set of application examples one archive per application and compiler Delete all non GNU based examples and extract the resting to a common directory confirm to overwrite files whe
30. 31 Pin32 Pin33 Pin34 Pin35 Pin36 Pin37 Pin38 4 Pin39 Pin40 Pin41 Pin42 Pin43 Pin44 2 D VCC module SLM 123 01 L S DGND DGND HEADER 23 E eeleren x nb px PO R47 Ri OROO nb x R2 n b x R3 n b x R4 nb x lt i deRFarm7 x5xx1 AT91SAM7X512 CU deRFarm7 x5xx1 AT91SAM7X512 CU A RF Header Pin Description deRFmega128 Port ATmega128RFA1 Pin23 GND Pin22 GND Pin21 PB5 OC1A PCINTS Pin20 PB7 OCOA OCIC PCINT7 Pinl9 PB4 OC2 PCINT4 Pinl8 PB6 OC1B PCINT6 Pinl7 PB3 MISO PCINT3 PDO Pinl6 PBO SSN PCINTO Pinl5 PB2 MOSI PCINT2 PDI Pinl4 CLKI Pinl3 PBI SCK PCINTI Pinl2 PD5 XCK1 Pinll PD7 TO PinlO PD3 TXDI INT3 Pind PDI SDA INTI Pin8 PG5 OCOB Pin7 PDO SCL INTO Pin6 PG2 Pins RSTN Pin4 PGI DIGI Pin3 AREF Pin2 GND Pinl VCC GND PBIS ERXDV ECRSDV PB18 EF100 ADTRG PB6 ERXI PB8 EMDC PA16 SPIO MISO PBO ETXCK EREFCK PAIT SPIO MOSI PA3 RTSO SPI1_NPCS2 PA18 SPIO_SPCK PB2 ETXO PB25 TIOAI DTR1 PAI TXDO PAIO TWD PB26 TIOB1 RI1 PAII TWCK PB3 ETX1 RSTN USBDM ADVREF GND VCC deRFmegal28 Port ATmegal28RFAl Pin4 VCC Pin5 GND Pin26 PEO RXD PCINT8 Pin27 PD2 RXDI INT2 Pin28 PEI TXDO Pin29 PD6 T1 Pin30 PE2 XCKO0 AINO Pin31 PE3 OC3A AINI Pin32 PD4 ICPI Pin33 PE4 OC3B INT4 Pin34 PFO ADCO Pin35 PES OC3C INTS Pin36 PFI ADCI Pin37 PE6 T3 INT6 Pin38 PFA ADCA TCK Pin39 PET I
31. 3A AIN1 9 PD1 SDA INT1 32 PD4 ICP1 10 PD3 TXD1 INT3 33 PE4 OC3B INT4 11 PD7 TO 34 PFO ADCO 12 PD5 XCK1 35 PE5 OC3C INT5 13 PB1 SCK PCINT1 36 PF1 ADC1 14 CLKI 37 PE6 T3 INT6 15 PB2 MOSI PCINT2 PDI 38 PFA ADCA TCK 16 PBO SSN PCINTO 39 PE7 ICP3 CLKO INT7 17 PB3 MISO PCINT3 PDO 40 PF5 ADC5 TMS 18 PB6 OC1B PCINT6 41 PF2 ADC2 19 PB4 OC2 PCINT4 42 PF6 ADC6 TDO 20 PB7 OCOA OC1C PCINT7 43 RSTON 21 PB5 OC1A PCINT5 44 PF7 ADC7 TDI 22 GND 45 GND 23 GND 46 GND dresden elektronik Tel 49 351 31 85 00 Page 18 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway Table 10 Pin assignment for deRFarm7 series 25A00 25A02 25C00 25C02 15A00 15A02 15C00 15C02 Pin LC Port deRFarm7 Pin uC Port deRFarm7 1 VCC 24 VCC 2 GND 25 GND 3 ADVREF 26 PA27 DRXD PCK3 4 USBDM 27 PAO RXDO 5 RSTN 28 PA28 DTXD 6 PBS ETX1 29 PA4 CTSO SPI1_NPCS3 7 PA11 TWCK 30 PB9 EMDIO 8 PB26 TIOB1 RI1 31 PB21 PWM2 PCK1 9 PA10 TWD 32 USBDP 10 PA1 TXDO 33 PB19 PWMO TCLK1 11 PB25 TIOA1 DTR1 34 PB27 TIOA2 PWMO ADO 12 PB2 ETXO 35 PA14 SPIO_NPCS2 IRQ1 13 PA18 SPIO SPCK 36 PB28 TIOB2 PWM1 AD1 14 PAS RTSO SPI1 NPCS2 37 PB5 ERXO 15 PA17 SPIO MOSI 38 TCK 16 PBO ETXCK EREFCK 39 PB7 ERXER 17 PA16 SPIO
32. 51 31 85 010 Size Document Number A4 5 646 16 02 103 02 Document File Name Interfaces SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 25 DrawnBy NOS APA Sheet 5 of 6 Rev 2 0 4M Bit Flash Memory vee VCC Acceleration Sensor Internal TWI Address 0111 000 R W R W 0 gt Write R W 1 gt Read Ambient Light Sensor Internal TWI Address 1000 100 R W R W 0 gt Write R W 1 gt Read Temperature Sensor Internal TWI Address 1001 000 R W R W 0 gt Write R W 1 gt Read ISL29020IROZ T7 TMP102AIDRLT 100nF 100nF dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFgateway 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 103 02 Flash Sensors SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 26 DrawnBy NOS APA Sheet 6 of 6 Rev 2 0 ooo DGND Pin21 C E Pin20 Pin19 Pin18 Pin17 Pin16 Pin15 Pin14 Pin13 Pin12 Pin11 Pin10 Ping Pin8 Pin7 Pin6 Pin5 Pin4 Pin3 qr _ 9 DEND o VCC module zk X1 THT RF Header for AVR ARM based radio modules 21 20 19 18 17 16 15 14 13 12 11 10 o SN Q RO Oo 24 25 26 27 28 29 28 R88 Pin26 PONE Pin27 Pin28 Pin29 Pin30 Pin
33. 8 PFA ADCA TCK Pin39 PET ICPS CLKO INT7 Pind PFS ADCS TMS Pindl PF2 ADC2 Pind2 PF6 ADC6 TDO Pind3 RSTON Pind4 PF7 ADCT TDI Pinds GND Pind GND GND PA27 DRXD PCK3 PAO RXDO PA28 DTXD PAA CTSO SPI1 NPCS3 PB9 EMDIO PB21 PWM2 PCK1 USBDP PB19 PWMO TCLK1 PB27 TIOA2 PWM0 ADO PA14 SPIO_NPCS2 IRQ1 PB28 TIOB2 PWMI ADI PBS ERXO TCK PB7 ERXER TMS PBI ETXEN TDO JTAGSEL TDI GND GND e U Ethernet Flash Sensors U Power Supply U Interfaces REFTOP4 REFTOPS5 REFTOP6 REFTOP REFTOP REFTOP JP7 JP8 JP9 JP10 JP11 JP12 REFTOP1 REFTOP2 REFTOP3 REFTOP REFTOP REFTOP Jumper Jumper Jumper Jumper Jumper Jumper s A 9 dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFgateway 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 103 02 Module Connectors SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 24 DrawnBy NOS APA Sheet 1 of 6 Rev 2 0 Battery Supply 3xAA VBAT Net Suply from AC DC Adapter voc x9 PJ 002AH SMT DGND D4 D BAS40 05 5V Supply from USB Host USB5V Ti IRLML6402 L3 1k 100MHz C23 100nF C21 100nF DGND DGND PWREN DGND overlapping pads of same net Low Quiescent Current LDO 3 3VDC
34. 820K 3 3VDC deRFgateway 1TN2P 00NOO x na OR na ma 3 3VDC Table 17 Adjustable LDO configuration default R48 H49 R56 R57 Vout TPS78001 x OR n a 2M 820K 3 3VDC OR n a n a 820K 2 7VDC OR n a 2M n a 1 8VDC dresden elektronik Tel 449 351 31 85 00 Page 33 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 01237 Dresden Germany wireless dresden elektronik de www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway H 1 1 D U H H n b U H H H H H H H 1 H U U d d i H DH H H ee TEE C17 IN OUT EN BYP Est 3 5 C40 DGND B GND 10nF DGND TPS79433DGN DGND Figure 23 Fixed LDO TPS79433DGN p O 4 nz U U i 1 U U n b DGND DGND DGND Figure 24 Adjustable LDO TPS78001 8 6 Supervisor The assembled low power supervisor LTC2935ITS8 1 has selectable threshold voltages They can be set by the OR resistors R58 R59 R60 R61 R62 and R63 If the voltage level goes below the threshold the supervisor sets a low active reset on Pin 5 This should provide an optimal function of deRFnode and deRFgateway In some cases it is not useful to get a reset If the jumper JP4 will not be set the supervisor reset signal will not affect the circuit Reset Pin 5 dresden elektronik Tel 49 351 31 85 00 Page 34 of 56 i
35. ART SPI II lt USB 5 Eth Mete erne 1 optionally only on deRFnode series with AVR otherwise included in MCU on deRFgateway only Figure 1 block diagram deRFnode deRFgateway series 3 2 Hardware selection table From the electrical view all deRF radio modules may be combined with all deRFnode and deRFgateway baseboards However not every peripheral available on the baseboard is us able or accessible by the radio module due to routing constraints respective missing MCU features The portfolio of deRFnodes and deRFgateways will be added with new variants in the future All available platforms and variants are listed in Table 1 Table 1 Available board and radio module combinations plain variant deRFnode 1TNP2 00NO00 deRFarm7 series deRFnode 2TNP2 00NO00 deRFmega128 series deRFgateway 1TNP2 00NO0O0 deRFarm7 series dresden elektronik Tel 49 351 31 85 00 Page 7 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 2011 07 15 Every variant is specifiable by a type code which contains important key features of the plat form Table 2 describes this code Table 2 Type code description deRFnode and deRFgateway deRFnode SE SE CE SIE SESESE AE SN NE deRFgateway IXLX X X X X X X X X platform
36. BDP AVR 5 USB 3 USB 10nF 2kV 18 UE C30 EBBBC31 USB 47pF 47pF USB USB DGND DGND USB DGND USB5V USB 3 3V RXF TX80108 A A TXE B 3 3V A 1 8V 3 3V USBRD Vcca lt Vccb Dn ee USBWR PWREN gh 100nF Ch mco 100nF 100nF DGND DGND DGND IC9 USBWR USB 3 3V Ri E USBWR 4 USBWR 41 100nF 5 DGND USB 3 3V d So 3 bats DGND TXB0108 w s i B 33V A 1 8V 3 9V Vcca lt Vecb dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFnode 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 101 02 USB SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 44 DrawnBy NOS APA Sheet 3 of 6 Rev 2 0 Ethernet Plug amp PHY R2 Wee ETH 0R00 X4 R3 Z Al C on Soo 220R Ki LED LINK ETH E TD ETH TD RD 9 f D avcc ETH ETx1 RD ETxO BX ETxEN AGND ext to RJ45 C2 C3 Pin39 100nF 100nF lt Pin39 gt ERKER X AGND AGND SHIELD Kors w l kono nm ERx1 R10 Aco WEN Eni AVCC X de 792 66 4 LED ACT Ch bs 07 b BSCS EBC4 39 4 100nF 100nF four 10uF ERXDM 2 406549 1 RJ45 vollgesch m LED 19 42 40 AGND x R12 pak a EMDC ge B Hee 4k7 EMDIO R13 742 792 66 xe e 1K50 7 Pin20 EC SEE C13 RC Io SERCH lt Pin20 gt MDINTR 10uF
37. CPS CLKO INT7 Pind PFS ADCS TMS Pindl PF2 ADC2 Pind2 PF6 ADC6 TDO Pind3 RSTON Pind4 PF7 ADCT TDI Pinds GND Pind GND GND PA27 DRXD PCK3 PAO RXDO PA28 DTXD PAA CTSO SPI1 NPCS3 PB9 EMDIO PB21 PWM2 PCK1 USBDP PB19 PWMO TCLK1 PB27 TIOA2 PWM0 ADO PA14 SPIO_NPCS2 IRQ1 PB28 TIOB2 PWMI ADI PBS ERXO TCK PB7 ERXER TMS PBI ETXEN TDO JTAGSEL TDI GND GND e U Ethernet Flash Sensors U Power Supply U Interfaces REFTOP4 REFTOPS5 REFTOP6 REFTOP REFTOP REFTOP JP7 JP8 JP9 JP10 JP11 JP12 REFTOP1 REFTOP2 REFTOP3 REFTOP REFTOP REFTOP Jumper Jumper Jumper Jumper Jumper Jumper s A 9 dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFnode 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 101 02 Module Connectors SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 44 DrawnBy NOS APA Sheet 1 of 6 Rev 2 0 Battery Supply 3xAA VBAT VCC overlapping pads of same net Net Suply from AC DC Adapter voc x9 PJ 002AH SMT DGND D4 D BAS40 05 5V Supply from USB Host USB5V L3 Ti IRLML6402 1k 100MHz C23 100nF C21 100nF DGND DGND PWREN DGND Low Quiescent Current LDO 3 3VDC ad
38. Dependent on the radio module used either ARM based deRFarm7 series or AVR based deRFmega128 series concrete rec ommendations will differ Generally we suggest to use MS Windows as your developing platform other operating systems are not supported yet The programming methods described below both base on using the JTAG interface There will be a third programming option using the USB interface in near future 9 1 1 Source code and compiler toolchain If you bought one of our deRF development kits the included CD ROM contains ready to use application example firmware binary files In any other case or if you like to build custom firmware source code files and a suitable compiler are required in addition A good starting point for developing wireless software are the Atmel IEEE 802 15 4 MAC Software Package 1 or the Atmel bitcloud 2 Again our Kit CD already provides the platform adaptions nec essary to operate these protocol stacks with your target hardware As compiler toolchain we suggest to use gcc When working with an AVR MCU the versions needed are avr gcc respective arm none eabi gcc for ARM based MCUs Basically the IAR compiler may also be used but is not supported by dresden elektronik Avr gcc is in cluded within the winavr package 3 arm none eabi gcc comes with the yagarto compiler package 4 and is extended by the yagarto tools 5 Supported versions of both are availa ble on our Kit CD When downloadi
39. MISO 40 TMS 18 PB8 EMDC 41 PB1 ETXEN 19 PB6 ERX1 42 TDO 20 PB18 EF100 ADTRG 43 JTAGSEL 21 PB15 ERXDV ECRSDV 44 TDI 22 GND 45 GND 23 GND 46 GND dresden elektronik Tel 49 351 31 85 00 Page 19 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 7 2 Debug interface The debug header may be used for device interconnecting via USART like on a PC Re member that a level shifter between TTL and RS232 may be required DEBUG HEADER DGND Figure 7 Debug header The following table shows the signal description Table 11 Debug Header Pin assignment Pin Function Pin Function 1 TXD UARTO DBGU 2 VCC SCK 4 RXD UARTO DBGU RSTN 6 GND dresden elektronik Tel 49 351 31 85 00 Page 20 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 2011 07 15 deRFnode and deRFgateway 7 3 JTAG for ARM The header layout conforms to the 20 pin assignment traditionally used for ARM MCUs Figure 8 JTAG for ARM header JTAG HEADER ARM D The following table shows the signal description Table 12 JTAG for ARM header pin assignment Pin Funct
40. MOSI 1 lt lt 17 AT91C BASE PIOA AT91C ID PIOA PIO PERIPH A PIO DEFAULT define PIN SPIO SPCK 1 lt lt 18 AT91C BASE PIOA AT91C ID PIOA PIO PERIPH A PIO DEFAULT define PIN SPIO NPCSO 1 lt lt 14 AT91C BASE PIOA AT91C ID PIOA PIO PERIPH A PIO DEFAULT define PINS SPIO PIN SPIO MISO PIN SPIO MOSI PIN SPIO SPCK Base address of SPI peripheral connected to the serialflash define BOARD AT25 SPI BASE AT91C BASE SPIO Identifier of SPI peripheral connected to the serialflash define BOARD AT25 SPI ID AT91C ID SPIO Pins of the SPI peripheral connected to the serialflash define BOARD AT25 SPI PINS PINS SPIO PIN SPIO NPCSO static Spid spid SPI driver instance static At26 at26 Serial flash driver instance static Pin pins BOARD AT25 SPI PINS PIO Configure pins PIO LISTSIZE pins AIC ConfigureIT BOARD AT25 SPI ID 0 ISR Spi SPID Configure amp spid BOARD AT25 SPI BASE BOARD AT25 SPI ID AT26 Configure sat26 amp spid BOARD AT25 NPCS AIC EnableIT BOARD AT25 SPI ID Afterwards you may evaluate the number of pages and the pagesize since this is important for each further access unsigned int numPages AT26 PageNumber amp at26 unsigned int pageSize AT26 PageSize amp at26 Since low level accessing the flash device is not trivial the application Example basic serialflash project from the AT91 Library already provides a set of functions necessary to
41. OO R50 R2 OROO n b x R3 n b x R4 nb x lt i deRFarm7 x5xx1 AT91SAM7X512 CU deRFarm7 x5xx1 AT91SAM7X512 CU A RF Header Pin Description deRFmega128 Port ATmega128RFA1 Pin23 GND Pin22 GND Pin21 PB5 OC1A PCINTS Pin20 PB7 OCOA OCIC PCINT7 Pinl9 PB4 OC2 PCINT4 Pinl8 PB6 OC1B PCINT6 Pinl7 PB3 MISO PCINT3 PDO Pinl6 PBO SSN PCINTO Pinl5 PB2 MOSI PCINT2 PDI Pinl4 CLKI Pinl3 PBI SCK PCINTI Pinl2 PD5 XCK1 Pinll PD7 TO PinlO PD3 TXDI INT3 Pind PDI SDA INTI Pin8 PG5 OCOB Pin7 PDO SCL INTO Pin6 PG2 Pins RSTN Pin4 PGI DIGI Pin3 AREF Pin2 GND Pinl VCC GND PBIS ERXDV ECRSDV PB18 EF100 ADTRG PB6 ERXI PB8 EMDC PA16 SPIO MISO PBO ETXCK EREFCK PAIT SPIO MOSI PA3 RTSO SPI1_NPCS2 PA18 SPIO_SPCK PB2 ETXO PB25 TIOAI DTR1 PAI TXDO PAIO TWD PB26 TIOB1 RI1 PAII TWCK PB3 ETX1 RSTN USBDM ADVREF GND VCC deRFmegal28 Port ATmegal28RFAl Pin4 VCC Pin5 GND Pin26 PEO RXD PCINT8 Pin27 PD2 RXDI INT2 Pin28 PEI TXDO Pin29 PD6 T1 Pin30 PE2 XCKO0 AINO Pin31 PE3 OC3A AINI Pin32 PD4 ICPI Pin33 PE4 OC3B INT4 Pin34 PFO ADCO Pin35 PES OC3C INTS Pin36 PFI ADCI Pin37 PE6 T3 INT6 Pin38 PFA ADCA TCK Pin39 PET ICPS CLKO INT7 Pind PFS ADCS TMS Pindl PF2 ADC2 Pind2 PF6 ADC6 TDO Pind3 RSTON Pind4 PF7 ADCT TDI Pinds GND Pind GND GND PA27 DRXD PCK3 PAO RXDO PA28 DTXD PAA CTSO SPI1 NPCS3 PB9 EMDIO PB21 PWM2 PCK1 USBD
42. P PB19 PWMO TCLK1 PB27 TIOA2 PWM0 ADO PA14 SPIO_NPCS2 IRQ1 PB28 TIOB2 PWMI ADI PBS ERXO TCK PB7 ERXER TMS PBI ETXEN TDO JTAGSEL TDI GND GND e U Ethernet Flash Sensors U Power Supply U Interfaces REFTOP4 REFTOPS5 REFTOP6 REFTOP REFTOP REFTOP JP7 JP8 JP9 JP10 JP11 JP12 REFTOP1 REFTOP2 REFTOP3 REFTOP REFTOP REFTOP Jumper Jumper Jumper Jumper Jumper Jumper s A 9 dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFnode 2TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 105 02 Module Connectors SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 14 03 DrawnBy NOS APA Sheet 1 of 6 Rev 2 0 Battery Supply 3xAA VBAT A VCC overlapping pads of same net Net Suply from AC DC Adapter voc x9 PJ 002AH SMT DGND 5V Supply from USB Host USB5V IW L3 Ti VBUS X 1k 100MHz C21 100nF DGND DGND JEWREN EREN TCM810JVNB713 n b C17 1uF DGND Current measurement of radio module Low Quiescent Current LDO 3 3VDC Ic2 adjustable Vcc 2M 820k best ckt 3 3V nur 820k best ckt 2 7V nur 2M best ckt 1 8V nb fixed version DGND VCC C18 1uF DGND
43. as USB detection The USB voltage can be detected over a voltage divider on Pin 36 USB detection Pin 36 USB5V Figure 28 USB supply voltage monitoring dresden elektronik Tel 49 351 31 85 00 Page 36 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 8 9 Battery supply voltage monitoring It is useful to monitor the supply voltage of battery powered devices to detect the voltage lev el just before it is too low The disadvantage is a quiescent current because of the assembled voltage divider The battery monitoring can be activated by setting jumper JP3 and read from Pin 34 Battery monitoring Pin 34 JP3 R42 Figure 29 Battery supply voltage monitoring dresden elektronik Tel 49 351 31 85 00 Page 37 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual M deRFnode and deRFgateway 3 9 Programming 9 1 Requirements HW SW Usually deRF radio modules are shipped with a firmware not meeting your application re quirements Exchanging the modules firmware requires 1 a firmware binary file 2 a suitable JTAG programming adapter 3 some programming software Each of them is described in the following chapters
44. ateway If you own a dresden elektronik deRFdevelopment Kit the included kit CD provides a com plete I C library as well as out of the box working application examples for AVR and ARM which may be easily modified according to your needs 9 4 3 Using the USB interface The onboard USB interface is realized either native on deRFnode gateway for ARM or based on a FTDI USB to parallel FIFO on deRFnode gateway for AVR In USB speech native means the MCU is able to talk directly to the USB DM DP lines which is true for ARM MCUs but not for AVRs So if using an AVR MCU on a ARM baseboard USB is non functional When incorporating the USB FIFO 12 GPIO 8 data 4 control lines are reserved AND OR gates and a octal driver equalize level differences Besides other applications of the USB interface we focus only on a Communication Device Class CDC device here which simplified is a RS232 port tunneled over USB providing a virtual COM Port on the PC side For native USB with ARM MCUs again the AT91Lib provides ready to use functions which are to be found in usb device core USBD UDP c and usb device cdc serial CDCDSerial Driver c A typical initialization looks like CDCDSerialDriver Initialize initializes the CDC driver USBD Connect connects external Pullup to USBDP Afterwards data could be shared with the device driver with CDCDSerialDriver Read and CDCDSerialDriver Write i e in your applications main loop
45. ation Table 15 Jumper configuration JP Function GPIO Input diversity SW2 closed pin 1 2 acceleration sensor interrupt output pin closed pin 2 3 Power Supply Selection Battery or DC USB VBAT Monitor closed enabled Reset Supervisor closed enabled Current measurement of radio module AA WN Select Button 1 depending on radio module deRFarm7 or deRFmega128 JP 5 JP 3 JP 4 JP2 Figure 11 Jumper configuration dresden elektronik Tel 49 351 31 85 00 Page 24 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 Sire deRFnode and deRFgateway 8 Board features The deRFnode and deRFgateway platforms have a lot of available onboard features like three different sensors user defined buttons and LEDs USB and Ethernet interface a su pervisor and power supply monitoring Flash SS gt Y T NR l ENDE A A A ARANDA ANNE Ba ENA EEDE OEE NAE S Acceleration rar t sensor a r e A Temperature a HER sensor Supervisor a gt ky ap NES Ambient light MEE T Adjustable en sensor LDO th mu P HT OO o m Fixed LDO Button 1 Button 2 USB serial Ethernet assembled on PHY Node AVR Figure 12 Board features dresden elektronik Tel 49 351 31 85 00 Page 25 of 56 ingenieurtechnik gmbh Fax 49 351
46. ay between IEEE 802 15 4 and IEEE 802 3 Wireless Sensor Networks The main applications for the deRFnode platform are e Stand Alone End device for a IEEE 802 15 4 compliant network e applicable as coordinator for small networks e battery powered applications with a lifetime of several years e 6loWPAN nodes e ZigBee 3 Features The main features of deRFnode and deRFgateway are Compact size 69 x 75 x 30 mm Supports AVR or ARM based dresden elektronik radio modules Variants for pluggable and solderable radio modules USB and Ethernet interface JTAG interface for AVR or ARM Serial debug interface Onboard Sensors acceleration temperature and luminosity Onboard 4Mbit Serial Flash Power Supply over USB battery and 5V DC Plug possible 2x buttons and 3x LEDs free programmable User interface with all important signals 2x17 pins connector Switchable reset supervisor Triggers on Vcc 2 4V deRFnode for AVR respective on Vcc 3 0V deRFnode and deRFgateway for ARM CE for deRFnode CE pending for deRFgateway The deRFgateway is intended for laboratory development demonstration or evalua tion purposes only dresden elektronik Tel 49 351 31 85 00 Page 6 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 Reeg deRFnode and deRFgateway 3 1 Block diagram 2x 3x SW LED GPIO U
47. dresden elektronik e User Manual deRFnode deRFgateway Document Version V1 1 2011 07 15 User Manual Versi Reeg deRFnode and deRFgateway Table of contents DEEST I IEEE 6 2 5 PE WG OM mne occa aoe ce ocd eases eee DIN D NI I 6 DEI RT nnen iede edn and ae nd m 6 3 1 Block LAIN E 7 3 2 Hardware E 7 3 NEE 8 4 Hardware selection examples ANEN 10 4 1 Battery powered nodes in a small wireless sensor network 10 4 2 BLOWPAN tree network application ENNEN 10 4 3 Point to Point connection for simple applications nnnnnnnnnenen eneen 10 eg ee EE 11 5 1 EE 11 5 2 Operation COMMON Se saei duode meli cust t apicia di rte edel lende iseen 11 S3 EI Me ERE EC E OT 11 5 3 1 Operational RANQSS se eie haeret tette ud eite pale AE eeu pun fU Ea eU aet 11 5 3 2 Current Consumption m tated emesis ecole ei ieee 12 6 Overview of platforms E 14 Ts PUN Ee Wl 17 7 1 Radio module WMG gr m m omo om T 17 7 2 Debug Di e 20 e ATAG fOr ARM MER omm 21 Lik JTAG fOr AVR Mc ET 22 7 5 User IMME EE 22 7 6 J mper a tle IL EE 24 8 Board EEN 25 Bite Onboard EE 26 8 1 1 Temperature Sens Ee 26 8 1 2 Ambient light Sensor ires niene rnt nni kane iude ren x x E esaet NEE 26 8 1 3 Acceleration sensOr AEN 27 8 2 LEDS and bloss 99 29 m 02120 c tui setae ew ic ntact 27 INANIS c RN 27 Se User BONE oH
48. e 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 8 1 3 Acceleration sensor The acceleration sensor BMA150 communicates over two wire interface with the microcon troller of the radio module Details of operation are described in the datasheet The interupt output of BMA150 could be connected with Pin 11 by setting the jumper JP 1 pins 2 and 3 TWl adress 0111 000 R W Write R W 0 Read R W 1 C24 C25 100nF 100nF DGND DGND Figure 15 Acceleration sensor BMA150 8 2 LEDs and buttons The deRFnode and deRFgateway boards comprise three LEDs and two buttons each user defined controllable 8 2 1 User LEDs The three red LEDs are active low and may be controlled by the radio module MCU LED1 D1 Pin8 LED2 D2 Pin 31 LED3 DS Pin 33 VCC wu Figure 16 User LEDs dresden elektronik Tel 49 351 31 85 00 Page 27 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 8 2 2 User buttons The active low buttons could be used for user defined inputs The button SW1 is controlled by two different pins which are connected by assembling the 0 ohms resistor R68 or R69 The placement depends on the platform and is the result of the support of different radio modules The co
49. ect example pro vides functions for switching the MCU main clock back to 32kHz For waking up the device again you may e g leave a timer running or configure a exter nal interrupt trigger The steps to be performed after wakeup include simplified the re verse procedure as described above especially reinitialization of internal devices that have been powered down If you bought a deRFdevelopment kit the Kit CD includes a deRFnative example which demonstrates low power modes dresden elektronik Tel 49 351 31 85 00 Page 51 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual M deRFnode and deRFgateway 10 Ordering information The ordering code for deRFnode and deRFgateway are listed in Table 19 Table 19 Ordering information plain variant no radio module included deRFnode 1TNP2 00N00 BN 031632 deRFnode 2TNP2 00N00 BN 031634 deRFgateway 1 TNP2 00N00 BN 031633 accessories suitable case for deRFgateway and deRFnode dresden elektronik Tel 49 351 31 85 00 Page 52 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 11 Revision notes Up to now for the deRFnode and deRFgateway platforms technical problems malfunctions o
50. efer to the table below as well as the respective components datasheets To avoid unstable behaviour the board supplies a reset supervisor which drives a pin low if the input voltage sinks below 2 4V DC deRFnode gateway for AVR respective 3 0V DC deRFnode gateway for ARM This pin is routed to the radio module MCUs reset entry Pin5 To enable a too low voltage causing a MCU reset JP4 must be closed On ARM MCUS the reset supervisor must be explicitly enabled see section 8 4 Table 5 Operational ranges Min Max Min Typ Max AT91SAM7X512 on deRFarm7 radio mod 3 0V 3 6V 6OHA 90mA 200mA ules AT86RF231 any Atmel radio transceiv and er used on deRFarm7 ra 1 8V 3 6V lt 0 2uA 12mA lt 25mA AT86RF212 dio modules Atmega128RFA1 on deRFmega128 radio 1 8V 3 6V 20nA 1e mA ssl modules DP83848C eo for ARM 3 oy 33V 14mA 92mA dresden elektronik Tel 49 351 31 85 00 Page 11 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway BMA150 acceleration sensor 2 4V 3 6V 1pA 200uA 2904A ISL29020 luminosity sensor 1 7V 3 6V 500nA 65pA TMP102AIDRLT temperature sensor TBD TBD TBD TBD TBD AT25DF041A 4Mbit serial Flash 2 7N 3 6V 25HA 10mA 20mA FT245RL USB for AVRs 4 0V 5 25V 50A 15mA 24mA
51. eway 1TNP2 00NO00 Radio modules deRFmega128 22A00 deRFarm7 25A00 Software 6LOWPAN Stack and Control Manager on Development Kit CD 4 3 Point to Point connection for simple applications Application The simplest network is a point to point connection between two devices There is no need to use a complex protocol Required components Platforms deRFnode 2TNP2 00NO00 Radio modules deRFmega128 22A00 Software Wireless UART based on Atmel s MAC Stack available on Develop ment Kit CD dresden elektronik Tel 49 351 31 85 00 Page 10 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual M deRFnode and deRFgateway 3 5 Technical data 5 1 Mechanical Table 4 Mechanical data baseboard including radio module Size of PCBA L x W x H 69 x 75 x 30 mm 5 2 Operation conditions The recommended operating conditions are as follow Supply voltage VCC 3 3VDC 0 3VDC Temperature T 40 C to 85 C 5 3 Electrical 5 3 1 Operational ranges Since the voltage regulators threshold is fixed to 3 3V DC operation is uncritical as long as input voltage is above 3 3V Below operation is not recommended since assembled compo nents MCU Flash EMAC I2C Sensors will start to fail The probability that they do grows the lower the voltage is For concrete working voltage ranges please r
52. ibrary functions are to be found and their invocation sequence may look like define BOARD ADC FREQ 300000 ADC Frequency define ADC STARTUP TIME MAX 20 returning from Idle mode us define ADC TRACK HOLD TIME MIN 600 Track amp hold Acquisition Time ns unsigned int adc out V bat const Pin pin 1 27 AT91C BASE PIOB AT91C ID PIOB PIO INPUT PIO DEFAULT PIO Configure pin lys ADC Initialize AT91C BASE ADC AT91C ID ADC AT91C ADC TRGEN DIS 0 AT91C ADC SLE AT91C ADC LOW BOARD MCK BOARD ADC FREQ ADC STARTUP TIM 2 ADC TRACK HOL I T P NORMAL MODI ES 10 BIT GI ras MAX TIME MIN J LJ ADC EnableChannel AT91C BASE ADC ADC CHANNEL 0 ADC StartConversion AT91C BASE ADC I wait for conversion termination while ADC IsChannelInterruptStatusSet ADC GetStatus AT91C BASE ADC ADC CHANNEL 0 E perform measurement adc out ADC_GetConvertedData AT91C BASE ADC ADC CHANNEL 0 I convert the measured value to real voltage mV voltage divider lt gt V bat 4 73 V meas max resolution 10bit V ref 3 3V lt gt V ref Ox3FF V meas adc out lt gt V bat 15 24 adc out 61 V meas 4 V bat 61 meas 4 deactivate the ADC for power saving ADC DisableChannel AT91C BASE ADC ADC CHANNEL 0 dresden elektronik Tel 49 351 31 85 00 Page 45 of 56 ingen
53. ieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 2011 07 15 For AVR MCUs an equivalent code snippet is define VREF 1 6 reference voltage uintl6 t adc val double v bat double c ADC measurement value real battery voltage conversion factor D double 1040 double 220 VR C EF dif VREF 1 6 Select internal 1 6V reference voltage ADMUX 1 REFS1 1 REFSO else Lf endif Analog channel 0 and gain selection gt no changes required none select prescaler for 500 kHz frequency if F CPU 16000000 DCSRA 1 lt lt A F CPU 800000001 DCSRA 1 lt lt ADE F_CPU 400000001 DCSRA 1 lt lt ADE F CPU 100000007 DCSRA 1 lt lt ADE 1 lt lt ADPSO elif elif 1 lt lt ADPSO elif Da E NT else terror endif unsupported E CFU put into free running mode ADTS2 0 05000 enable ADC ADCSRA 1 lt lt ADE N 8 ADCS tart Conversion Clear ADIF RA 1 lt lt ADSC wait for completion while ADCSRA amp 1 lt lt ADIF get measurement adc_val ADC disable ADC ADCSRA amp 1 lt lt ADEN convert to real battery voltage v_bat c adc val
54. in27 Pin28 Pin29 Pin30 Pin31 Pin32 Pin33 Pin34 Pin35 Pin36 Pin37 Pin38 4 Pin39 Pin40 Pin41 Pin42 Pin43 Pin44 2 T VCC module SLM 123 01 L S DGND DGND HEADER 23 E eeleren wel et Lee mU ST a Ese i R50 R2 OROO n b x R3 n b x R4 nb x lt i deRFarm7 x5xx1 AT91SAM7X512 CU deRFarm7 x5xx1 AT91SAM7X512 CU A RF Header Pin Description deRFmega128 Port ATmega128RFA1 Pin23 GND Pin22 GND Pin21 PB5 OC1A PCINTS Pin20 PB7 OCOA OCIC PCINT7 Pinl9 PB4 OC2 PCINT4 Pinl8 PB6 OC1B PCINT6 Pinl7 PB3 MISO PCINT3 PDO Pinl6 PBO SSN PCINTO Pinl5 PB2 MOSI PCINT2 PDI Pinl4 CLKI Pinl3 PBI SCK PCINTI Pinl2 PD5 XCK1 Pinll PD7 TO PinlO PD3 TXDI INT3 Pind PDI SDA INTI Pin8 PG5 OCOB Pin7 PDO SCL INTO Pin6 PG2 Pins RSTN Pin4 PGI DIGI Pin3 AREF Pin2 GND Pinl VCC GND PBIS ERXDV ECRSDV PB18 EF100 ADTRG PB6 ERXI PB8 EMDC PA16 SPIO MISO PBO ETXCK EREFCK PAIT SPIO MOSI PA3 RTSO SPI1_NPCS2 PA18 SPIO_SPCK PB2 ETXO PB25 TIOAI DTR1 PAI TXDO PAIO TWD PB26 TIOB1 RI1 PAII TWCK PB3 ETX1 RSTN USBDM ADVREF GND VCC deRFmegal28 Port ATmegal28RFAl Pin4 VCC Pin5 GND Pin26 PEO RXD PCINT8 Pin27 PD2 RXDI INT2 Pin28 PEI TXDO Pin29 PD6 T1 Pin30 PE2 XCKO0 AINO Pin31 PE3 OC3A AINI Pin32 PD4 ICPI Pin33 PE4 OC3B INT4 Pin34 PFO ADCO Pin35 PES OC3C INTS Pin36 PFI ADCI Pin37 PE6 T3 INT6 Pin3
55. ion Pin Function 1 VCC 2 VCC 3 100K Pullup 4 GND 5 TDI 100K Pullup 6 GND 7 TMS 100K Pullup 8 GND 9 TCK 100K Pullup 10 GND 11 TCK 12 GND 13 TDO 14 GND 15 RSTN 16 GND 17 N C 18 GND 19 N C 20 GND dresden elektronik Tel 449 351 31 85 00 Page 21 of 56 ingenieurtechnik gmbh Enno Heidebroek Str 12 01237 Dresden Germany Fax 49 351 3 18 50 10 wireless dresden elektronik de www dresden elektronik de User Manual Version 1 1 2011 07 15 7 4 JTAG for AVR deRFnode and deRFgateway The header layout conforms to the 10 pin assignment used usually for AVR Figure 9 JTAG AVR header VCC JTAG HEADER AVR DGND The following table shows the signal description Table 13 JTAG for AVR header pin assignment Pin Function Pin Function 1 TCK GND 3 TDO VCC 5 TMS RSTN 7 VCC N C 9 TDI 10 GND 7 5 User Interface The User Interface header provides access to a series of IO port pins DGND SW2 Pin27 O Pin30 Pin31 Pin18 Pin33 Figure 10 User header dresden elektronik ingenieurtechnik gmbh Enno Heidebroek Str 12 01237 Dresden Germany Tel 49 351 31 85 00 Page 22 of 56 Fax 49 351 3 18 50 10 wireless dresden elektronik de www dresden elektronik de User Manual Version 1 1 2011 07 15 deRFnode and deRFgateway The following table shows the signal description Table 14 User interface header pin assignment
56. ive USB interface All necessary external parts for USB communication are placed on the deRFgateway USBDM Pin 4 veus DGND R30 1K50 EXC 15pF R31 4 USBDM ARM DN Lbnr Pin USEDP ARM r IS R32 4 H H Lh R33 R34 piace pads directly on usb R35 R36 c oRoo oRdo data lines to avoid stubs in F veus assembly variants MC 15pF X10 A i i i ek ali 1 a i DGND DGND DGND E WT TUS USBDM_AVR USBDP AVR Figure 18 Native USB interface 8 3 2 USB serial for AVR based radio modules The serial USB interface is a variant of the deRFnode platform The communication is real ized by the transceiver circuit FT245RL and the level shifter circuits TXB0108 Following USB data lines are used USB Bit 0 Pin 16 USB Bit 1 Pin 41 USB Bit 2 Pin 12 USB Bit 3 Pin 6 USB Bit 4 Pin 37 USB Bit 5 Pin 19 USB Bit 6 Pin 39 USB Bit 7 Pin 18 dresden elektronik Tel 49 351 31 85 00 Page 29 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 eet e deRFnode and deRFgateway USBDM ARM L USBDP ARM Mn el pieca pad acy on wb x10 vave n b n b assembly variants hi H D See IA ES 4 ID R37 R38 Do i 1P4220CZ6 Ica USBDM AVR USBDP AVR
57. justable Vcc 2M 820k bestiickt 3 3V VCC c17 nbi nur 820k best ckt 2 7V C18 1uF nur 2M best ckt 1 8V 1uF nb DGND X DGND fixed version DGND Current measurement of radio module JP5 voe t O O ve module JP 2 VBUS Monitoring Vee vocc VCC VOC A A A Pin36 in USBSV 7 Gg lt Ping gt Programmable Supervisor R29 47k0 overlapping pads of same net DGND VBAT Monitoring JP3 R42 f vaart OL D emm OO JP 2 820k R43 LTC2935ITS8 1 220k S2 S1 S0 Low High High gt gt Vth 3 00V 2 S1 SO High Low High gt gt Vth 2 40V DGND DGND DGND DGND dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFnode 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 101 02 Power Supply SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 44 DrawnBy NOS APA Sheet 2 of 6 jRev 2 0 VBUS DGND R30 1K50 C28 USB Data ARM 15pF R31 USBDM_ARM 7R Pin4 USBDP_ARM Pin32 Se OEE OE R32 H 7R USB Device Connection R34 place pads directly on usb R35 R36 M OROD data lines to avoid stubs in assembly variants GR S 15pF X10 i VBUS USBDM H USBDP DGND DGND DGND i R37 R38 OROOL OROO D9 H IP4220CZ6 USBTypeB suppl 145 Ica USB Data AVR FT245RL USBDM AVR 16 USB US
58. k Tel 49 351 31 85 00 Page 54 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway dresden elektronik ingenieurtechnik gmbh Enno Heidebroek StraBe 12 01237 Dresden GERMANY Tel 49 351 31 85 00 Fax 49 351 318 50 10 E Mail wireless dresden elektronik de General manager Dipl Ing L Pietschmann Commercial Registry HRB 749 Dresden Municipal Court Tax number 201 107 00726 Sales tax identification number DE 140125678 Trademarks and acknowledgements ZigBee is a registered trademark of the ZigBee Alliance 802 15 4 is a trademark of the Institute of Electrical and Electronics Engineers IEEE These trademarks are registered by their respective owners in certain countries only Other brands and their products are trademarks or registered trademarks of their respective hold ers and should be noted as such Disclaimer This note is provided as is and is subject to change without notice Except to the extent pro hibited by law dresden elektronik ingenieurtechnik gmbh makes no express or implied war ranty of any kind with regard to this guide and specifically disclaims the implied warranties and conditions of merchantability and fitness for a particular purpose dresden elektronik in genieurtechnik gmbh shall not be liable for any errors or incidental o
59. k de 01237 Dresden Germany www dresden elektronik de User Manual Version 1 1 2011 07 15 deRFnode and deRFgateway 3 Try to identify the MCU it must be an ATmega128RFA1 JTAGICE mkII in JTAG mode with ATmega128RFA1 r Device and Signature Bytes ATmega1 28RFA1 Y bag DA 0x01 JTAG ID is Qx0A70103F Signature matches selected device r Programming Mode and Target Settings JTAG mode Settings ISP Frequency Daisy Chain Disabled Figure 32 AVR Studio select MCU 4 Switch to program tab select the desired firmware binary press Program and wait until finished JTAGICE mkII in JTAG mode with ATmega128RFA1 Main Program Fuses LockBits Advanced HW Settings HW Info Auto Device JV Erase device before flash programming Verify device after programming Flash Use Curent Simulator Emulator FLASH Memory Input HEX File D tmp binary hex pe JI Program Verify Read EEPROM Use Current Simulator Emulator EEPROM Memory inmptHEXFe TI Progam veiy Read ELF Production File Format Input ELF File wm Save From V FLASH v EEPROM FUSES J LOCKBITS Fuses and lockbits settings must be specified before Program Save saving to ELF Leaving programming mode OK Figure 33 AVR Studio program MCU dresden elektronik Tel 49 351 31 85 00 ingenieurtechni
60. k gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway The programming procedure ends with a forced device reset after which the new firmware is executed 9 3 ARM based radio modules over JTAG In this chapter is described how to exchange the firmware of an ARM based radio module using Atmel SAM ICE JTAG Emulator and the SAM Prog firmware updater which has al ready been installed It is also assumed that the desired firmware binary was still compiled 1 Plug the programmer to the baseboard ensure that the board is DC or USB powered Figure 34 SAM ICE plugged on xi deRFgateway D tmp binary bin Browse File Size 41012 bytes 2 Open SAM Prog choose the appropriate firmware file then click Yes Be sure that the checkbox m z fo zg None P Auto mode is enabled The m PIO indicator for successfull programming firmware update process will be J TAG Mode only indicated by a flying sheet of paper Greg eet Target ame ae Write Flash 3 To complete the update procedure 16000000 Yes restart the target device by eee temporary opening JP2 or removing Status E cee power supply B et Security Bit uccess Failed D In progress E 1 Active Connection 1 About Figure 35 SAM PROG dresden elektronik Tel 49 351 31 85
61. ktronik de User Manual Versi Reeg deRFnode and deRFgateway 3 Power down the radio transceiver This step depends on the radio module used If you have a deRFmega128 module the respective power reduction register is to be used include lt power h gt PRR1 1 lt lt PRTRX24 power down transceiver Any other Atmel radio transceiver e g AT86RF212 on deRFarm7 series radio modules has a internal state machine which may be switched to sleep state by toggling the levels on the SLP TR and RST lines SLP TR L RST L gt force RESET state wait 1us then set RST H gt TRX OFF state put SLP TRH gt SLEEP state leave SLP TR H setting it back to L would result in transition back to TRX OFF The following diagram taken from AT86RF212s datasheet illustrates the procedure from all states IRST L FORCE TRX OFF all states except SLEEP all states except P ON E m 2 Ge Figure 36 State control source ATMEL datasheet of AT86RF212 transceiver datasheet 4 Remove any unneeded external cabling such as a level shifter or your JTAG program ming adapter if your application allows 5 Switch off the onboard LEDs 6 Put the onboard Flash to Deep Power Down Mode 7 Disable the onboard USB FIFO only deRFnode gateway for AVR On boards equipped with a FTDI USB FIFO the USB transceiver may be disabled only by physically disconnecting the USB cable Due to a hardware issue it may still hap
62. merl disable On ARM MCUs the equivalent function call is PMC DisablePeripheral id from pe ripheral pmc pmc c Where the peripheral IDs are to be found in the At91SAM7X datasheet If you desire to switch off all devices at once PMC DisableAllPeripherals will do that The watchdog is configured slightly different On AVR MCUs use include lt avr wdt h gt wdt disable respective WD Disable from peripheral wdt wd c on ARM MCUs If using native USB on ARM MCUs the USB transceiver is disabled by invoking UDP DisableTransceiver from usb device core USBD UDP c 10 Disable BOD Slight improvements may be achived by disabling the Brown out detection feature On ARM MCUs the GPNVM BitO has to be cleared by writing to the internal flash memory EFC PerformCommand AT91C BASE EFCO AT91C MC FCMD CLR GP NVM AT91C MC GPNVMO On AVR MCUs this is done by clearing the BODLEVEL bits 2 0 in the Fuse Low Byte 11 Slow down the MCU clock This differs depending on the radio module used When it is deRFmega128 series based simply put the MCU to sleep mode by writing to the sleep mode control register followed by executing the sleep instruction include avr io h MCU register definitions include lt avr sleep h gt SMCR 1 lt lt SE 1 SM1 go into power down mode sleep cpu execute sleep instruction If using an ARM based MCU the AT91Lib usb device massstorage proj
63. n asked This is necessary since the AT91Lib is provided in parts only where each is specially tailored to the belonging application example Any path stated in fu ture is to be seen relative to extraction root directory gt at9lsam7x ek packages lt common example directory gt at91lib 9 4 1 Enabling the reset supervisor As already described in chapter 3 the Reset Supervisors output pin is routed to the MCUs reset pin if JP 4 is shortcut When using an AVR MCU no further configuration is required But when using an ARM MCU the reset pin functionality must be explicitly enabled The re quired library module is peripherals rstc rstc c an invocation of RSTC SetUserResetEnable may be used to enable or disable it 9 4 2 Initialize and use I2C devices All of the deRFnode gateway boards include three environmental sensors which are acces sible via the two wire aka I C Interface TWI To use them you basically have to perform the following steps 1 enable the TWI bus 2 make the MCU the TWI master 3 configure the devices behavior and 4 communicate with the device The first step is only necessary if you use deRFmega128 based radio modules Here you explicitly have to enable the both pull up s on the SDA SCL lines by setting PD6 to Low level DDRD 1 lt lt PD6 make PD6 an output pin PORTD amp 1 lt lt PD6 switch to Low level The second step is quite simple since there already exist ready to
64. ncerning pin of button 1 is used by the ARM based dresden elektronik radio module to support the ethernet interface The pin of button 2 can only be used if the interrupt feature of the acceleration sensor BMA150 is disabled Button 1 SW1 on deRFnode Pin 20 Button 1 SW1 on deRFgateway Pin 14 Button 2 SW2 Pin 29 by setting jumper JP1 to pin 1 and 2 for AVR Pin20 SWI 2 mM ee dl R68 and R69 share pad Taster Pini4 SW2 en aa swe for ARM Taster X11 DGND e SW2 od Sw Extension Figure 17 User buttons 8 3 USB interface Regarding the USB interface the platforms deRFnode and deRFgateway come in two differ ent flavours The deRFgateway USB interface can only be accessed over native USB of the ARM based dresden elektronik radio modules The deRFnode platform is offered in two vari ants One with native USB for deRFarm7 radio module and another variant with an USB se rial converter for deRFmega128 radio modules dresden elektronik Tel 49 351 31 85 00 Page 28 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway 8 3 1 Native USB only for ARM based radio modules The native USB interface is optimized for using the deRFgateway platforms together with deRFarm7 radio modules which contain a SAM7X512 microcontroller with an implemented nat
65. ng explicitly pay attention to use the version stated since newer releases may cause problems and are unsupported 9 1 2 JTAG programming and adapter selection For AVR based programming we suggest to use the Atmel AVR ISP mkll Programming adapter In case of an ARM based MCU you may either use the Atmel AT91SAM ICE JTAG Emulator 6 Segger J Link 7 Amontec JTAGkey 8 or OpenOCD USB Adapter 9 If you do not have a fully compatible combination of radio module and deRFnode gateway baseboard refer to chapter 3 it may be required to upgrade the missing JTAG header and for ARM on AVR boards also the 4x100K pull up resistor network 9 1 3 JTAG programming software The required JTAG programming software differs depending on the chosen JTAG program ming adapter If you use winavr and a AVR ISP mkll programming might be simply done by avrdude a command line tool which already comes with win avr If you prefer a GUI take the free AVR Studio from Atmel 10 If you took SAM ICE or the J Link as programming adapter it is recommended to use the SAM Prog which is part of the SAM BA programming software 11 Amontecs and Olimex programming adapters may be accessed by Openocd 13 dresden elektronik Tel 49 351 31 85 00 Page 38 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual GE deRFnode and deRFgatewa
66. ngenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway R58 R61 R58 R62 R58 R63 Figure 25 Resistors supervisor Table 18 Supervisor configuration Platform R58 R59 R60 R61 R62 R63 Threshold deRFnode 1TN2P 00NO00 n a OR OR OR na n a 3 0 VDC deRFnode 2TN2P 00NO00 OR na OR na OR na 2 4 VDC deRFgateway 1TN2P 00NO0O0 na OR OR OR na n a 3 0 VDC dresden elektronik Tel 49 351 31 85 00 Page 35 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway VCC VCC VCC VCC A A W vee er en d IC15 i 8 i S2 VCC j CN s AST e pes TP2 i so Pro Kan sch sn sn nn em wm wb wn ali WR cnn ORO pJOROO e LTC2935IT58 1 DGND Figure 26 Supervisor LTC2935ITS8 1 with configuration resistors for deRFgateway 8 7 Current measurement For current consumption tests of the radio module it is possible to place an ampere meter on jumper JP5 JPS vec lt t fO Of gt vee module JP 2 Figure 27 Current measurement for radio module 8 8 USB supply voltage monitoring The monitoring of the USB power supply can be used
67. ny www dresden elektronik de Page 16 of 56 User Manual ee deRFnode and deRFgateway 7 Pin assignment This section describes the available headers on the deRFnode and deRFgateway platforms as summarized in Table 8 7 1 Radio module interface The deRFnode and deRFgateway will support all dresden elektronik radio modules Depend ing on the radio module and the platform some features will not be supported The details of radio module specific signals are available in the associated user manuals SAESGAESEGESERLERLEBBNERE VCC module J Figure 6 Header for radio modules dresden elektronik Tel 49 351 31 85 00 Page 17 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway The next two tables give an overview of the radio module signals Table 9 shows the signal names of the deRFmega128 radio module series of dresden elektronik Table 10 for the deRFarm7 radio module series Table 9 Pin assignment for deRFmega128 series 22A00 22A02 22C00 22C02 Pin uC Port deRFmega 128 Pin LC Port deRFmega128 1 VCC 24 VCC 2 GND 25 GND 3 AREF 26 PEO RXDO PCINT8 4 PG1 DI 27 PD2 RXD1 INT2 5 RSTN 28 PE1 TXDO 6 PG2 29 PD6 T1 7 PDO SCL INTO 30 PE2 XCKO AINO 8 PG5 OCOB 31 PE3 OC
68. on the PC side can be downloaded from the dresden elektronik website lt lt LINK gt gt If you bought a dresden elektronik deRFdevelopment Kit the included kit CD also provides the drivers and complete application examples which may be easily modi fied according to your needs dresden elektronik Tel 49 351 31 85 00 Page 44 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual ee deRFnode and deRFgateway 9 4 4 Measuring the battery voltage The VBAT signal may be used to monitor the current battery voltage using the MCUs internal A D converter This requires a reference voltage On ARM MCUS it must be provided exter nally on Pin3 which is available on the X8 Header at Pin 32 It is suggested to shortcut it to VCC which is available on the same Header on Pins 2 and 33 Basically AVR MCUs can handle external reference voltages too but we recommend using the internal reference volt age since it avoids additional external shortcut connections and enables a more precise measurement However in both cases during measurement the GPIO Pin 34 e g on X8 Header Pin 15 must not be used otherwise The measurement process includes 1 Initialization of the ADC 2 activation of the required ADC channel 0 3 perform the measurement 4 shut down the ADC For ARM MCUs in peripherals adc adc c the required l
69. pen that the octal driver IC9 energizes back the FIFO IC8 To avoid that ensure that in contrast to 8 RD and WR always drive high current 8 Ensure that the MCU GPIO pins do not drive current Due to circuit design some GPIO pins are set to GND others have external pull up s or pull downs applied which are required for proper operation but when sleeping they still drive unnecessary current Regardless of the used MCU this may be achieved by first setting the pins to be outputs internal pull up s enabled Then read back the level on each pin if it differs from the expected state being H due to enabled pull up s disable dresden elektronik Tel 49 351 31 85 00 Page 50 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual ee deRFnode and deRFgateway 3 lt individual pull up s Be careful to left out the Pins connected to the transceiver or the USB FIFO as otherwise you would reactivate the devices powered down before see above Disable any unnecessary MCU internal device This includes running timers transceivers UART DBGU TWI SPI native USB ADC watchdog On AVR MCUs this may be achieved by writing to the Power Reduction Registers like include lt avr power h gt PRRO 1 lt lt PRTIMO disable Timer 0 or using existing functions from power h such as power ti
70. r any other critical issues are not known dresden elektronik Tel 49 351 31 85 00 Page 53 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway References 1 Atmel IEEE 802 15 4 MAC Software Package revision 2 5 2 http Awww atmel com dyn products tools_card asp tool_id 4675 2 Atmel BitCloud ZigBee Pro http www atmel com dyn products tools_card asp tool_id 4495 3 winavr version 20100110 http sourceforge net projects winavr files WinAV R 201 001 10 4 yagarto GNU arm toolchain version 20100813 http www yagarto de download 5 yagarto tools version 20100703 http www yagarto de download 6 Atmel SAM ICE JTAG Emulator http www atmel com dyn products tools_card asp tool_id 3892 7 Segger J Link http www segger com cms jlink html 8 Amontec JTAGkey www amontec com jtagkey shtml 9 Olimex OpenOCD USB http www olimex com dev arm usb ocd html 10 AVR Studio 4 18 http Awww atmel com dyn products tools_card asp tool_id 2725 11 SAM BA 2 10 http www atmel com dyn products tools card asp tool id 3883 12 AT91SAM7X 512 Software package for IAR 5 2 Keil and GNU revision 1 5 http www atmel com dyn products tools card asp tool id 4343 http www atmel com dyn resources prod documents at91sam7x ek zip dresden elektroni
71. r consequential damage in connection with the furnishing performance or use of this guide No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or any means electronic or mechanical including photocopying and recording for any purpose other than the purchaser s personal use without the written permission of dres den elektronik ingenieurtechnik gmbh Copyright O 2011 dresden elektronik ingenieurtechnik gmbh All rights reserved dresden elektronik Tel 49 351 31 85 00 Page 55 of 56 ingenieurtechnik gmbh Fax 49 351 318 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual ee deRFnode and deRFgateway Annex A Schematics This section contains the schematics of deRFgateway 1TNP2 deRFnode 1TNP2 and deR Fnode 2TNP2 dresden elektronik Tel 49 351 31 85 00 Page 56 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de ooo DGND Pin21 C E Pin20 Pin19 Pin18 Pin17 Pin16 Pin15 Pin14 Pin13 Pin12 Pin11 Pin10 Ping Pin8 Pin7 Pin6 Pin5 Pin4 Pin3 qr _ 9 DEND o VCC module zk X1 THT RF Header for AVR ARM based radio modules 21 20 19 18 17 16 15 14 13 12 11 10 o SN Q RO Oo 24 25 26 27 28 29 28 R88 Pin26 PONE P
72. t 5 of 6 jRev 2 0 4M Bit Flash Memory vee VCC Acceleration Sensor Internal TWI Address 0111 000 R W R W 0 gt Write R W 1 gt Read Ambient Light Sensor Internal TWI Address 1000 100 R W R W 0 gt Write R W 1 gt Read Temperature Sensor Internal TWI Address 1001 000 R W R W 0 gt Write R W 1 gt Read ISL29020IROZ T7 TMP102AIDRLT 100nF 100nF dresden elektronik ingenieurtechnik gmbh D 01237 Dresden Enno Heidebroek Str 12 Title Telefon 0351 31 85 00 deRFnode 1TNP2 00N00 Telefax 0351 31 85 010 Size Document Number Document File Name A4 5 646 16 02 101 02 Flash Sensors SchDoc Nr Anderung Datum Name Date 18 03 2011 Time 10 13 45 DrawnBy NOS APA Sheet 6 of 6 jRev 2 0 ooo DGND Pin21 C E Pin20 Pin19 Pin18 Pin17 Pin16 Pin15 Pin14 Pin13 Pin12 Pin11 Pin10 Ping Pin8 Pin7 Pin6 Pin5 Pin4 Pin3 qr _ 9 DEND o VCC module zk X1 THT RF Header for AVR ARM based radio modules 21 20 19 18 17 16 15 14 13 12 11 10 o SN Q RO Oo 24 25 26 27 28 29 28 R88 Pin26 PONE Pin27 Pin28 Pin29 Pin30 Pin31 Pin32 Pin33 Pin34 Pin35 Pin36 Pin37 Pin38 4 Pin39 Pin40 Pin41 Pin42 Pin43 Pin44 2 T VCC module SLM 123 01 L S DGND DGND HEADER 23 E eeleren x nb px PO R47 Ri OR
73. y 9 2 AVR based radio modules over JTAG This chapter exemplarily describes the programming process for a AVR based radio module put on a deRFnode gateway for AVR It is assumed that the customer uses a AVR ISP mkll as programming device Atmel AVR Studio as programming software already installed and the desired firmware binary is accessible 1 Plug the programmer to the baseboard ensure that the board is DC or USB powered Figure 30 JTAGICE mkll plugged on deRFnode 2 Open AVR Studio and connect to the programmer device Tools Program AVR Connect lol xl File Project Build View Tools Debug Help Diddy A 304 2 0 Be thee EY Oot i gt Ai Trace Disabled JS Se D A Jee Me Se wi m KI x nl ilm ys IG Cancel Baud rate fi 15200 Y Baud rate changes are active immediately Tip To auto connect to the programmer used last time press the Programmer button on the toolbar Loaded plugin STK500 Note that a tool cannot be used for programming as long as it is connected in a debugging session In that case select Stop Debugging first Disconnected Mode E buila Message E Find in Files T Breakpoints and Tracepoints CAP NUM OVR Figure 31 AVR Studio select AVR programmer dresden elektronik Tel 49 351 31 85 00 Page 39 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektroni
74. yte in the user provided location data i SPDR Stop the SPI transaction by setting CS high PORTE 1 PE5 check the read Ids must be Ox1F 0x44 0x01 0x00 As like as in all previous chapters a ready to use library is provided on the CD ROM belong ing to the deRFdevelopment Kit 9 4 6 Initialize and use the Ethernet transceiver Only the deRFgateway boards are equipped with Ethernet circuitry hardware PHY layer transceiver The EMAC must be implemented in software Although it is not impossible to do this with an AVR we focus on using it with an ARM MCU here since as like as in all chapters before the AT91Lib includes even this part Transceiver and MCU are connected via RMII Reduced Media Independent Interface To save energy the Ethernet transceiver starts up in power down mode pull down resistor on dresden elektronik Tel 49 351 31 85 00 Page 48 of 56 ingenieurtechnik gmbh Fax 49 351 3 18 50 10 Enno Heidebroek Str 12 wireless dresden elektronik de 01237 Dresden Germany www dresden elektronik de User Manual Versi Reeg deRFnode and deRFgateway transceiver pin 7 Alternatively the same port pin may act as an interrupt line Due to a pull down resistor this is not possible in factory state If you intend to use it please remove R13 The Ethernet initialization procedure consists of 1 Setup the EMAC enable the EMAC peripheral configure the PIO pins and the

Download Pdf Manuals

image

Related Search

Related Contents

  DWYER INSTRUMENTS, INC. Phone: 219/879-8000  LGC manual english 1.1 - The University of Hong Kong  clique aqui para ver o manual de utilizador deste veículo  Lenovo ThinkPad T520  Manual del usuario  SFH型ホルダ一取扱説明書  Montaje y modo de empleo Instruções para montagem e  Samsung ML-2540R Užívateľská príručka  manual de instrucciones del programador pg master 6001  

Copyright © All rights reserved.
Failed to retrieve file