|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
The other CPU's program counter, sampled while the ring runs, ESP32-S3 (esp_sdr_prof.h, CONFIG_ESP_SDR_CPU_PROF). More...
Data Structures | |
| struct | esp_sdr_prof_rec |
| struct | esp_sdr_prof_info |
Functions | |
| int | esp_sdr_prof_start (uint32_t period_us) |
| Clear the samples and arm sampling. | |
| void | esp_sdr_prof_stop (void) |
| Stop sampling. The samples stay until the next start. | |
| void | esp_sdr_prof_info (struct esp_sdr_prof_info *info) |
| The state of the capture. | |
| struct esp_sdr_prof_rec * | esp_sdr_prof_samples (void) |
| The samples, in the order taken. | |
The other CPU's program counter, sampled while the ring runs, ESP32-S3 (esp_sdr_prof.h, CONFIG_ESP_SDR_CPU_PROF).
Guide: Code placement.
While esp_sdr_ring_run() runs, its CPU reads the other CPU's program counter from the debug assist's PC recorder, the other CPU's current thread and whether it is in an interrupt, once a period, into PSRAM. The ring checks the period in its poll loop and before every sink call, with interrupts masked, so a sample lands at most one slice of filter work late. A period that passes without a check is counted as missed, and the next sample comes one period after a late one: no catch-up. The samples carry the sampling CPU's cycle count, to check the cadence.
The sampled CPU takes no interrupt and runs no code for a sample (the samples reach PSRAM through the data cache both CPUs share), and the code it runs with interrupts masked is sampled like the rest. There are no stacks, and no samples while the ring is stopped; for those, Zephyr's perf (subsys/profiling/perf) samples stacks in a timer interrupt, and its record command's CPU mask can leave the ring's CPU out.
| void esp_sdr_prof_info | ( | struct esp_sdr_prof_info * | info | ) |
The state of the capture.
| info | Filled in. |
| struct esp_sdr_prof_rec * esp_sdr_prof_samples | ( | void | ) |
The samples, in the order taken.
Valid while sampling is stopped; the caller may reorder them in place.
| int esp_sdr_prof_start | ( | uint32_t | period_us | ) |
Clear the samples and arm sampling.
Also enables both CPUs' PC recorders (never disables them: other users rely on them).
| period_us | Sampling period in microseconds. |
| 0 | Armed; samples come while the receive ring runs. |
| -EINVAL | period_us is 0 or above 1000000. |