I have ported the Decawave Api across to a new processor and t appears to be running. The TAG sends ok and ANCHOR receives but I keep getting a HPDWARN flag fromt Register 0x0f:03.
My questions are:
- Could this mainly be due to inter-digit gaps in SPI packet increasing processing time?
- Can I find out how much the time is out - ie time needed for TX delay compared to time available?
- Is it recommended to alter the TX delay time or best to implement something like the DMA on SPI?
Here is the part of code affected. Ret always returns an error and when I set breakpoint in “dwt_startTx()” I see HPDWARN flag is always set.
poll_rx_ts = get_rx_timestamp_u64();
resp_tx_time = (poll_rx_ts + (POLL_RX_TO_RESP_TX_DLY_UUS * UUS_TO_DWT_TIME)) >> 8;
dwt_setdelayedtrxtime(resp_tx_time);
resp_tx_ts = (((uint64)(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(sizeof(tx_resp_msg), tx_resp_msg, 0); /* Zero offset in TX buffer. */
dwt_writetxfctrl(sizeof(tx_resp_msg), 0, 1); /* Zero offset in TX buffer, ranging. */
ret = dwt_starttx(DWT_START_TX_DELAYED);