TX and RX Activity Indicator Pins


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 app.c into your project.

  3. Copy em_prs.c from platform/emlib/src in your SDK to the same folder in your project

  4. The application calls a single function to enable these RX/TX activity pins.

  5. After the call to gecko_init(), configure the TX and RX indicators to the desired pins (allowed range: port F, any pin). The example below outputs RX activity on PORTF6 and TX activity on PORTF7.

  6. Build your project and flash it to your device.


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 be able to observe the TX/RX activity going on during the connection.