User Manual
Version 1.1
2011-07-15
deRFnode and deRFgateway
dresden elektronik
ingenieurtechnik gmbh
Enno-Heidebroek-Str. 12
12 7 Dr
n
rm  n
Tel.: +49 351 31 85 00
Fax: +49 351 3 18 50 10
wireless@dresden-elektronik.de
www. r
n- l k r nik.
Page 49 of 56
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
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 its 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 At91Libs 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 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 I2C sensors:
In factory default state and if you didnt 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.