Dw_starttx() waits much time for SYS_STATUS_TXFRS event


I’ve done a simple test about dwm1001 data transmission time using dwm1001-dev board, the result surprises me as it cost much time in wating for SYS_STATUS_TXFRS, which I think should at most spend a few tens of milliseconds(< 30us), but it actually spends ~130us. I’ve no idea what’s happening, can somebody give me some tips.

Below is the main code part (from example ex_01a_simple_tx):

  1. Init
static dwt_config_t config = {
    5,               /* Channel number. */
    DWT_PRF_64M,     /* Pulse repetition frequency. */
    DWT_PLEN_64,   /* 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. */
    1,               /* 0 to use standard SFD, 1 to use non-standard SFD. */
    DWT_BR_6M8,     /* Data rate. */
    DWT_PHRMODE_STD, /* PHY header mode. */
    65 /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
  1. data generation:

char msg[12] = … // fixed length, 12 Bytes, includes src/dst addresses and FCS

  1. sending:
for( ; ; ) {
    ret = dwt_starttx(DWT_START_TX_IMMEDIATE);
    time1 <- dwt_readsystime(); // timepoint 1, start
    while (!(dwt_read32bitreg(SYS_STATUS_ID) & SYS_STATUS_TXFRS)) { }; // This costs about 130us!
    time2 <- dwt_readsystime(); // timepoint 2, end

I think time2-time1 should be approximate ~20us (12Bytes * 8 / 6.8Mbps + SHR time), but in my dwm1001-dev board, it equals to 130us, is this normal behavior, and if so, how can DW1000 achieve 6.8Mbps data rate?


Hi chxt,

Unfortunately, I am not able to to give you an aswer, but I am rather asking for a tip!

How did you manage to load that simple test in the DWM1001 Dev board? The question seems stupid, but i can’t find a way of bypassing the PANS library and sending a simple TX as in the example.

I could not find any “basic” project to directly access the DW1000 chip on the DWM1001 module.

I know it have been a while - and sorry for reviving an old topic, but any hits will help,


hi, @i.kamal

my question was solved, I think the transmission time duration (~120us) is reasonable as it contains 3 parts: data(~20us) + SHR(~60us) + SPI(~30us),I missed the SPI time and underestimate SHR time before.

for your problem, you can start with Decawave’s example project like I did 1 year ago.

1 Like

Hi @chxt ,

Do you mind telling me what’s SPI duration and where did you its value? Thank you!