|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
ESP-SDR gapless receive on the ESP32-S31 through the modem diagnostic bus. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | esp_sdr_diag16_cfg |
| struct | esp_sdr_diag16_stats |
Macros | |
| #define | ESP_SDR_DIAG16_PINS 16U |
| #define | ESP_SDR_DIAG16_NODE 4096U |
| #define | ESP_SDR_DIAG16_HOLE 16U |
| #define | ESP_SDR_DIAG16_PAYLOAD (ESP_SDR_DIAG16_NODE - ESP_SDR_DIAG16_HOLE) |
Typedefs | |
| typedef void(* | esp_sdr_diag16_sink_t) (void *user, uint8_t *node, uint64_t index) |
Functions | |
| int | esp_sdr_diag16_run (const struct esp_sdr_diag16_cfg *cfg, struct esp_sdr_diag16_stats *stats) |
| Run the ring until the time is up, esp_sdr_diag16_stop() or an overrun. | |
| void | esp_sdr_diag16_stop (void) |
| Ask a running esp_sdr_diag16_run() to return. | |
| bool | esp_sdr_diag16_active (void) |
| uint64_t | esp_sdr_diag16_produced (void) |
| bool | esp_sdr_diag16_node_valid (uint64_t index) |
Is the node a sink got at index still as it was? | |
ESP-SDR gapless receive on the ESP32-S31 through the modem diagnostic bus.
The bus carries I and Q, 10 bits each. The GPIO matrix loops the upper 8 of each through 16 pads into the PARLIO receiver, a GDMA ring collects them without the CPU. The method is ESPARGOS esp-sdr's S31 streaming firmware (main/targets/esp32s31/streaming).
Bytes: signed I[9:2], then signed Q[9:2], usable as I + jQ. A lower rate takes every n-th sample of the 80 MS/s bus: there is no digital filter, and the analog low-pass does not go below some 13 MHz, so 10 and 5 MS/s alias.
The 16 pads are driven as outputs that toggle at up to 40 MHz: nothing may drive them, whatever they reach gets all that, and a slow pad spoils its bits (doc/samples/rings.md).
The PARLIO clock comes from 160 MHz, the bus runs at 80 MHz: a start samples the bus either in the middle of its bit or on its edge, about one start in two, whatever the rate or clock edge. On the edge some lines take the next sample's bits: a value crossing zero comes out far from zero. Every run looks first with the receiver off, where such values cannot be real, and slips the clock until there are none and Q crossed zero often enough to tell; I's crossings do not count. Where the LO's DC keeps Q off zero, it then looks with the receiver on, in moments with nothing on the air.