Introduction

 

This article shows how to configure the TX and RX activity indicators when using Bluetooth SDK 2.4.0 or later. 

 

The TX and RX activity signals can be used to monitor the radio activity. Following screen capture from logic analyzer shows an example where Channel 0 is showing the RX activity and Channel 1 is showing TX activity.

 

SALEAE-crop.png

 

The picture above shows one advertising event. The advertisement is transmitted on all three channels (three pulses in the TX indicator). After sending packet on one channel the receiver is active for short period of time so that possible connection or scan requests can be detected.

 

TX/RX indicators in BLE SDK 2.3.x and earlier

 

In SDK versions 2.3.x and earlier, there has been two alternative ways to configure the RX/TX indicator pins:

 

BGScript applications: using the <obssel> tag in hardware.xml file

 

  <!-- Enable TX and RX indication pins -->
  <obssel rx_obs_pin="6" tx_obs_pin="7" />

 

C applications: using the radio_obs field in the gecko_configuration_t struct:

 

//   gecko_configuration_t settings:
  .radio_obs.rx_pin=6,
  .radio_obs.tx_pin=7,
  .radio_obs.flags=0x1,

 

 

Both of these options are removed starting from BLE SDK 2.4.0. (BGScript support in general is removed starting from this version).

 

TX/RX indicators in BLE SDK 2.4.0 and later

 

In projects built with SDK 2.4.0 or later, the RX/TX activity pins can still be configured in the user application. The files attached to the end of this article include functions to configure the TX and RX pins separately. 

 

Example usage: you can use for example the SoC Empty template as starting point. Add the files obssel.h, obssel.c to the project. After the call to gecko_init() configure the TX and RX indicators to the desired pins (allowed range : port C, pins 6..11)

 

 

// needs to be added in the beginning of file:
 #include "obssel.h"

....

  /* Initialize stack */
  gecko_init(&config);

  obssel_rx_setup(6);  // map RX activity to PC6
  obssel_tx_setup(7);  // map TX activity to PC7

 

 

The header obssel.h includes some defines that depend on the target hardware. Make sure that you configure the code to match your target hardware:

 

//From obssel.h:

/* uncomment one of the following defines, depending on your target device
 *
 * EFR32BG1:  this setting is valid for BGMxxx modules and EFR32BG1 SoC designs
 * EFR32BG1X: valid for EFR32BG12, EFR32BG13
 * */

#define EFR32BG1
// #define EFR32BG1X

 

 

 

 

  • Knowledge Base Articles
  • Bluetooth Low Energy
  • Bluetooth Classic