PDOA for DW3000

Hi everyone,
I’m having problem getting the measure of PDOA from DW3000.
I’m using the function dwt_readpdoa() and I also have set the parameters as follow in both tx and rx:
static dwt_config_t config = {
5, /* Channel number. /
DWT_PLEN_128, /
Preamble length. Used in TX only. /
DWT_PAC8, /
Preamble acquisition chunk size. Used in RX only. /
9, /
TX preamble code. Used in TX only. /
9, /
RX preamble code. Used in RX only. /
1, /
0 to use standard 8 symbol SFD, 1 to use non-standard 8 symbol, 2 for non-standard 16 symbol SFD and 3 for 4z 8 symbol SDF type /
DWT_BR_6M8, /
Data rate. /
DWT_PHRMODE_STD, /
PHY header mode. /
DWT_PHRRATE_STD, /
PHY header rate. /
(129 + 8 - 8), /
SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. /
(DWT_STS_MODE_OFF), /
STS disabled /
DWT_STS_LEN_64, /
STS length see allowed values in Enum dwt_sts_lengths_e /
DWT_PDOA_M1 /
PDOA mode ON */
};
The function I am using is giving me just 0, or 0.00 if I define the variable as float.
My question is, should I enable some other things for havinf pdoa? or maybe having range and pdoa at the same time is a problem?

Thank you for your time!

From section 4.2 of the user manual:
For the “PDoA” parts, if the packet contains an STS then, depending on the configured mode, the device can compute the PDoA.

You need to enable STS in the packets for PDoA to work, your configuration currently has it disabled.

Hi AndyA, thank you so much for your answer.
I followed your kind suggestion and I tried to put DWT_STS_MODE_1 or 2. and also with DWT_PDOA_M3 instead of 1. The problem is that by just changing this I am not getting any DIST measurement, but everthing works if I turn it OFF.
I’m not a lot practical with STS, I have found the example ex_06a_ss_twr_initiator_sts and I noticed that there a lot of things to do to use STS. Should I integrate all this parts in my code or there is a simper way?

Thank you so much for your patience

Sorry, I can’t help much, I’ve never used STS myself. I just remembered seeing some mention of it being required for PDoA when I first looked over the DW300 documentation.
Given it is supposed to be secure and involve encryption I’m guessing that there are some key values or similar parameters that need to be configured to the same values at both ends but I have no idea how you would go about doing that.

1 Like

Hello @david_light yes you need to enable STS if you want to get the PDOA, as the Phases are computed on Ipatov and STS. Then to get ranging working with STS, you need to do all these lot of things from the ex_06a_ss_twr_initiator_sts.

Hi Simon, thank you for the kind answer. I hope I will be able to do that, it looks a little tricky.