I’m using a DW3000 with receive double buffering turned on and delayed sends fail. Getting delayed send status is HPDWARN and adjusting delayed send time is not working. I am requesting for some guidance.
Get the timestamp of dwt_starttx() here, it is always 0.5S faster than the delayed send timestamp. after turning off double buffered reception, the delayed send is normal
I’ve enabled interrupt handling.
#define POLL_RX_TO_RESP_TX_DLY_UUS 1500
dwt_setdblrxbuffmode(dw, DBL_BUF_STATE_EN,DBL_BUF_MODE_MAN);
dwt_configciadiag(dw,DW_CIA_DIAG_LOG_MIN);
poll_rx_ts = get_rx_timestamp_u64(dw);
resp_tx_time =(poll_rx_ts + (POLL_RX_TO_RESP_TX_DLY_UUS * UUS_TO_DWT_TIME)) >>8;
dwt_setdelayedtrxtime(dw, resp_tx_time);
resp_tx_ts =(((uint64_t)(resp_tx_time & 0xFFFFFFFEUL)) << 8) + TX_ANT_DLY;
resp_msg_set_ts(&tx_resp_msg[RESP_MSG_POLL_RX_TS_IDX], poll_rx_ts);
resp_msg_set_ts(&tx_resp_msg[RESP_MSG_RESP_TX_TS_IDX], resp_tx_ts);
tx_resp_msg[ALL_MSG_SN_IDX] = frame_seq_nb;
dwt_writetxdata(dw, sizeof(tx_resp_msg), tx_resp_msg,0);
dwt_writetxfctrl(dw, sizeof(tx_resp_msg), 0, 1);
ret = dwt_starttx(dw, DWT_START_TX_DELAYED);/HPDWARN ERROR/