Packet Trace (PTI)#

Basic APIs to set up and interact with PTI settings.

These enumerations and structures are used with RAIL PTI API.

EFR32 supports SPI and UART PTI and is configurable in terms of baud rates and PTI pin locations.

Modules#

RAIL_PtiConfig_t

Enumerations#

enum
RAIL_PTI_MODE_DISABLED
RAIL_PTI_MODE_SPI
RAIL_PTI_MODE_UART
RAIL_PTI_MODE_UART_ONEWIRE
}

A channel type enumeration.

enum
RAIL_PTI_PROTOCOL_CUSTOM = 0
RAIL_PTI_PROTOCOL_THREAD = 2
RAIL_PTI_PROTOCOL_BLE = 3
RAIL_PTI_PROTOCOL_CONNECT = 4
RAIL_PTI_PROTOCOL_ZIGBEE = 5
RAIL_PTI_PROTOCOL_ZWAVE = 6
RAIL_PTI_PROTOCOL_WISUN = 7
RAIL_PTI_PROTOCOL_802154 = 8
RAIL_PTI_PROTOCOL_SIDEWALK = 9
}

The protocol that RAIL outputs via the Packet Trace Interface (PTI).

Functions#

RAIL_ConfigPti(RAIL_Handle_t railHandle, const RAIL_PtiConfig_t *ptiConfig)

Configure PTI pin locations, serial protocols, and baud rates.

RAIL_GetPtiConfig(RAIL_Handle_t railHandle, RAIL_PtiConfig_t *ptiConfig)

Get the currently-active PTI configuration.

RAIL_EnablePti(RAIL_Handle_t railHandle, bool enable)

Enable Packet Trace Interface (PTI) output of packet data.

RAIL_SetPtiProtocol(RAIL_Handle_t railHandle, RAIL_PtiProtocol_t protocol)

Set a protocol that RAIL outputs on PTI.

RAIL_GetPtiProtocol(RAIL_Handle_t railHandle)

Get the protocol that RAIL outputs on PTI.

Enumeration Documentation#

RAIL_PtiMode_t#

RAIL_PtiMode_t

A channel type enumeration.

Enumerator
RAIL_PTI_MODE_DISABLED

Turn PTI off entirely.

RAIL_PTI_MODE_SPI

8-bit SPI mode.

RAIL_PTI_MODE_UART

8-bit UART mode.

RAIL_PTI_MODE_UART_ONEWIRE

9-bit UART mode.


Definition at line 2371 of file common/rail_types.h

RAIL_PtiProtocol_t#

RAIL_PtiProtocol_t

The protocol that RAIL outputs via the Packet Trace Interface (PTI).

Enumerator
RAIL_PTI_PROTOCOL_CUSTOM

PTI output for a custom protocol.

RAIL_PTI_PROTOCOL_THREAD

PTI output for the Thread protocol.

RAIL_PTI_PROTOCOL_BLE

PTI output for the Bluetooth Smart protocol.

RAIL_PTI_PROTOCOL_CONNECT

PTI output for the Connect protocol.

RAIL_PTI_PROTOCOL_ZIGBEE

PTI output for the Zigbee protocol.

RAIL_PTI_PROTOCOL_ZWAVE

PTI output for the Z-Wave protocol.

RAIL_PTI_PROTOCOL_WISUN

PTI output for the Wi-SUN protocol.

RAIL_PTI_PROTOCOL_802154

PTI output for a custom protocol using a built-in 802.15.4 radio config.

RAIL_PTI_PROTOCOL_SIDEWALK

Definition at line 2426 of file common/rail_types.h

Function Documentation#

RAIL_ConfigPti#

RAIL_Status_t RAIL_ConfigPti (RAIL_Handle_t railHandle, const RAIL_PtiConfig_t * ptiConfig)

Configure PTI pin locations, serial protocols, and baud rates.

Parameters
[in]railHandle

A RAIL instance handle (currently not used).

