PDoA dwt_readpdoa() DW3000


I’m trying to read the pdoa with dwt_readpdoa(). I get very random values from -5000 to 5000 with moving my PCB board, without moving the result is clearly more stable and the ranges is from 0 to 1000 for example. I have no idea if these values are correct and I’ve just don’t understand them or I configured something bad or maybe something else. My configuration:

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. */
    3,               /* 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_1 | DWT_STS_MODE_SDC), /* STS enabled // */
    DWT_STS_LEN_256,                     /* STS length see allowed values in Enum dwt_sts_lengths_e */
    DWT_PDOA_M3                          /* PDOA mode 3 */


My other question is about “signed number [1:-11]” from documentation of dwt_readpdoa(). What does it mean? Maybe I should take from my output pdoa values only those in the range 1:-11 or something like that?

The description of dwt_readpdoa() from DW3XXX_Software_API_Guide_2p2.pdf:
*The PDOA result in radians (signed number [1:-11]). To convert to degrees: pdoa_deg = ((pdoa_rad/1<<11))180/π

When you get a PDOA reading, you need to divide it by 2^11 first to convert it to radians as the API says. So when the PDOA reading varies from -5000 to 5000, the actual PDOA does not vary as much as you might have imagined.

1 Like

I have the same problem. Have you solved it?When the edge is reached, the value ±5000 will appear

Yes, the answer form @BC0023 helped me but I’ve never reached the value > 5000.
For example if you get the dwt_readpdoa() = 1000, then you can calculate your PDoA in radians: 1000/2^11 = 0,48 rad = 27,5 deg, which is your phase difference between antennas. Correct my if I’m wrong but the results which I got seems good

Thank you! My results seems to be ok now

But from the other hand, even the value of dwt_readpdoa like 6000, gives you 6000/2^11 = 2,93 rad = 167,88 deg