Packet Trace (PTI)

Basic APIs to set up and interact with PTI settings.

Modules

EFR32
EFR32 PTI functionalityThese enumerations and structures are used with RAIL PTI API.

Enumerations

enum RAIL_PtiProtocol_t {
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
}
The protocol that RAIL outputs via the Packet Trace Interface (PTI).

Functions

RAIL_Status_t RAIL_ConfigPti ( RAIL_Handle_t railHandle, const RAIL_PtiConfig_t *ptiConfig)
Configure PTI pin locations, serial protocols, and baud rates.
RAIL_Status_t RAIL_GetPtiConfig ( RAIL_Handle_t railHandle, RAIL_PtiConfig_t *ptiConfig)
Get the currently active PTI configuration.
RAIL_Status_t RAIL_EnablePti ( RAIL_Handle_t railHandle, bool enable)
Enable Packet Trace Interface (PTI) output of packet data.
RAIL_Status_t RAIL_SetPtiProtocol ( RAIL_Handle_t railHandle, RAIL_PtiProtocol_t protocol)
Set a protocol that RAIL outputs on PTI.
RAIL_PtiProtocol_t RAIL_GetPtiProtocol ( RAIL_Handle_t railHandle)
Get the protocol that RAIL outputs on PTI.

Detailed Description

Basic APIs to set up and interact with PTI settings.

Enumeration Type Documentation

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.

Definition at line 1891 of file 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 .

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 .

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 .

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.

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.