DWM1001C mode configuration (No PANS)

Hi there,

I’m trying to establish a “long range” ranging system (>~30m) using two DMW1001C modules with a two-way ranging algorithm. I don’t want to use PANS, since it seems to be hardcoded to setup the modules for a short range/high density system (Mode 12). For my use case either mode 3 (16Mhz PRF) or mode 11 (64Mhz PRF) seem to be adequate, since both modes describe a long range/low density use case. The modes I’m refering to are described in Decawave Application Note APU001.

I’m using the “ss_twr_init” and and “ss_twr_resp” examples provided in
DWM1001-examples to measure the distance between two modules. Using the default settings in the example code this works just fine and I’m able to read some plausible ranging measurements from the serial port of the module flashed with “ss_twr_init”. However, in the example, the modules are configured to mode 12, which resembles a short range/high density use case. I tried to change the configuration to mode 11, but after that I don’t get any measurments. The code snippet below shows the definition of the mode settings located in the “main.c” source files of both “ss_twr_init” and “ss_twr_resp”. I did not change anything else in the code, except for the mode definition shown below.

// example default setting (mode 12 configuration\
// static dwt_config_t config = {
//    5,                Channel number. 
//    DWT_PRF_64M,      // Pulse repetition frequency. 
//    DWT_PLEN_128,     // Preamble length. Used in TX only. 
//    DWT_PAC8,         // Preamble acquisition chunk size. Used in RX only. 
//    10,               // TX preamble code. Used in TX only. 
//    10,               // RX preamble code. Used in RX only. 
//    0,                // 0 to use standard SFD, 1 to use non-standard SFD. 
//    DWT_BR_6M8,       // Data rate. 
//    DWT_PHRMODE_STD,  // PHY header mode. 
//    (129 + 8 - 8)     // SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. 
//}; 
//

// My config: configure to mode 11 (long range, low density, 64Mhz PRF) (see Decawave APU001, chap. 2.2.1) 
static dwt_config_t config = {
    5,                // Channel number. 
    DWT_PRF_64M,      // Pulse repetition frequency. 
    DWT_PLEN_1024,    // Preamble length. Used in TX only. 
    DWT_PAC64,        // Preamble acquisition chunk size. Used in RX only. 
    10,               // TX preamble code. Used in TX only. 
    10,               // RX preamble code. Used in RX only. 
    1,                // 0 to use standard SFD, 1 to use non-standard SFD. (with 64 symbols) 
    DWT_BR_110K,      // Data rate. 
    DWT_PHRMODE_STD,  // PHY header mode. 
    (1025 + 64 - 64)  // SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. 
};

After I successfully flashed “ss_twr_init” and “ss_twr_resp” with the new settings to the modules, ranging does not work anymore (The module with “ss_twr_init” does not send any ranging measurment to its serial port). I guess that I’m missing something here and that there are other things I need to change to properly set another mode. I also looked at the example in chap. 4 of APU001, but here a TDOA use case is described (I want TWR) and I don’t really know how to adapt this example into my code. I know that without proper calibration of each module I won’t get good ranging results, but first of all I’d like to gain some understanding of how the mode configuration works.

Im using SEGGER Embedded Studio for ARM V5.64 on Win10 and a J-Link Compact Base to flash code to the modules.

Thanks for your help!

The PLEN 128 roughly corresponds to 128us. PLEN 1024 - to 1024us.
The change you’ve made require to change the TWR timings in between Poll and Response. I’ll recommend APS022 and debug timings with 4-channel oscilloscope or LA, connected to two devices.

Thanks for your reply.

Just to be sure: This is the value (located in main.c of “ss_twr_init”), which defines the TWR timing and needs to be adjusted accordingly?

/* example default 6M8 */
//#define POLL_TX_TO_RESP_RX_DLY_UUS 100 
#define POLL_TX_TO_RESP_RX_DLY_UUS 1024

Anyway, I’ll read through APS022, thanks!