Hi,
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/π