Configure 802.15.4 PHYs in RAIL#
This section describes how to configure EFR32 radios with an IEEE 802.15.4 compatible PHY. Other PHYs might not be available in RAIL, but can be selected in the Radio Configurator.
Note: For the available PHYs and 802.15.4 specific RAIL features on the selected radio platform generation, please consult:
the device’s datasheet
the Radio Configuration GUI
the RAIL's documentation
2.4 GHz 250 kbps O-QPSK PHYs#
The 2.4 GHz 250 kbps O-QPSK PHY is the most commonly used instance of the IEEE 802.15.4 PHYs supported in RAIL as an embedded configuration. Zigbee and Thread applications (indoor PAN network protocols) also configure this PHY when initializing the stack.
To configure this PHY, call the RAIL_IEEE802154_Config2p4GHzRadio()
RAIL API. This procedure shall take the place of RAIL_ConfigChannels()
.
This PHY initializes the radio for 2.4 GHz operation as defined by IEEE 802.15.4-2011 section 8.1.2.2.
This PHY uses a 1-byte header (PHR) where the 7 LSB bits determine the number of bytes in the PSDU (payload data).
RAIL supports this PHY along with each combination of the following options:
Antenna Diversity
Radio Coexistence
FEM
Configure these PHYs via the RAIL_IEEE802154_Config2p4GHzRadio[AntDiv][Coex][Fem]()
API variants.
These PHYs are highly optimized and validated configurations not available in the Radio Configurator.
Note: In these PHY configurations, only channels 11-26 are available. This PHY should not be confused with the SUN O-QPSK PHY. The SubGHz O-QPSK PHYs are documented in a subsequent section.
Connect 2.4 GHz O-QPSK PHYs#
The Radio Configurator provides the Connect 2.4GHz OQPSK 2Mcps 250kbps
PHY, which is mostly compatible with 802.15.4, but might not meet all requirements, and might fail regulatory requirements (such as FCC). This PHY has worse RF performance on most EFR32 radio generations than the PHYs introduced in the previous section.
However, configuring via the Radio Configurator can be useful if the user has some experience with the 802.15.4 packet format, but doesn’t need to comply with the standard, as these can be customized in many ways (DSSS configuration, custom datarate, different syncword, and preamble configuration, channel number, and frequency assignment, etc.).
You can find more information in UG435.02: Using Silicon Labs Connect v3.x with IEEE 802.15.4.
Wi-SUN and SUN PHYs#
The Wi-SUN and SUN PHYs are available in the Radio Configurator. However, some of the PHYs below might have an alternative configuration available via RAIL APIs. Use the PHYs from the Radio Configurator to be fully compatible with the standard.
SUN FSK#
These PHYs can be found under the Base
profile -\> IEEE 802.15.4 SUN FSK \*
.
The SUN FSK PHYs supported in the Radio Configurator always use phySunFskSfd = 0
SFD configuration.
SubGHz GB PHYs#
The following PHYs are being used most commonly in UK metering standards, for example, Zigbee. These can be configured via RAIL API calls:
RAIL_IEEE802154_ConfigGB863MHzRadio()
RAIL_IEEE802154_ConfigGB915MHzRadio()
Note: These PHYs provide quasi SUN-FSK configuration but are not fully compliant with that standard (there are limitations on the PHY header's construction, e.g., the maximum payload length is limited to 127 bytes in these PHYs).
The available channels for the 863 MHz PHY ranges between 0xE0..0xFA, while for the 915 MHz PHY, these are 0x80..0x9A, 0xA0..0xA8, 0xC0..0xDA.
SUN O-QPSK#
These PHYs can be found under the SUN OQPSK
Profile.
Wi-SUN specific PHYs#
The HAN PHYs can be found under the
Wi-SUN HAN
Profile.The FAN PHYs can be found under the
Wi-SUN FAN 1.0
Profile orWi-SUN FAN 1.1
Profile.
PHYs are using the 802.15.4 frame format#
Using the PHYs described in the following section, the radio might not be fully 802.15.4 compatible and could fail on regulatory and/or protocol certification. The 802.15.4 frame format is a well-known and common specification. Using such a radio configuration might accelerate the product development cycle, and it makes available the 802.15.4 specific RAIL APIs.
If the PHY you want to use is supported by RAIL, Silicon Labs recommends using it from there, as these are validated and fine-tuned through config options that might not be available on the radio configurator.
If you select any PHY from the Connect
Profile and Long Range
Profile in the Radio Configurator, most of the payload-related customization becomes unavailable because these PHYs ensure 802.15.4 frame format compatibility, but overall, these PHYs are not fully compatible with the standard.
However, in cases where you need more customization options available in the Radio Configurator, you might have set up 802.15.4 frame format compatibility as it is discussed in the following section.
Build Custom PHYs in the Radio Configurator#
In cases where you need full control over the PHY customization, you need to set it up directly in the Radio Configurator.
To set up the base of the config, follow these steps:
Disable all
Advanced
options.Set up modulation and frequencies as per the requirements of the standard.
Configure channel spacing and channel numbering according to the standard.
Preamble and Sync word (SFD) depends on the PHY format; set it up accordingly.
Use LSB first everywhere unless stated otherwise. (*)
(*) SUN-FSK is an exception, which defines the length field MSB first. The length can be handled by the hardware, but you must keep in mind that you have to reverse the endianness of these bytes for both RX and TX in the application. Use the following code to set and get the length of the packet:
// length helper functions for Wi-SUN 15.4 frame formats
void setLength(uint8_t *payload, uint16_t length){
payload[1] = __RBIT(length & 0xFF) >> 24;
payload[0] = __RBIT(length >> 8) >> 24;
}
uint16_t getLength(uint8_t *payload){
uint16_t length = __RBIT(payload[1]) >> 24;
length |= (__RBIT(payload[0]) >> 16) & 0x0700;
return length;
}
Variable length setup for 1Byte PHR with 7bit length#
On 2.4 GHz O-QPSK, this is covered by the embedded config. Otherwise:
Check
Header Enable
Set
Header Size
to1
Set
Frame Length Encoding
toVARIABLE_LENGTH
Set
Frame Bit Endian
toLSB_FIRST
Check
Length Includes CRC Bytes
Set
Minimum Length
to0
Set
Maximum Length
to127
Set
Variable Length Bit Size
to7
Set
Variable Frame Length Adjust
to0
Set
Variable Length Bit Endian
toLSB_FIRST
Set
Variable Length Bit Location
to0
Variable length setup for 2Byte PHR and 11bit length (SUN FSK)#
Check
Header Enable
Set
Header Size
to2
Set
Frame Length Encoding
toVARIABLE_LENGTH
Set
Frame Bit Endian
toLSB_FIRST
Check
Length Includes CRC Bytes
Set
Minimum Length
to0
Set
Maximum Length
to2048
Set
Variable Length Bit Size
to11
Set
Variable Frame Length Adjust
to0
Set
Variable Length Bit Endian
toMSB_FIRST
Set
Variable Length Byte Endian
toMSB_FIRST
Set
Variable Length Bit Location
to0
Note: The default RX FIFO size is 512B. You might want to increase that through
RAIL_SetRxFifo()
or use FIFO mode to download the packet in chunks.
CRC configuration#
2B (CCIT-16)#
Set
CRC Input Bit Endian
toLSB_FIRST
Uncheck
CRC Input Padding
Set C
RC Polynomial
toCCITT_16
Set
CRC Seed
to00
Set
CRC Output Bit Endian
toMSB_FIRST
Set
CRC Byte Endian
toMSB_FIRST
Uncheck
CRC Invert
Uncheck
CRC Header
4B (ANSI X3.66-1979)#
Set
CRC Input Bit Endian
toLSB_FIRST
Check
CRC Input Padding
Set
CRC Polynomial
toANSIX366_1979
Set
CRC Seed
to0xFFFFFFFF
Set
CRC Output Bit Endian
toMSB_FIRST
Set
CRC Byte Endian
toMSB_FIRST
Check
CRC Invert
Uncheck
CRC Header
Whitening (2B PHR only)#
Set
Whitening Output Bit
to0
Set
Whitening Seed
to0x01F0
Set
Whitening Polynomial
toPN9
Uncheck
Whiten Header
Best Practices for Configuring the PHY#
If the selected PHY is available via RAIL API calls, use that (except SUN and Wi-SUN PHYs).
If the selected PHY is available via the Radio Configurator, use that.
If the selected PHY isn’t created yet, you can configure it on your own on the Radio Configurator GUI. Note that in this case, the protocol configurator might not meet the specification.