xwr.radar.common
¶
Raw, unabstracted commands.
These commands are commonly issued by dumping the text file output of the TI demo visualizer onto a serial port. However, this is not great for debugging, and the individual parameters are not documented. We instead split commands into documented and individually callable functions.
xwr.radar.common.APIMixins
¶
Mixins capturing the raw TI Demo API.
Source code in src/xwr/radar/common.py
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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |
compRangeBiasAndRxChanPhase
¶
compRangeBiasAndRxChanPhase(
rangeBias: float = 0.0, rx_phase: list[tuple[int, int]] = [(0, 1)] * 12
) -> None
Set range bias, channel phase compensation.
Note
rx_phase must have one term per TX-RX pair.
Source code in src/xwr/radar/common.py
frameCfg
¶
frameCfg(
chirpStartIdx: int = 0,
chirpEndIdx: int = 1,
numLoops: int = 16,
numFrames: int = 0,
framePeriodicity: float = 100.0,
triggerSelect: int = 1,
frameTriggerDelay: float = 0.0,
) -> None
Radar frame configuration.
Warning
The frame should not have more than a 50% RF duty cycle according to the mmWave SDK documentation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chirpStartIdx
|
int
|
chirps to use in the frame. |
0
|
chirpEndIdx
|
int
|
chirps to use in the frame. |
1
|
numLoops
|
int
|
number of chirps per frame; must be >= 16 based on trial/error. |
16
|
numFrames
|
int
|
how many frames to run before stopping; infinite if 0. |
0
|
framePeriodicity
|
float
|
period between frames, in ms. |
100.0
|
triggerSelect
|
int
|
only software trigger (1) is supported. |
1
|
frameTriggerDelay
|
float
|
does not appear to be documented. |
0.0
|
Source code in src/xwr/radar/common.py
lvdsStreamCfg
¶
lvdsStreamCfg(
subFrameIdx: int = -1,
enableHeader: bool = False,
dataFmt: LVDSFormat = ADC,
enableSW: bool = False,
) -> None
Configure LVDS stream (to the DCA1000EVM); LvdsStreamCfg.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subFrameIdx
|
int
|
subframe to apply to. If |
-1
|
enableHeader
|
bool
|
HSI (High speed interface; refers to LVDS) Header enabled/disabled flag; disabled for raw mode. |
False
|
dataFmt
|
LVDSFormat
|
LVDS format; we assume |
ADC
|
enableSW
|
bool
|
Use software (SW) instead of hardware streaming; causes chirps to be streamed during the inter-frame time after processing. We assume HW streaming. |
False
|
Source code in src/xwr/radar/common.py
profileCfg
¶
profileCfg(
profileId: int = 0,
startFreq: float = 77.0,
idleTime: float = 267.0,
adcStartTime: float = 7.0,
rampEndTime: float = 57.14,
txStartTime: float = 1.0,
txOutPower: int = 0,
txPhaseShifter: int = 0,
freqSlopeConst: float = 70.0,
numAdcSamples: int = 256,
digOutSampleRate: int = 5209,
hpfCornerFreq1: HPFCornerFreq1 = KHZ175,
hpfCornerFreq2: HPFCornerFreq2 = KHZ350,
rxGain: int = 30,
) -> None
Configure chirp profile(s).
See the ramp timing calculator in mmWave Studio for chirp timing details, and the AWR1843 Datasheet for frequency and sample rate constraints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profileId
|
int
|
profile to configure. Can only have one in
|
0
|
startFreq
|
float
|
chirp start frequency, in GHz. Can be 76 or 77. |
77.0
|
idleTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
267.0
|
adcStartTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
7.0
|
rampEndTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
57.14
|
txStartTime
|
float
|
chirp timing; see the "RampTimingCalculator". |
1.0
|
txOutPower
|
int
|
not entirely clear what this does. The demo claims that only '0' is tested / should be used. |
0
|
txPhaseShifter
|
int
|
not entirely clear what this does. The demo claims that only '0' is tested / should be used. |
0
|
freqSlopeConst
|
float
|
frequency slope ("ramp rate") in MHz/us; <100MHz/us. |
70.0
|
numAdcSamples
|
int
|
Number of ADC samples per chirp. |
256
|
digOutSampleRate
|
int
|
ADC sample rate in ksps (<12500); see Figure 7-1 (sec. 7.7) in the AWR1843 Datasheet. |
5209
|
hpfCornerFreq1
|
HPFCornerFreq1
|
high pass filter corner frequencies. |
KHZ175
|
hpfCornerFreq2
|
HPFCornerFreq2
|
high pass filter corner frequencies. |
KHZ350
|
rxGain
|
int
|
RX gain in dB. The meaning of this value is not clear. |
30
|
Source code in src/xwr/radar/common.py
xwr.radar.common.configure_adc
¶
Configure radar ADC.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adc_fmt
|
ADCFormat
|
ADC output format (real or complex). |
COMPLEX_1X
|
Returns:
| Type | Description |
|---|---|
str
|
A string containing multiple lines of commands to send. |
Source code in src/xwr/radar/common.py
xwr.radar.common.configure_channels
¶
Configure channels and chirps for time-division multiplexing.
Assigns one sequential chirp per enabled TX antenna (LSB-first).
Used By: AWR1843, AWR1843L, AWR1642, AWR2944.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rx
|
int
|
RX channel bitmask, e.g. |
15
|
tx
|
int
|
TX channel bitmask, e.g. |
7
|
Returns:
| Type | Description |
|---|---|
str
|
A string containing multiple lines of commands to send. |
Source code in src/xwr/radar/common.py
xwr.radar.common.get_boilerplate
¶
get_boilerplate() -> str
Execute mandatory-but-irrelevant TI demo firmware commands.
Used by: AWR1843, AWR1843L, AWR1642, AWR2944.
Returns:
| Type | Description |
|---|---|
str
|
A string containing multiple lines of commands to send. |