[in]ptiConfig

A configuration structure applied to the relevant PTI registers. A NULL ptiConfig will produce undefined behavior.

Returns

  • Status code indicating success of the function call.

This method must be called before RAIL_EnablePti() is called. Although a RAIL handle is included for potential future expansion of this function, it is currently not used. That is, there is only one PTI configuration that can be active on a chip, regardless of the number of protocols (unless the application updates the configuration upon a protocol switch), and the configuration is not saved in the RAIL instance. For optimal future compatibility, pass in a chip-specific handle, such as RAIL_EFR32_HANDLE.

PTI should be configured only when the radio is off (idle).

Note

  • On EFR32 platforms GPIO configuration must be unlocked (see GPIO->LOCK register) to configure or use PTI.


Definition at line 389 of file common/rail.h

RAIL_GetPtiConfig#

RAIL_Status_t RAIL_GetPtiConfig (RAIL_Handle_t railHandle, RAIL_PtiConfig_t * ptiConfig)

Get the currently-active PTI configuration.

Parameters
[in]railHandle

A RAIL instance handle (currently not used).

[out]ptiConfig

A configuration structure filled with the active PTI configuration.

Returns

  • RAIL status indicating success of the function call.

Although most combinations of configurations can be set, it is safest to call this method after configuration to confirm which values were actually set. As in RAIL_ConfigPti, railHandle is not used. This function always returns the single active PTI configuration regardless of the active protocol. For optimal future compatibility, pass in a chip-specific handle, such as RAIL_EFR32_HANDLE.


Definition at line 407 of file common/rail.h

RAIL_EnablePti#

RAIL_Status_t RAIL_EnablePti (RAIL_Handle_t railHandle, bool enable)

Enable Packet Trace Interface (PTI) output of packet data.

Parameters
[in]railHandle

A RAIL instance handle (currently not used).

[in]enable

PTI is enabled if true; disable if false.

Returns

  • RAIL status indicating success of the function call.

Similarly to having only one PTI configuration per chip, PTI can only be enabled or disabled for all protocols. It cannot be individually set to enabled and disabled per protocol (unless the application switches it when the protocol switches), and enable/disable is not saved as part of the RAIL instance. For optimal future compatibility, pass in a chip-specific handle, such as RAIL_EFR32_HANDLE.

PTI should be enabled or disabled only when the radio is off (idle).

Warnings

  • On EFR32 platforms GPIO configuration must be unlocked (see GPIO->LOCK register) to configure or use PTI, otherwise a fault or assert might occur. If GPIO configuration locking is desired, PTI must be disabled beforehand either with this function or with RAIL_ConfigPti() using RAIL_PTI_MODE_DISABLED.


Definition at line 434 of file common/rail.h

RAIL_SetPtiProtocol#

RAIL_Status_t RAIL_SetPtiProtocol (RAIL_Handle_t railHandle, RAIL_PtiProtocol_t protocol)

Set a protocol that RAIL outputs on PTI.

Parameters
[in]railHandle

A RAIL instance handle.

[in]protocol

The enumeration representing which protocol the node is using.

Returns

  • Status code indicating success of the function call.

The protocol is output via PTI for each packet. Before any protocol is set, the default value is RAIL_PTI_PROTOCOL_CUSTOM. Use one of the enumeration values so that the Network Analyzer can decode the packet.

Note

  • This function cannot be called unless the radio is currently in the RAIL_RF_STATE_IDLE or RAIL_RF_STATE_INACTIVE states. For this reason, call this function early on before starting radio operations and not changed later.


Definition at line 454 of file common/rail.h

RAIL_GetPtiProtocol#

RAIL_PtiProtocol_t RAIL_GetPtiProtocol (RAIL_Handle_t railHandle)

Get the protocol that RAIL outputs on PTI.

Parameters
[in]railHandle

A RAIL instance handle.

Returns

  • PTI protocol in use.


Definition at line 463 of file common/rail.h