ESP32 UWB DW3000 configuration fails for ch9

I have been using the sample code from the, namely ex_01a_simple_tx and ex_02a_simple_rx. I can get this working on my 2 devices with the default settings of channel 5. When I attempt to change the channels to 9, then the dwt_configure function fails on the upload of the code. Any ideas what to try?

I seem to be getting a PLL locking error. I have tried most of the sample configs from the Arduino dw3000 libraries, located in the dw3000_config_options.cpp. But it always fails. Anyone successful with this?

dwt_config_t config_options = {
9, /* Channel number. /
DWT_PLEN_1024, /
Preamble length. Used in TX only. /
Preamble acquisition chunk size. Used in RX only. /
10, /
TX preamble code. Used in TX only. /
10, /
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. /
PHY header mode. /
PHY header rate. /
(1024 + 1 + 8 - 8), /
SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. /
Mode 1 STS enabled /
STS length*/
DWT_PDOA_M0 /* PDOA mode off */

As a reminder, I maintain some unofficial notes on using non-Qorvo DW3000 drivers here: · GitHub

I don’t know why that particular driver would be failing in that particular case, but if you find a solution, tips, or gotchas, I’m happy to add notes to that gist!

You could try to raise MAX_RETRIES_FOR_PLL in dw3000_device_api.h. Set it to 60 for example.

This worked, thanks RogueModron