Hi there,
I am using the DW3xxx & QM3xxx SDK v1.0.2 with a custom GPIO configuration, but I am encountering the following error:
(.venv) PS D:\gitlab\uwb-qorvo-tools> run_fira_twr -t -1
Default port: COM9
Initializing session 42...
Send Packet(9): 210000052a00000000
Using Fira 2.0 session handle is : 1
Setting session 1 config ...
DeviceType (0x0): 0x1
DeviceRole (0x11): 0x1
MultiNodeMode (0x3): 0x0
Session 1 -> Init (StateChangeWithSessionManagementCommands)
RangingRoundUsage (0x1): 0x2
DeviceMacAddress (0x6): 0x0
ChannelNumber (0x4): 0x9
ScheduleMode (0x22): 0x1
StsConfig (0x2): 0x0
RframeConfig (0x12): 0x3
ResultReportConfig (0x2e): 0xb
VendorId (0x27): 0x708
StaticStsIv (0x28): 0x60504030201
AoaResultReq (0xd): 0x1
UwbInitiationTime (0x2b): 0x0
PreambleCodeIndex (0x14): 0xa
SfdId (0x15): 0x2
SlotDuration (0x8): 0x960
RangingInterval (0x9): 0xc8
SlotsPerRr (0x1b): 0x19
MaxNumberOfMeasurements (0x32): 0x0
HoppingMode (0x2c): 0x0
RssiReporting (0x13): 0x0
BlockStrideLength (0x2d): 0x0
NumberOfControlees (0x5): 0x1
DstMacAddress (0x7): [1]
KeyRotationRate (0x24): 0x0
StsLength (0x35): 0x1
Send Packet(110): 2103006a010000001b000101110101030100010102060200000401092201010201001201032e010b2702080728060102030405060d01012b08000000000000000014010a150102080260090904c80000001b0119320200002c01001301002d010005010107020100240100350101
Starting ranging...
Send Packet(8): 2200000401000000
Session 1 -> Idle (StateChangeWithSessionManagementCommands)
Press <RETURN> to stop
Device -> Active
Session 1 -> Active (StateChangeWithSessionManagementCommands)
Device -> Error
# Ranging Data:
session handle: 1
sequence n: 0
ranging interval: 200 ms
measurement type: Twr
Mac add size: 2
primary session id: 0x0
n of measurement: 1
# Measurement 1:
status: RangingTxFailed (0x20)
mac address: 00:01 hex
is nlos meas: Unknown
distance: 65535.0 cm
AoA azimuth: 0.0 deg
AoA az. FOM: 0.0 %
AoA elevation: 0.0 deg
AoA elev. FOM: 0.0
AoA dest azimuth: 0.0 deg
AoA dest az. FOM: 0.0 %
AoA dest elevation: 0.0 deg
AoA dest elev. FOM: 0.0 %
slot in error: 0
rssi: -0.0 dBm
I suspect this could be related to my SPI configuration, which is as follows:
target_compile_definitions(
ProjectDefinition
PUBLIC CONFIG_UWB_SPI_INSTANCE=3
CONFIG_UWB_SPI_FRAME_SIZE=8
CONFIG_SPI_UWB_IRQ_PRIORITY=3
CONFIG_SPI_UWB_SCK_GPIO_PORT=0
CONFIG_SPI_UWB_SCK_GPIO_PIN=6
CONFIG_SPI_UWB_MOSI_GPIO_PORT=1
CONFIG_SPI_UWB_MOSI_GPIO_PIN=9
CONFIG_SPI_UWB_MISO_GPIO_PORT=0
CONFIG_SPI_UWB_MISO_GPIO_PIN=8
CONFIG_SPI_UWB_CS_GPIO_PORT=0
CONFIG_SPI_UWB_CS_GPIO_PIN=12
CONFIG_DWT_WU_GPIO_PORT=0
CONFIG_DWT_WU_GPIO_PIN=2
CONFIG_DWT_IRQ_GPIO_PORT=0
CONFIG_DWT_IRQ_GPIO_PIN=26
CONFIG_DWT_RSTN_GPIO_PORT=0
CONFIG_DWT_RSTN_GPIO_PIN=10
)
Questions:
- Could the GPIO configuration cause the
RangingTxFailed (0x20)
error? - Are there any known issues with SPI instance 3 in this SDK?
- How can I debug the ranging failure more effectively?