Matching Algorithm For Short And Extended Addresses - Texas Instruments CC253x User Manual

System-on-chip for 2.4ghz
Table of Contents

Advertisement

Receive Mode
Short address entries are enabled in the SRCSHORTEN0, SRCSHORTEN1, and SRCSHORTEN2 registers.
Register bit n corresponds to short address entry n.
Extended address entries are enabled in the SRCEXTEN0, SRCEXTEN1, and SRCEXTEN2 registers. In
this case, register bit 2n corresponds to extended address entry n. This mapping is convenient when
creating a combined bit vector (of short and extended enable bits) to find unused entries. Moreover,
when read, register bit 2n + 1 always has the same value as register bit 2n, because an extended
address occupies the same memory as two short-address entries.
Matching Algorithm
The SRCMATCH.SRC_MATCH_EN bit controls whether source address matching is enabled or not. When
enabled (which is the default setting) and a frame passes the filtering algorithm, the radio applies one of
the algorithms outlined in
The result is reported in two different forms:
A 24-bit vector called SRCRESMASK contains a 1 for each enabled short entry with a match, or two
1s for each enabled extended entry with a match (the bit mapping is the same as for the address-
enable registers on read access).
A 7-bit value called SRCRESINDEX:
– When no source address is present in the received frame, or there is no match on the received
source address:
Bits 6:0: 011 1111
– If there is a match on the received source address:
Bits 4:0: The index of the first entry (that is, the one with the lowest index number) with a match,
0–23 for short addresses or 0–11 for extended addresses.
Bit 5: 0 if the match is on a short address, 1 if the match is on an extended address
Bit 6: The result of the AUTOPEND function
Short Source Address (Mode 2)
The received source PAN ID is called srcPanid. The received short
address is called srcShort.
SRCRESMASK = 0x000000;
SRCRESINDEX = 0x3F;
for (n = 0; n < 24; n++) {
bitVector = 0x000001 << n;
if (SRCSHORTEN & bitVector) {
if ((panid[n] == srcPanid) &&
(short[n] == srcShort)) {
SRCRESMASK |= bitVector;
if (SRCRESINDEX == 0x3F) {
SRCRESINDEX = n;
}
}
}
}
Figure 23-13. Matching Algorithm for Short and Extended Addresses
SRCRESMASK and SRCRESINDEX are written to RF Core memory as soon as the result is available.
SRCRESINDEX is also appended to received frames if the FRMCTRL0.AUTOCRC and
FRMCTRL0.APPEND_DATA_MODE bits have been set. The value then replaces the 7-bit correlation value
of the 16-bit status word.
Interrupts
When source address matching is enabled and the matching algorithm completes, the
SRC_MATCH_DONE interrupt flag is set, regardless of the result. If a match is found, the
SRC_MATCH_FOUND flag is also set immediately before SRC_MATCH_DONE.
Figure 23-14
illustrates the timing of the setting of flags:
228
CC253x Radio
Figure
23-13, depending on which type of source address is present.
Extended Source Address (Mode 3)
The received extended address is called srcExt.
SRCRESMASK = 0x000000;
Copyright © 2009–2014, Texas Instruments Incorporated
SRCRESINDEX = 0x3F;
for (n = 0; n < 12; n++) {
bitVector = 0x000003 << (2*n);
if (SRCEXTEN & bitVector) {
if (ext[n] == srxExt) {
SRCRESMASK |= bitVector;
if (SRCRESINDEX == 0x3F) {
SRCRESINDEX = n | 0x20;
}
}
}
}
SWRU191F – April 2009 – Revised April 2014
www.ti.com
Submit Documentation Feedback

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents