TX and RX Activity Indicator Pins

Description

This code example shows how to configure the TX and RX activity indicators when using Bluetooth SDK to follow/debug the timing of radio tasks.

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

TX/RX Activity Shown on Logic Analyzer

The image 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 a short period of time so that possible connection or scan requests can be detected.

Setting up

  1. Create a new SoC-Empty project for your device.

  2. Copy the attached obssel.c and obssel.h files into your project.

  3. Open obssel.h and define one of the following symbols based on your device: EFR32xG1, EFR32xG12, EFR32xG13 (series 2 devices are not supported by this code example yet)

  4. Include obssel.h in app.c.

    #include "obssel.h"
  5. After the call to gecko_init(), configure the TX and RX indicators to the desired pins (allowed range : port C, pins 6..11).

    obssel_rx_setup(6);  // map RX activity to PC6
    obssel_tx_setup(7);  // map TX activity to PC7
  6. Build your project and flash it to your device.

Usage

SoC-empty example starts advertising by default. Therefore, if you connect a logic analyzer to the selected pins, you should observe the same activity as on the figure in the Description section. If you connect to your device via Bluetooth (e.g., with a smartphone), you will be also observe the TX/RX activity going on during the connection.

Source