DWM1001 Receiving Multiple Signals Back-to-Back

Hi all,

I’m trying to implement some firmware on the Decawave DWM1001 that would let a node loop to receive multiple signals back to back. I’m worried that I’m incorrectly interacting with the receiver through the SYS_STATUS_ID register.

Here’s a simplified version of my code.

#define UWB_WAIT(cond) while (!(cond)) // Just a busy loop

static int cc_ds_rx_response(uint64_t* resp_rx_ts_arr){

while (n_responses < NUM_USERS-1) {

// System crashes, doesn’t time out, in this loop
UWB_WAIT((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_RXFCG | SYS_STATUS_ALL_RX_TO | SYS_STATUS_ALL_RX_ERR));

  dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG); // Re-set register?
  n_responses++;

}
return 0;
}

In my current implementation, this should loop twice, as it waits for 2 signals that are staggered (1ms apart). It seems the firmware is crashing somewhere in the UWB_WAIT busy loop, it doesn’t hit a timeout, or error, it just completely crashes.

I’m wondering if I’m setting the proper flags on SYS_STATUS_ID in UWB_WAIT, and in dwt_write32bitreg, so that the receiver can handle receiving multiple signals back-to-back?

Also unfortunately I can’t figure out the source of the crash through a debugger, as there isn’t enough space on the board to run the firmware + the debugger :(.