openaliro
Aliro reader: UWB/CCC core and ESP32-S3/C5/C6 port
Loading...
Searching...
No Matches
uwb_min.h
Go to the documentation of this file.
1
3#ifndef WOZ_UWB_MIN_H_
4#define WOZ_UWB_MIN_H_
5
6#include <stdbool.h>
7#include <stdint.h>
8
10#define UWB_DW3110_DEV_ID 0xDECA0302u
11
14 bool tx_done;
15 bool rx_armed;
16 bool rx_event;
17 uint32_t tx_status;
18 uint32_t rx_status;
19};
20
22int uwb_min_read_chipid(uint32_t *id_out);
23
25int uwb_min_hw_reset(void);
26
29
32 uint32_t polls_tx;
33 uint32_t resp_rx;
34 uint32_t sts_ok;
35 int16_t last_sts;
36 uint32_t last_status;
37};
38
41 bool tx_ok;
42 bool timed_out;
43 int16_t sts;
44 uint32_t status;
45};
46
48int uwb_min_twr_prep(void);
49
52
54int uwb_min_twr_poll(uint32_t n, uint32_t period_ms, struct uwb_twr_result *out);
55
57int uwb_min_radio_init(void);
58
60uint32_t uwb_min_radio_generation(void);
61
62#endif /* WOZ_UWB_MIN_H_ */
Self-test result emitted by uwb_min_selftest.
Definition uwb_min.h:13
uint32_t tx_status
SYS_STATUS captured at end of TX poll.
Definition uwb_min.h:17
bool rx_armed
the RX arm returned success.
Definition uwb_min.h:15
bool rx_event
Some RX status bit fired (frame, timeout, or error).
Definition uwb_min.h:16
uint32_t rx_status
SYS_STATUS captured at end of RX poll.
Definition uwb_min.h:18
bool tx_done
SYS_STATUS TXFRS bit observed after TX.
Definition uwb_min.h:14
Outcome of one raw SS-TWR POLL/RESP exchange (uwb_min_twr_exchange).
Definition uwb_min.h:40
uint32_t status
SYS_STATUS captured on the RX.
Definition uwb_min.h:44
bool tx_ok
POLL left the antenna (TXFRS seen).
Definition uwb_min.h:41
bool timed_out
RX window closed with no RESP frame.
Definition uwb_min.h:42
int16_t sts
STS quality index of the RESP (>0 = correlated).
Definition uwb_min.h:43
Result of a raw static-STS SS-TWR initiator burst (uwb_min_twr_poll).
Definition uwb_min.h:31
int16_t last_sts
STS quality index of the last RESP.
Definition uwb_min.h:35
uint32_t resp_rx
RESP frames received (any non-timeout RX event).
Definition uwb_min.h:33
uint32_t polls_tx
POLL frames sent (TXFRS observed).
Definition uwb_min.h:32
uint32_t sts_ok
RESPs whose STS quality index was > 0.
Definition uwb_min.h:34
uint32_t last_status
SYS_STATUS captured on the last RX.
Definition uwb_min.h:36
uint32_t uwb_min_radio_generation(void)
Count of fresh radio inits; changes whenever the base config was re-applied.
Definition uwb_min.c:163
void uwb_min_twr_exchange(struct uwb_twr_frame *f)
Run one POLL/RESP exchange; the STS must already be programmed.
Definition uwb_min.c:320
int uwb_min_read_chipid(uint32_t *id_out)
Read the DW3000-family DEV_ID register over SPI.
Definition uwb_min.c:180
int uwb_min_hw_reset(void)
Pulse the DW3110 RST line low to force a hardware reset.
Definition uwb_min.c:168
int uwb_min_twr_poll(uint32_t n, uint32_t period_ms, struct uwb_twr_result *out)
Raw static-STS SS-TWR initiator burst (bench probe).
Definition uwb_min.c:373
int uwb_min_radio_init(void)
Ensure the DW3110 is fully initialised (probe + initialise + configure + LEDs).
Definition uwb_min.c:158
int uwb_min_twr_prep(void)
Configure the radio for the raw SS-TWR loopback (SP3-ND, ch9, code11); no STS.
Definition uwb_min.c:299
int uwb_min_selftest(struct uwb_selftest_result *out)
Radio self-test: configure, TX one frame, then arm RX.
Definition uwb_min.c:205