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_dumpring.h File Reference

ESP-SDR gapless receive on the ESP32-S31 through the dump engine alone. More...

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

Go to the source code of this file.

Data Structures

struct  esp_sdr_dumpring_cfg
struct  esp_sdr_dumpring_stats

Typedefs

typedef void(* esp_sdr_dumpring_sink_t) (void *user, const uint32_t *words, size_t n)

Functions

int esp_sdr_dumpring_run (const struct esp_sdr_dumpring_cfg *cfg, struct esp_sdr_dumpring_stats *stats)
 Receive until esp_sdr_dumpring_stop() or an error, on the calling thread.
void esp_sdr_dumpring_stop (void)
 End a run at its next unit; from any thread or the sink.

Detailed Description

ESP-SDR gapless receive on the ESP32-S31 through the dump engine alone.

The engine that captures bursts also runs without a stop: in its circular mode it writes the first words of whichever TCM group the ownership register gives it, and the CPU can read only a group the engine does not own. The run moves it between group 2 (0x2F040000, which holds nothing of the image) and the capture bank's group 3 and reads each while the other is written, so every word arrives, once and in order. The method is ESPARGOS esp-sdr's S31 continuous spectra (main/targets/esp32s31/burst/s31_spectrum.h), which turn the groups in equal units; here group 2 takes the long units and group 3 only as many words as it takes to copy one out of group 2: group 3 holds the ROM's data, which the CPUs must not read while the engine owns it, so meanwhile this core runs with interrupts off and the other core waits in its stall interrupt. On CPU 1, the S31's only core with PIE, the turn copies and marks 4 words a 128-bit load or store: some 2.4k CPU cycles a turn at 20 MS/s instead of 5.9k.

Sentinel words mark where each unit may start and end; a unit's first word is the last unit's end, or the run ends with -EIO. Needs no pads and no GPIO matrix, so it runs beside the panel of the VIEWE board, where the diagnostic bus's ring (esp_sdr_diag16.h) cannot.

Words: as a burst's, esp_sdr_rx_i() and esp_sdr_rx_q() (esp_sdr_rx.h) take out I and Q, 10 bits each; the bits above are the receiver's state. Only the analog low-pass stands before the capture rate: at 20 MS/s it passes some 13 MHz, so a lower rate aliases.