PTI Packet Trace#
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#
Enumerations#
A channel type enumeration.
The protocol that RAIL outputs via the Packet Trace Interface (PTI).
Functions#
Configure PTI pin locations, serial protocols, and baud rates.
Get the currently-active PTI configuration.
Enable Packet Trace Interface (PTI) output of packet data.
Set a protocol that RAIL outputs on PTI.
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. |
2412
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 | PTI output for Sidewalk protocol. |
2464
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.
[in] | railHandle | A RAIL instance handle, e.g., RAIL_EFR32_HANDLE. |
[in] | ptiConfig | A non-NULL pointer to the PTI configuration structure to use. |
Returns
Status code indicating success of the function call.
This method must be called before RAIL_EnablePti() is called. There is only one PTI configuration that can be active on a radio, regardless of the number of protocols (unless the application updates the configuration upon a protocol switch – RAIL does not save the configuration in a protocol RAIL instance).
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.
387
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.
[in] | railHandle | A RAIL instance handle, e.g., RAIL_EFR32_HANDLE. |
[out] | ptiConfig | A non-NULL pointer to the configuration structure to be filled in 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. This function always returns the active PTI configuration on the radio regardless of the active protocol.
403
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.
[in] | railHandle | A RAIL instance handle, e.g., RAIL_EFR32_HANDLE. |
[in] | enable | PTI is enabled if true; disabled if false. |
Returns
Status code indicating success of the function call.
Similarly to having only one PTI configuration per radio, 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 – RAIL does not save this state in a protocol RAIL instance).
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.
428
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.
[in] | railHandle | A RAIL instance handle. |
[in] | protocol | The enumeration representing which protocol the app 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.
448
of file common/rail.h
RAIL_GetPtiProtocol#
RAIL_PtiProtocol_t RAIL_GetPtiProtocol (RAIL_Handle_t railHandle)
Get the protocol that RAIL outputs on PTI.
[in] | railHandle | A RAIL instance handle. |
Returns
PTI protocol in use.
457
of file common/rail.h