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

Channelized burst capture: one I/Q capture per packet per channel of a uniform grid. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <esp_sdr/esp_sdr_ring.h>

Go to the source code of this file.

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

Channelized burst capture: one I/Q capture per packet per channel of a uniform grid.

The receive ring (esp_sdr_ring.h, 16 MS/s, no decimation) feeds a hand-over ring in SRAM bank 2 from CPU 1; a thread on the other CPU runs a wideband power gate, a channelizer (a polyphase filter bank for grids that divide the ring rate, else one mixer and decimator per channel), a power detector per channel, and assembles the captures in a PSRAM slab. A callback thread hands every finished capture to the consumer. Design: doc/modem/channelizer.md. Needs CONFIG_ESP_SDR_CHANCAP.