xwr.radar
¶
Interface implementation for generic TI demo MSS firmware.
Usage
After selecting the appropriate XWRXXXX
interface:
- Initialization parameters can be defaults. The
port
may need to be changed if multiple radars are being used, or another device uses the/dev/ttyACM0
default name. The baudrate should not be changed. - Setup with
.setup(...)
with the desired radar configuration. - Start the radar with
.start()
. - Stop the radar with
.stop()
.
Info
You may need to provide read/write permissions to access the serial port:
Danger
If the configuration is invalid, .start()
may return an error, or
cause the radar to freeze. This may require the radar to be rebooted
via manually disconnecting the power supply.
xwr.radar.AWR1642
¶
Bases: XWRBase
Interface implementation for the TI AWR1642 family.
Supported devices
- AWR1642Boost
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str | None
|
radar control serial port; typically the lower numbered one. |
None
|
baudrate
|
int
|
baudrate of control port. |
115200
|
name
|
str
|
human-readable name. |
'AWR1642'
|
Source code in src/xwr/radar/api.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
|
lowPower
¶
Low power mode config.
Warning
For some reason, the AWR1642 requires adcMode=1
. Not sure what
this does.
Source code in src/xwr/radar/api.py
setup
¶
setup(
frequency: float = 77.0,
idle_time: float = 110.0,
adc_start_time: float = 4.0,
ramp_end_time: float = 56.0,
tx_start_time: float = 1.0,
freq_slope: float = 70.006,
adc_samples: int = 256,
sample_rate: int = 5000,
frame_length: int = 64,
frame_period: float = 100.0,
) -> None
Configure radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frequency
|
float
|
frequency band, in GHz; 77.0 or 76.0. |
77.0
|
idle_time
|
float
|
see TI chirp timing documentation; in us. |
110.0
|
adc_start_time
|
float
|
see TI chirp timing documentation; in us. |
4.0
|
ramp_end_time
|
float
|
see TI chirp timing documentation; in us. |
56.0
|
tx_start_time
|
float
|
see TI chirp timing documentation; in us. |
1.0
|
freq_slope
|
float
|
chirp frequency slope; in MHz/us. |
70.006
|
adc_samples
|
int
|
number of samples per chirp. |
256
|
sample_rate
|
int
|
ADC sampling rate; in ksps. |
5000
|
frame_length
|
int
|
chirps per frame per TX antenna. Must be a power of 2. |
64
|
frame_period
|
float
|
time between the start of each frame; in ms. |
100.0
|
Source code in src/xwr/radar/api.py
start
¶
start(reconfigure: bool = True) -> None
Start radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reconfigure
|
bool
|
Whether the radar needs to be configured. |
True
|
Source code in src/xwr/radar/base.py
stop
¶
Stop radar.
Warning
The radar may be non-responsive to commands in some conditions, for example if the specified timings are fairly tight (or invalid).
Source code in src/xwr/radar/base.py
xwr.radar.AWR1843
¶
Bases: XWRBase
Interface implementation for the TI AWR1843 family.
Supported devices
- AWR1843Boost
- AWR1843AOPEVM
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str | None
|
radar control serial port; typically the lower numbered one. |
None
|
baudrate
|
int
|
baudrate of control port. |
115200
|
name
|
str
|
human-readable name. |
'AWR1843'
|
Source code in src/xwr/radar/api.py
setup
¶
setup(
frequency: float = 77.0,
idle_time: float = 110.0,
adc_start_time: float = 4.0,
ramp_end_time: float = 56.0,
tx_start_time: float = 1.0,
freq_slope: float = 70.006,
adc_samples: int = 256,
sample_rate: int = 5000,
frame_length: int = 64,
frame_period: float = 100.0,
) -> None
Configure radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frequency
|
float
|
frequency band, in GHz; 77.0 or 76.0. |
77.0
|
idle_time
|
float
|
see TI chirp timing documentation; in us. |
110.0
|
adc_start_time
|
float
|
see TI chirp timing documentation; in us. |
4.0
|
ramp_end_time
|
float
|
see TI chirp timing documentation; in us. |
56.0
|
tx_start_time
|
float
|
see TI chirp timing documentation; in us. |
1.0
|
freq_slope
|
float
|
chirp frequency slope; in MHz/us. |
70.006
|
adc_samples
|
int
|
number of samples per chirp. |
256
|
sample_rate
|
int
|
ADC sampling rate; in ksps. |
5000
|
frame_length
|
int
|
chirps per frame per TX antenna. Must be a power of 2. |
64
|
frame_period
|
float
|
time between the start of each frame; in ms. |
100.0
|
Source code in src/xwr/radar/api.py
start
¶
start(reconfigure: bool = True) -> None
Start radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reconfigure
|
bool
|
Whether the radar needs to be configured. |
True
|
Source code in src/xwr/radar/base.py
stop
¶
Stop radar.
Warning
The radar may be non-responsive to commands in some conditions, for example if the specified timings are fairly tight (or invalid).
Source code in src/xwr/radar/base.py
xwr.radar.AWR1843L
¶
Bases: AWR1843
TI AWR1843Boost with its middle antenna disabled.
Supported devices
- AWR1843Boost, with the middle TX antenna which is 1/2-wavelength above the other two disabled.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str | None
|
radar control serial port; typically the lower numbered one. |
None
|
baudrate
|
int
|
baudrate of control port. |
115200
|
name
|
str
|
human-readable name. |
'AWR1843'
|
Source code in src/xwr/radar/api.py
setup
¶
setup(
frequency: float = 77.0,
idle_time: float = 110.0,
adc_start_time: float = 4.0,
ramp_end_time: float = 56.0,
tx_start_time: float = 1.0,
freq_slope: float = 70.006,
adc_samples: int = 256,
sample_rate: int = 5000,
frame_length: int = 64,
frame_period: float = 100.0,
) -> None
Configure radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frequency
|
float
|
frequency band, in GHz; 77.0 or 76.0. |
77.0
|
idle_time
|
float
|
see TI chirp timing documentation; in us. |
110.0
|
adc_start_time
|
float
|
see TI chirp timing documentation; in us. |
4.0
|
ramp_end_time
|
float
|
see TI chirp timing documentation; in us. |
56.0
|
tx_start_time
|
float
|
see TI chirp timing documentation; in us. |
1.0
|
freq_slope
|
float
|
chirp frequency slope; in MHz/us. |
70.006
|
adc_samples
|
int
|
number of samples per chirp. |
256
|
sample_rate
|
int
|
ADC sampling rate; in ksps. |
5000
|
frame_length
|
int
|
chirps per frame per TX antenna. Must be a power of 2. |
64
|
frame_period
|
float
|
time between the start of each frame; in ms. |
100.0
|
Source code in src/xwr/radar/api.py
start
¶
start(reconfigure: bool = True) -> None
Start radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reconfigure
|
bool
|
Whether the radar needs to be configured. |
True
|
Source code in src/xwr/radar/base.py
stop
¶
Stop radar.
Warning
The radar may be non-responsive to commands in some conditions, for example if the specified timings are fairly tight (or invalid).
Source code in src/xwr/radar/base.py
xwr.radar.XWRBase
¶
Bases: APIMixins
, BoilerplateMixins
Generic AWR Interface for the TI demo MSS firmware.
The interface is based on a UART ASCII CLI, and is documented by the following sources:
- The
packages/ti/demo/xwr18xx/mmw
folder in the mmWave SDK install. - mmWave SDK user guide, Table 1 (Page 19)
- mmWave Studio
- AWR1843 Data Sheet
Warning
We only implement a partial API. Non-mandatory calls which do not affect the LVDS raw I/Q stream are not implemented.
Info
If the radar serial port is not provided, we auto-detect the port by fetching the lowest-numbered one which contains "XDS110" in the USB device description (Or "CP2105 ... Enhanced" in the case of the AWR1843AOPEVM), which corresponds to the TI XDS110 JTAG debugger embedded in each radar dev board.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str | None
|
radar control serial port; typically the lower numbered one. If
not provided ( |
None
|
baudrate
|
int
|
baudrate of control port. |
115200
|
name
|
str
|
human-readable name. |
'AWR1843'
|
Attributes:
Name | Type | Description |
---|---|---|
NUM_TX |
int
|
number of TX antennas. |
NUM_RX |
int
|
number of RX antennas. |
Source code in src/xwr/radar/base.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
|
send
¶
Send message, and wait for a response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cmd
|
str
|
command to send. |
required |
timeout
|
float
|
timeout, in seconds. |
10.0
|
Raises:
Type | Description |
---|---|
TimeoutError
|
if no response is received by the timeout. |
Source code in src/xwr/radar/base.py
start
¶
start(reconfigure: bool = True) -> None
Start radar.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reconfigure
|
bool
|
Whether the radar needs to be configured. |
True
|
Source code in src/xwr/radar/base.py
stop
¶
Stop radar.
Warning
The radar may be non-responsive to commands in some conditions, for example if the specified timings are fairly tight (or invalid).