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

One I/Q capture per packet per channel of a uniform grid, from the ring on the other CPU, ESP32-S3 (esp_sdr_chancap.h, CONFIG_ESP_SDR_CHANCAP). More...

Data Structures

struct  esp_sdr_chancap
struct  esp_sdr_chancap_cfg
struct  esp_sdr_chancap_stats
struct  esp_sdr_chancap_plan
struct  esp_sdr_chancap_bench_result

Macros

#define ESP_SDR_CHANCAP_CHANNELS_MAX   16U
#define ESP_SDR_CHANCAP_FULL_SCALE   ESP_SDR_RING_RAW_FULL_SCALE

Typedefs

typedef void(* esp_sdr_chancap_cb_t) (void *user, const struct esp_sdr_chancap *cap)

Functions

int esp_sdr_chancap_start (const struct esp_sdr_chancap_cfg *cfg)
 Tune to the grid and start capturing.
int esp_sdr_chancap_set_gates (bool wideband, bool per_channel)
 Switch the gates; takes effect at the next hand-over block.
int esp_sdr_chancap_set_thresholds (int16_t wb_db, int16_t ch_db)
 Change the thresholds; takes effect at the next hand-over block.
void esp_sdr_chancap_release (const struct esp_sdr_chancap *cap)
 Give a capture's buffer back.
void esp_sdr_chancap_stop (void)
 Stop the run and join its threads; buffers still held stay valid until released.
bool esp_sdr_chancap_active (void)
void esp_sdr_chancap_get_plan (struct esp_sdr_chancap_plan *plan)
int esp_sdr_chancap_bench (const struct esp_sdr_chancap_cfg *cfg, uint32_t pairs, struct esp_sdr_chancap_bench_result *res)
 Time the channelizer on noise-like data on the calling CPU, not while a run is active.

Detailed Description

One I/Q capture per packet per channel of a uniform grid, from the ring on the other CPU, ESP32-S3 (esp_sdr_chancap.h, CONFIG_ESP_SDR_CHANCAP).

Guide: Channelizer.

Macro Definition Documentation

◆ ESP_SDR_CHANCAP_CHANNELS_MAX

#define ESP_SDR_CHANCAP_CHANNELS_MAX   16U

Channels of one instance at most.

◆ ESP_SDR_CHANCAP_FULL_SCALE

#define ESP_SDR_CHANCAP_FULL_SCALE   ESP_SDR_RING_RAW_FULL_SCALE

Output full scale: a full scale input tone on a channel's centre gives this amplitude.

Typedef Documentation

◆ esp_sdr_chancap_cb_t

typedef void(* esp_sdr_chancap_cb_t) (void *user, const struct esp_sdr_chancap *cap)

Called on the callback thread for every finished capture; the consumer releases it.

Function Documentation

◆ esp_sdr_chancap_active()

bool esp_sdr_chancap_active ( void )
Returns
Whether an instance is running.

◆ esp_sdr_chancap_bench()

int esp_sdr_chancap_bench ( const struct esp_sdr_chancap_cfg * cfg,
uint32_t pairs,
struct esp_sdr_chancap_bench_result * res )

Time the channelizer on noise-like data on the calling CPU, not while a run is active.

Parameters
cfgThe grid and rate to time; the gates are ignored.
pairsInput pairs to process (a multiple of 512).
resThe timings.
Return values
0on success.
-EBUSYwhile a run is active.
-EINVALfor a pair count that is not a multiple of 512, or a grid esp_sdr_chancap_start() refuses.
-ERANGEfor an LO below the band.

◆ esp_sdr_chancap_get_plan()

void esp_sdr_chancap_get_plan ( struct esp_sdr_chancap_plan * plan)

Copy the running or last run's plan into plan.

◆ esp_sdr_chancap_start()

int esp_sdr_chancap_start ( const struct esp_sdr_chancap_cfg * cfg)

Tune to the grid and start capturing.

Picks the LO so that the LO leakage falls between channels where it can, starts the ring on CPU 1 and the channelizer and callback threads on the other CPU.

Return values
0on success.
-EINVALfor a grid that does not fit the band, an unsupported rate, or no callback.
-EBUSYif an instance is running.
-EAGAINif esp_sdr_init() has not run.
-ERANGEif the LO cannot be tuned.