I am trying to work on a multiple anchor DS-TWR example, it works fine but the problem is that ranging really gets hit after 10ish meters, after that anchors give very high amount of peaks and connectivity starts stutter. I tried to solve this issue by changing the dwt_config but when i change it this happens:
-Tag sends its messsage
-Anchor receives the message
-Anchor sends its response
-Tag does not receive that response
Here is the configuration that worked:
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_M0 /* PDOA mode off */
};
And here is the one I tried and did not work:
static dwt_config_t config = {
5, /* Channel number. */
DWT_PLEN_4096, /* Preamble length. Used in TX only. */
DWT_PAC32, /* 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_850K, /* Data rate. */
DWT_PHRMODE_STD, /* PHY header mode. */
DWT_PHRRATE_STD, /* PHY header rate. */
(4096 + 1 + 64 - 32), /* 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_M0 /* PDOA mode off */
};
Any help would be appriciated.