Silicon Labs AN1128 Instruction Manual

AN1128: Blue tooth® Coexistence with Wi-Fi®
This application note describes EFR32 Bluetooth coexistence support for Silicon Labs Bluetooth SDK version 3.0.1.0 and Bluetooth Mesh SDK version 1.7.2.0. See 5 Doc-
ument Revision History for a summary of key changes in previous revisions of this
application note.
Additional details about the implementation of managed coexistence are included in AN1243: Timing and Test Data for EFR32 Coexistence with Wi-Fi, available under non-disclosure from Silicon Labs Sales.
KEY POINTS
Configure PTA support for Bluetooth.
Use application code existence exten-
sions.
Order the Coexistence Backplane Eval­uation Board.
silabs.com | Building a more connected world. Rev. 1.7
AN1128: Bluetooth® Coexistence with Wi-Fi®
Contents

Contents

1. Introduction ................................................................................................................................................ 2
2. PTA Support Software Setup .................................................................................................................... 3
2.1. Compile Time PTA Setup and Defaults ..................................................................................... 3
2.2. Run-Time PTA Re-configuration .............................................................................................. 11
2.3. Run-Time PTA Debug Counters .............................................................................................. 12
2.4. Coexistence Configuration Setup Examples for Different Wi-Fi/PTA Applications ................... 13
3. Application Code Coexistence Extensions ............................................................................................ 18
3.1. Example TX_ACTIVE/RX_ACTIVE ......................................................................................... 18
4. Coexistence Backplane Evaluation Board (EVB) .................................................................................. 19
5. Document Revision History .................................................................................................................... 20
silabs.com | Building a more connected world. Rev. 1.7 | 1
AN1128: Bluetooth® Coexistence with Wi-Fi®
Introduction

1. Introduction

This application note includes the following sections:
2 PTA Support Software Setup describes how to configure the Silicon Labs Packet Traffic Arbitration (PTA) for Bluetooth.
3 Application Code Coexistence Extensions describes how to use the application code existence extensions.
4 Coexistence Backplane Evaluation Board (EVB) explains how to order the EVB for evaluating the Silicon Labs EFR32 software
coexistence solution.
Notes:
1. Not all coexistence support features are present in SDK versions earlier than Bluetooth 3.0.1.0 and Bluetooth Mesh 1.7.2.0. Users of Bluetooth SDK 2.13.7 or earlier and Bluetooth Mesh SDK 1.7.1 or earlier may see different features from those documented in this application note.
2. Throughput this application note “Bluetooth Low Energy” is referenced as “Bluetooth”.
3. This application note addresses Bluetooth coexistence applications using EFR32 devices as per Bluetooth Core Specification v5.0 Vol 6 “Low Energy Controller” (point-to-point) and as per Bluetooth Specification Mesh Profile v1.0 (mesh network). These two ap­plications have different coexistence considerations and, where necessary, this application note differentiates using the following terms:
“Bluetooth device” to reference Bluetooth Core Specification v5.0 Vol 6 “Low Energy Controller” (point-to-point) operation
“Bluetooth mesh device” or “Bluetooth mesh node” to reference Bluetooth Specification Mesh Profile v1.0 (mesh network) oper-
ation
silabs.com | Building a more connected world. Rev. 1.7 | 2
AN1128: Bluetooth® Coexistence with Wi-Fi®
PTA Support Software Setup

2. PTA Support Software Setup

Note: GPIO interrupt numbers are based on the GPIO pin numbers and not the port. This can cause conflicts if the same pin is selected
for different ports—for example, PD15 will conflict with PB15. Silicon Labs recommends avoiding these conflicts. If the conflict exists in hardware, manual macros can be added with the assistance of Silicon Labs Support.

2.1. Compile Time PTA Setup and Defaults

