esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
Loading...
Searching...
No Matches
Triggered snapshots

The full 80 MS/s kept from before a burst, ESP32-C6 (esp_sdr_trig.h, CONFIG_ESP_SDR_TRIG). More...

Data Structures

struct  esp_sdr_trig_cfg
struct  esp_sdr_trig_snap

Macros

#define ESP_SDR_TRIG_RING   16384U
#define ESP_SDR_TRIG_RATE_HZ   80000000U
#define ESP_SDR_TRIG_WINDOW_US   10U
#define ESP_SDR_TRIG_WINDOWS   3U

Functions

int esp_sdr_trig_wait (const struct esp_sdr_trig_cfg *cfg, struct esp_sdr_trig_snap *snap)
 Run the ring until a burst, then freeze it.
void esp_sdr_trig_reset (void)
 Forget the baseline (after a change of frequency or gain).
void esp_sdr_trig_pack_iq8 (const struct esp_sdr_trig_snap *snap, uint32_t from, uint32_t n, int8_t *out)
 Pack n samples of a snapshot, from the from-th oldest, to int8 I, Q pairs (the top 8 of each 10-bit value) at out, 2-byte aligned.

Detailed Description

The full 80 MS/s kept from before a burst, ESP32-C6 (esp_sdr_trig.h, CONFIG_ESP_SDR_TRIG).

Guide: Burst capture.

Macro Definition Documentation

◆ ESP_SDR_TRIG_RATE_HZ

#define ESP_SDR_TRIG_RATE_HZ   80000000U

Sample rate of a snapshot.

◆ ESP_SDR_TRIG_RING

#define ESP_SDR_TRIG_RING   16384U

Samples in the ring: 205 us at 80 MS/s.

◆ ESP_SDR_TRIG_WINDOW_US

#define ESP_SDR_TRIG_WINDOW_US   10U

Power window: one estimator reading each.

◆ ESP_SDR_TRIG_WINDOWS

#define ESP_SDR_TRIG_WINDOWS   3U

Windows in a row over the threshold that make a trigger: bursts of 20 to 30 us and longer. Once the Wi-Fi driver is in some state the C6's receiver shows a glitch of 1.75 us every 139 ms, 30 dB over the noise at any frequency; it touches two windows at most.

Function Documentation

◆ esp_sdr_trig_wait()

int esp_sdr_trig_wait ( const struct esp_sdr_trig_cfg * cfg,
struct esp_sdr_trig_snap * snap )

Run the ring until a burst, then freeze it.

Takes the radio meanwhile, with interrupts locked between the stop() polls (every ESP_SDR_TRIG_WINDOW_US). A trigger needs a quiet window first (a rising edge) and a ring full of samples taken since the call.

Returns
0 with snap filled, -EINTR when stop() said so, -EINVAL for a bad cfg, -EAGAIN before esp_sdr_init().