Jump to main content

# 1.1.3.3 Configuring the Library

## RF215 Driver Configuration

RF215 Driver library is configured through MCC. Below is the figure of the MCC configuration window for RF215 driver and brief description.

Figure 1-35.RF215 Driver Configuration Options

- RF Device Used:
  - Selects the AT86RF215 part number used.
  - RF215 and RF215M are supported. RF215Q is not supported.
  - RF215M only supports the Sub-GHz transceiver.
- Number of clients:
  - Specifies the maximum number of clients for the RF215 driver
  - If dual-band is used, each client can only use a single transceiver
- Number of TX Buffers:
  - Specifies the number of transmission buffers (shared for all clients)
  - If dual-band is used, the number of buffers are shared for both transceivers
  - It can be modified only if `PHY TX/RX time support` is enabled (otherwise only instantaneous transmission enabled)
- Automatic FCS (Frame Check Sequence):
  - If enabled:
    - In transmission, the FCS is automatically appended to the PSDU
    - In reception, the FCS is automatically checked and result reported in RX indication
  - 802.15.4 32-bit and 16-bit FCS are supported
- Maximum PSDU data length:
  - Specifies the maximum PSDU length for transmission and reception
  - If `Automatic FCS` is enabled, the PSDU length includes the FCS length
- PHY TX/RX time support:
  - If enabled:
    - It is possible to schedule transmissions for a specific time instant
    - The reception time is reported in RX indication
  - CCA Contention Window support:
    - If enabled, 802.15.4 CCA (Clear Channel Assessment) Contention Window is supported
    - Multiple CCA before transmission to detect the channel as clear
  - Frequency hopping support:
    - If enabled, frequency channel is a TX parameter and there is a function to schedule frequency channel switch for a specified time
  - Max. TX time delay error (us):
    - Specifies the maximum TX time delay error allowed, in microseconds
    - If it is not possible to comply with this requirement, the RF215 driver will report timeout error
- PLIB Used:
  - Indicates the SPI peripheral instance used by the RF215 driver
  - The name of the peripheral will vary depending on used MCU
- DMA Channel For Transmit (Only visible if the MCU has DMA):
  - Indicates the DMA channel used by the RF215 driver for SPI transmission
- DMA Channel For Receive (Only visible if the MCU has DMA):
  - Indicates the DMA channel used by the RF215 driver for SPI reception
- SPI NPCS Used (Only visible if the connected peripheral supports multiple chip select lines):
  - SPI chip select line to be used by the RF215 driver
- External Interrupt Pin:
  - GPIO pin to be used as external interrupt interface (active high)
  - This pin indicates that the RF215 device has one or more pending events to be consulted
  - This pin must be configured as GPIO input in Pin Settings configuration. Set Pull Up and High Level Interrupt configuration:
    Figure 1-36.External Interrupt GPIO Pin Settings
- Reset Pin:
  - GPIO pin to be used as reset (active low)
  - This pin resets the RF215 device
  - This pin must be configured as GPIO output in Pin Settings configuration
- Use LED TX Pin:
  - If enabled, a GPIO pin is used to indicate RF transmissions
  - LED TX Pin:
    - GPIO pin to be used as LED to indicate RF transmissions (active high)
    - This pin must be configured as GPIO output in Pin Settings configuration
- Use LED RX Pin:
  - If enabled, a GPIO pin is used to indicate RF receptions
  - LED RX Pin:
    - GPIO pin to be used as LED to indicate RF receptions (active high)
    - This pin must be configured as GPIO output in Pin Settings configuration
- Use FSK PHY:
  - Enables/disables 802.15.4 SUN FSK PHY
- Use OFDM PHY:
  - Enables/disables 802.15.4 SUN OFDM PHY
- Use Sub-GHz Transceiver:
  - Enables/disables the Sub-GHz transceiver
  - Default PHY Frequency Band:
    - Selects the default frequency band, in MHz, for the Sub-GHz transceiver
  - Default PHY Type:
    - Selects the default PHY type (FSK/OFDM) for the Sub-GHz transceiver
  - Default FSK Operating Mode:
    - Selects the default 802.15.4 SUN FSK Operating mode for the Sub-GHz transceiver
    - The available Operating modes depend on the selected Default PHY Frequency Band
    - Only visible if Default PHY Type is FSK
  - Default OFDM Bandwidth Option:
    - Selects the default 802.15.4 SUN OFDM bandwidth option for the Sub-GHz transceiver
    - The available bandwidth options depend on the selected Default PHY Frequency Band
    - Only visible if Default PHY Type is OFDM
  - Default PHY Frequency Channel Number:
    - Selects the default frequency channel number for the Sub-GHz transceiver
    - The available channel numbers depend on the selected Default PHY Frequency Band and Default FSK Operating Mode / Default OFDM Bandwidth Option
- Use 2.4GHz Transceiver:
  - Enables/disables the 2.4GHz transceiver
  - It is not available if RF Device Used is RF215M
  - Similar Default mode options than for Sub-GHz transceiver
- Reduced Power Consumption:
  - Enables/Disables Power Saving Modes on RF215 transceiver (limit tx power, reduce listen time)
- RTOS Settings (Only available if FreeRTOS is used)
  - Stack Size (in bytes):
    - Specifies the number of bytes to be allocated on the stack for the driver task
  - Task Priority:
    - Specifies priority for the driver task thread. The value can vary based on RTOS used.
  Figure 1-37.RF215 Driver RTOS Config

## SPI Peripheral Configuration

For correct operation it is important that the SPI is properly configured in MCC. If the used peripheral supports multiple chip select lines, the corresponding NPCS has to be enabled and configured.

The AT86RF215 Data Sheet describes in 4.2.5 SPI Timing section the requirements of RF215 regarding SPI timing. As a summary these are the requirements:

- Maximum SPI clock frequency: 25 MHz
- Minimum time required between SPI chip select falling edge to SCLK rising edge: 50 ns
- Minimum time required between last SCLK cycle of previous byte to first SCLK cycle of next byte: 125 ns
- Minimum time required between first SCLK cycle of previous byte to first SCLK cycle of next byte: 875 ns

When SPI dependency of RF215 driver is connected to a peripheral with SPI capability, some SPI options are automatically configured. The optimal (highest) SPI baudrate is automatically computed, satisfying the requirements described above. There is not any requirement in terms of low SPI baudrate, the user can reduce it if needed. However, it is recommended to configure it as high as possible because the lower the SPI baudrate, the slower the response time.

The following figure shows an example of valid SPI configuration for a PIC32CXMT device:

Figure 1-38.SPI Configuration Options for RF215 Driver

## Time Service Configuration

If PHY TX/RX time support is enabled, it is important to configure the Time Service properly:

Figure 1-39.Time Service Configuration Options for RF215 Driver

- Number of clients:
  - The number of clients for the Time Service has to be allocated taking into account that one client is needed for each transmission buffer (Number of TX Buffers).
- Operating Mode:
  - For accurate transmission time, it is recommended to configure the Time Service in Tickless mode.

Rev: G