To enable PTA coexistence support, the following steps are required.
1. Create Bluetooth or Bluetooth Mesh project in Simplicity Studio.
2. Add the PRS component to your project. Double-click the slcp file of your project to open the Project Configurator, and go to the SOFTWARE COMPONENTS tab. Search for PRS, select it, and click Install.
3. Add the RAIL Utility, Co-existence component to your project. Search for COEX, select RAIL Utility. Co-existence, and click In-
stall.
silabs.com | Building a more connected world. Rev. 1.7 | 3
AN1128: Bluetooth® Coexistence with Wi-Fi®
PTA Support Software Setup
The coexistence directory under gecko_sdk_3.x/platform/radio/rail_lib/plugin gets populated with the coexistence sources:
4. Edit project includes to include additional paths to files added to project:
1. Right-click the project and select Properties.
2. Expand C/C++ General and select Paths and Symbols.
3. Select the Includes tab.
4. In languages, select the desired C compiler (for example, GNU C).
5. Press add, check Is a workspace path, and enter each of the following paths:
/${ProjName}/platform/radio/rail_lib/plugin
/${ProjName}/platform/radio/rail_lib/plugin/coexistence/hal/efr32
/${ProjName}/platform/radio/rail_lib/plugin/coexistence/protocol/ble
For example:
6. Click OK and Yes to rebuild index now
5. Add the following #defines to coexistence-hal-config.h:
silabs.com | Building a more connected world. Rev. 1.7 | 4
AN1128: Bluetooth® Coexistence with Wi-Fi®
PTA Support Software Setup
#define HAL_COEX_OVERRIDE_GPIO_INPUT (1) #define HAL_COEX_ENABLE (1) #define HAL_COEX_DP_TIMER (HAL_TIMER_TIMER1) #define HAL_COEX_PWM_PRIORITY (0) #define HAL_COEX_RETRYRX_ENABLE (0) #define HAL_COEX_MAC_FAIL_THRESHOLD (0U) #define HAL_COEX_REQ_WINDOW (500U) #define HAL_COEX_PWM_DEFAULT_ENABLED (0) #define HAL_COEX_TX_ABORT (0) #define BSP_COEX_RHO_ASSERT_LEVEL (1) #define HAL_COEX_REQ_SHARED (0) #define HAL_COEX_DP_PULSE_WIDTH_US (20U) #define BSP_COEX_PRI_ASSERT_LEVEL (1) #define HAL_COEX_TX_HIPRI (1) #define BSP_COEX_REQ_ASSERT_LEVEL (1) #define HAL_COEX_RX_HIPRI (1) #define BSP_COEX_GNT_ASSERT_LEVEL (1) #define HAL_COEX_CCA_THRESHOLD (4U) #define HAL_COEX_PWM_REQ_DUTYCYCLE (20U) #define HAL_COEX_RETRYRX_HIPRI (1) #define HAL_COEX_RETRYRX_TIMEOUT (16U) #define HAL_COEX_REQ_BACKOFF (15U) #define HAL_COEX_PRI_SHARED (0) #define HAL_COEX_DP_ENABLED (1) #define HAL_COEX_PRIORITY_ESCALATION_ENABLE (1) #define HAL_COEX_ACKHOLDOFF (1) #define HAL_COEX_PWM_REQ_PERIOD (78U) #define HAL_COEX_PHY_ENABLED (0) #define BSP_COEX_PWM_REQ_ASSERT_LEVEL (1) #define HAL_COEX_RUNTIME_PHY_SELECT (1)
#define BSP_COEX_RX_ACTIVE_PIN (14U) #define BSP_COEX_RX_ACTIVE_PORT (gpioPortD) #define BSP_COEX_RX_ACTIVE_ASSERT_LEVEL (1) #define BSP_COEX_RX_ACTIVE_CHANNEL (5) #define BSP_COEX_RX_ACTIVE_LOC (4)
#define BSP_COEX_PHY_SELECT_PIN (14U) #define BSP_COEX_PHY_SELECT_PORT (gpioPortC) #define BSP_COEX_PHY_SELECT_ASSERT_LEVEL (1) #define HAL_COEX_DEFAULT_PHY_SELECT_TIMEOUT (10U)
#ifdef _SILICON_LABS_32B_SERIES_1 #define BSP_COEX_GNT_PIN (9U) #define BSP_COEX_GNT_PORT (gpioPortC)
#define BSP_COEX_PRI_PIN (13U) #define BSP_COEX_PRI_PORT (gpioPortD)
#define BSP_COEX_DP_PIN (12U) #define BSP_COEX_DP_PORT (gpioPortD) #define BSP_COEX_DP_LOC (11U)
#define BSP_COEX_REQ_PIN (10U) #define BSP_COEX_REQ_PORT (gpioPortC)
#define BSP_COEX_DP_REQUEST_INV_CHANNEL (4) #define BSP_COEX_DP_CHANNEL (3) #define BSP_COEX_DP_CC0_PIN (10U) #define BSP_COEX_DP_CC0_PORT (gpioPortC) #define BSP_COEX_DP_CC0_LOC (15U) #else //!_SILICON_LABS_32B_SERIES_1 #define BSP_COEX_GNT_PIN (3U) #define BSP_COEX_GNT_PORT (gpioPortC)
silabs.com | Building a more connected world. Rev. 1.7 | 5
AN1128: Bluetooth® Coexistence with Wi-Fi®
PTA Support Software Setup
#define BSP_COEX_PRI_PIN (8U) #define BSP_COEX_PRI_PORT (gpioPortD)
#define BSP_COEX_REQ_PIN (10U) #define BSP_COEX_REQ_PORT (gpioPortC)
#define BSP_COEX_DP_PIN (11U) #define BSP_COEX_DP_PORT (gpioPortD)
#define BSP_COEX_DP_CHANNEL (3)
6. Enable and edit new #defines to enable/configure PTA coexistence.
Enable the PTA feature.
The following #define is required:
#define HAL_COEX_ENABLE (1)
REQUEST pin settings: Enable/disable, polarity, port, and pin
The following #defines example enables active-high REQUEST on PC10:
#define BSP_COEX_REQ_PIN (10) #define BSP_COEX_REQ_PORT (gpioPortC) #define BSP_COEX_REQ_ASSERT_LEVEL (1)
Note: In 1-Wire PTA configurations based on GRANT-only, REQUEST is not implemented. If REQUEST is not needed, remove the BSP_COEX_REQ_PORT and BSP_COEX_REQ_PIN #defines from coexistence-hal-config.h.
REQUEST Window
REQUEST Window adjusts the lead time for REQUEST assertion before first Bluetooth TX or RX operation after REQUEST asserted. A TX operation will proceed if GRANT is asserted at the end of the REQUEST Window. An RX operation will attempt to proceed regardless of GRANT asserted or deasserted as Bluetooth RX does not impact other co-located radios. This feature’s setting needs to at least exceed the maximum time for Wi-Fi/PTA to provide GRANT asserted or deasserted after REQUEST asserted.
The following #define example sets the REQUEST Window to 500µs:
#define HAL_COEX_REQ_WINDOW (500)
REQUEST signal is shared.
The following #define example disables Shared REQUEST for single-EFR operation.:
#define HAL_COEX_REQ_SHARED (0)
The following #define example enables Shared REQUEST.
#define HAL_COEX_REQ_SHARED (1)
REQUEST signal max backoff mask
REQUEST signal max backoff determines the random REQUEST delay mask (only valid if REQUEST signal is shared). The random delay (in µs) is computed by masking the internal random variable against the entered mask. The mask should be set to a value of 2n-1 to ensure a continuous random delay range.
The following #define sets backoff to recommended value:
#define HAL_COEX_REQ_BACKOFF (15)
GRANT pin settings: Enable/disable, polarity, port, and pin
The following #defines example enables active-low GRANT on PC3:
#define BSP_COEX_GNT_PIN (3)
silabs.com | Building a more connected world. Rev. 1.7 | 6
Loading...
+ 16 hidden pages