Telegesis (UK) Limited
TG-ETRXn-UG-01-103
22
User Guide
1.04
ETRX1 and ETRX2
©2008 Telegesis (UK) Ltd
ETRXn User Guide (Rev 1.04)
Example for a Development kit board:
Set IRQ0 on rising edge:
enter “ATS2E=0002”
Toggle I/O pin 4 on IRQ0:
enter “ATS15=0024” (see section 10 for details)
Press Button 4, which is connected to I/O pin 0. LED 4 turns on and off.
5.5.2 Timers
S17-S28 define the functionality of eight timers. The first four are used for default module
functionality, but can be modified if needed, the defaults being shown in Table 2. As described
above, the first register of each pair defines the timer interval and the second register contains the
function code. The default functions are listed in Table 2.
Number
Timer
Function
Threshold Interval
Function
code
Function
0
4
1 sec
0011
If I am a Mobile/Sleepy end device Poll Parent for data
and restart timer
1
F0
1 min
0013
If I am a Sink advertise me and restart timer
2
F4
1 min
and 1 s
0014
Check for neighbours in local neighbour table. If no
neighbours are present for 5 consecutive times leave
the PAN. Note: It takes about 80 seconds for a
neighbour to age out of the neighbour table.
3
F0
1 min
0016
In case I am not joined to a network scan for and join
the next best network and restart the timer
Table 2. Timer defaults
Example for a Development kit board:
Set 1 sec interval on timer 4:
enter “ATS1F=0004”
Toggle I/O pin 4 on timer 4 and restart:
enter “ATS20=0034”
Now LED 4 flashes repeatedly.
All registers in this section are non-volatile, except S24 and S27 (functionalities of timer/counter 6
and 7) whose values after power-up and reset are defined in registers S25 and S28 respectively.
This has been done to prevent EEPROM corruption due to constant EEPROM writes when
changing a timer‟s functionality repeatedly. So if you intend to change a timer‟s functionality
repeatedly in your application we recommend that you use timers 6 and 7.
To disable a timer simply set either the timer register or the corresponding action register to 0.
5.5.3 Power Management (S29-S2A)
In order to achieve long battery life, careful power management is required. The ETRX1 and
ETRX2 wireless meshing modules have four different power modes (with firmware R2xx) to allow
maximum flexibility and the longest possible battery life. When selecting a battery, note that it
must be able to supply the peak current when the ETRXn is transmitting
– see the ETRX2 or
ETRX2PA product manual for data.