Packet Trace (PTI)

Basic APIs to set up and interact with PTI settings.

Modules

EFR32
EFR32 PTI functionalityThese enums 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
}
 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)
 Configures PTI pin locations, serial protocols, and baud rates.
 
RAIL_Status_t RAIL_GetPtiConfig (RAIL_Handle_t railHandle, RAIL_PtiConfig_t *ptiConfig)
 Gets the currently active PTI configuration.
 
RAIL_Status_t RAIL_EnablePti (RAIL_Handle_t railHandle, bool enable)
 Enables the PTI output of the packet data.
 
RAIL_Status_t RAIL_SetPtiProtocol (RAIL_Handle_t railHandle, RAIL_PtiProtocol_t protocol)
 Sets a 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.

Definition at line 1111 of file rail_types.h.

Function Documentation

◆ RAIL_ConfigPti()

RAIL_Status_t RAIL_ConfigPti ( RAIL_Handle_t  railHandle,
const RAIL_PtiConfig_t ptiConfig 
)

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

Parameters
[in]railHandleA RAIL instance handle (currently not used).
[in]ptiConfigA configuration structure applied to the relevant PTI registers.
Returns
Status code indicating success of the function call.

This method must be called before RAIL_EnablePti() is called. Although we do take a RAIL handle 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 takes responsibility to update the configuration upon a protocol switch), and the configuration is not saved in your RAIL instance. For optimal future compatibility, pass in a chip specific handle, such as RAIL_EFR32_HANDLE for now.

◆ RAIL_EnablePti()

RAIL_Status_t RAIL_EnablePti ( RAIL_Handle_t  railHandle,
bool  enable 
)

Enables the PTI output of the packet data.

Parameters
[in]railHandleA RAIL instance handle (currently not used).
[in]enablePTI is enabled if true; disable if false.
Returns
RAIL status indicating success of the function call.

Similarly to how there is 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 takes the responsibility of switching it when the protocol switches), and enable/disable is not saved as part of your RAIL instance. For optimal future compatibility, pass in a chip specific handle, such as RAIL_EFR32_HANDLE for now.

◆ RAIL_GetPtiConfig()

RAIL_Status_t RAIL_GetPtiConfig ( RAIL_Handle_t  railHandle,
RAIL_PtiConfig_t ptiConfig 
)

Gets the currently active PTI configuration.

Parameters
[in]railHandleA RAIL instance handle (currently not used).
[out]ptiConfigA 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 will always return 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 for now.

◆ RAIL_SetPtiProtocol()

RAIL_Status_t RAIL_SetPtiProtocol ( RAIL_Handle_t  railHandle,
RAIL_PtiProtocol_t  protocol 
)

Sets a protocol that RAIL outputs on PTI.

Parameters
[in]railHandleA RAIL instance handle.
[in]protocolThe enum representing which protocol the node is using.
Returns
Status code indicating success of the function call.

The protocol is output via the Packet Trace Interface (PTI) for each packet. Before any protocol is set, the default value is RAIL_PTI_PROTOCOL_CUSTOM. One of the enum values should be used so that the Network Analyzer can decode the packet.