Counters, measurements and traces of the esp_sdr_154 device (ieee154_esp_sdr.h).
More...
Counters, measurements and traces of the esp_sdr_154 device (ieee154_esp_sdr.h).
◆ ieee154_esp_sdr_dump_cb_t
| typedef void(* ieee154_esp_sdr_dump_cb_t) (const int16_t *iq, size_t n, void *user) |
◆ ieee154_esp_sdr_rx_cb_t
| typedef void(* ieee154_esp_sdr_rx_cb_t) (struct net_pkt *pkt) |
Frame sink without the 802.15.4 L2 (raw use of the radio API): receives each frame without its FCS, LQI set, and owns the packet. It runs on the PHY thread with the PHY lock held: it must not call back into the driver (transmit, channel, diagnostics).
◆ ieee154_esp_sdr_event
◆ ieee154_esp_sdr_dump()
Diagnostic: one 1 ms capture at the current channel as the PHY would see it (mixed down and filtered to 4 MS/s, interleaved I/Q, +-8192 full scale), handed to out while the driver still holds the radio.
- Return values
-
| 0 | on success. |
| -ENETDOWN | if the radio was never started. |
| <0 | an error of the capture (esp_sdr_rx_capture()). |
◆ ieee154_esp_sdr_get_stall()
| size_t ieee154_esp_sdr_get_stall |
( |
uint32_t * | pc, |
|
|
uint32_t * | ls, |
|
|
size_t | max ) |
Diagnostic: CPU 0 PCs (and last load/store addresses) sampled by the receive ring when the PHY thread made no progress for about a second, kept across resets. Returns the count (0 if no stall was seen, and always 0 without CONFIG_ESP_SDR_IEEE802154_RING).
◆ ieee154_esp_sdr_get_stats()
Copy the driver counters into stats.
◆ ieee154_esp_sdr_get_trail()
| size_t ieee154_esp_sdr_get_trail |
( |
uint32_t * | out, |
|
|
size_t | max ) |
Copy the last driver events, oldest first: event in bits 31:28, CPU in bit 27, argument in bits 26:20, uptime in ms (modulo 2^20) in bits 19:0. Kept in RTC memory across resets. Returns the count.
◆ ieee154_esp_sdr_high_ram()
| void * ieee154_esp_sdr_high_ram |
( |
size_t | size | ) |
|
With CONFIG_ESP_SDR_IEEE802154_HIGH_RAM_APP, defined by the application: size bytes of 16-byte aligned internal RAM for the driver this boot, or NULL to leave it off. Called once, at device init.
◆ ieee154_esp_sdr_measure()
Diagnostic: one 1 ms capture at the current channel, its carrier offset against an O-QPSK signal filling it (within +-500 kHz) and its power.
- Return values
-
| 0 | on success. |
| -ENETDOWN | if the radio was never started. |
| <0 | an error of the capture (esp_sdr_rx_capture()). |
◆ ieee154_esp_sdr_set_ack_timing()
| int ieee154_esp_sdr_set_ack_timing |
( |
uint32_t | delay_us, |
|
|
uint32_t | limit_us ) |
ACK timing (CONFIG_ESP_SDR_IEEE802154_AUTO_ACK): first sample delay_us after the frame's end (192 us by the standard), none after limit_us.
- Returns
- 0, -EINVAL, -ENOTSUP.
◆ ieee154_esp_sdr_set_invert()
| void ieee154_esp_sdr_set_invert |
( |
bool | rx_inv, |
|
|
bool | tx_inv ) |
Conjugate received samples and/or the transmitted waveform (spectral inversion), to check another radio's I/Q convention. Both off at boot.
◆ ieee154_esp_sdr_set_lo_above()
| int ieee154_esp_sdr_set_lo_above |
( |
bool | above | ) |
|
Diagnostic: put the LO 4 MHz above the channel instead of below. Only the subsampling ring receive handles it (transmit and the ACK capture assume the LO below).
- Return values
-
| 0 | on success, also before the radio is started (applied at start). |
| <0 | the retune failed (esp_sdr_set_freq()); the LO side is unchanged. |
◆ ieee154_esp_sdr_set_ring_unit()
| int ieee154_esp_sdr_set_ring_unit |
( |
uint32_t | pairs | ) |
|
Set the ring's unit length (ring receive), for latency measurements.
- Parameters
-
- Returns
- 0 or -EINVAL.
◆ ieee154_esp_sdr_set_rx_cb()
Set the frame sink used when CONFIG_NET_L2_IEEE802154 is off (ignored with it on).
◆ ieee154_esp_sdr_set_rx_gain()
| int ieee154_esp_sdr_set_rx_gain |
( |
int | index | ) |
|
esp_sdr_rx_set_gain() for the radio: stops the receive ring around the call, which otherwise waits for the radio lock a ring run holds. Calls into esp_sdr that take the radio go through the driver while it runs.