Proprietary Knowledge Base

    Publish
     
      • IEEE 802.15.4 and RAIL/Flex SDK

        andrasbiro | 02/55/2017 | 05:08 AM

        Preface

         

        802.15.4 PHY support by the hardware

         

        • All bands are supported, except 1427, 2380, 770, 4965 and 5800MHz
        • OQPSK (not SUN O-QPSK or MR-OQPSK) and FSK/GFSK modulations are supported
        • MSK modulation will be supported soon

         

        The protocol specific API

         

        The RAIL library includes protocol specific API for 15.4. It's strongly recommend to use at least version 1.4.x, which is supplied with Flex SDK 1.0.x.

         

        Setting up the PHY

         

        Frequency and modulation

         

        2.4GHz OQPSK PHY

        This protocol specific API includes PHY configuration for the 802.15.4 2.4GHz OQPSK PHY (not to be confused with the SUN O-QPSK PHY), which also sets up the variable length settings for the 1Byte (7 bit length) PHR. To use it, call  RAIL_IEEE802154_2p4GHzRadioConfig instead of loading the configuration generated by AppBuilder.


        Setting up all other PHY

        • Set up modulation and frequencies as per the requirements of the standard
        • You'll probably need to modify the channel map by hand in rail_config.c See the API doc of  RAIL_ChannelConfigEntry_t and  RAIL_ChannelConfig.

        Frame format

         

        Preamble and Sync word (SFD) depends on the PHY format, set it up accordingly.

         

        Endianness

        Use LSB first unless stated otherwise.

        SUN-FSK defines the length field MSB first. The length can be handled by the hardware, but you have to keep in mind that you have to reverse the endianness of these bytes for both RX and TX in application. I've used the following code to set and get the length of the packet:

         

        //length helper functions for WiSUN 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.4GHz OQPSK, this is covered by the embedded config. Otherwise:

         2017-02-23_16h08_13.png

        Variable length setup for 2Byte PHR and 11 bit length (SUN FSK)

        2017-02-23_16h33_51.png

        Note: With Flex 1.0.x, frames are supported with the maximum of 238B length (240B total with PHR). The next release will support longer frames

         

        CRC

        CCIT-16 (16 bit ITU-T CRC)

        2017-02-23_16h05_21.png

        32 bit ANSI X3.66-1979

        The same as before, but polynomial is ANSIX366_1979


        Using MAC acceleration


        The hardware does support address filtering and Auto-ACK, which can be turned on in RAIL only for the 1Byte PHR PHY. To enable it, use the RAIL_IEEE802154_Init API call, and the address related calls.

         

        AutoACK and Address filtering module

        It might seem reasonable to use the AutoAck and address filtering module with 2B PHR. Unfortunately, this is not possible:

        • The address locations are not fixed in the header
        • The AutoAck module will Ack all packages, even the filtered ones