I’m trying to run some example programs using HAL libraries and CubeMX+ST Workbench. I’m using TREK PCB’s as hardware.
Simple programs like sending/receiving frames works ok.
Now I’m trying to start ranging with pair ex_06a_ss_twr_init and ex_06b_ss_twr_resp
I noticed, that function ret = dwt_starttx(DWT_START_TX_DELAYED) returns with ERROR. No idea why…
Maybe someone could give me a hint?
thanks for your reply, I added 100us to the delays and it worked! This is big difference in response time.
ex_06a_ss_twr_init:
/* Receive response timeout. See NOTE 5 below. */
//#define RESP_RX_TIMEOUT_UUS 210 #define RESP_RX_TIMEOUT_UUS 310
ex_06b_ss_twr_resp:
/* Delay between frames, in UWB microseconds. See NOTE 1 below. */
//#define POLL_RX_TO_RESP_TX_DLY_UUS 330 #define POLL_RX_TO_RESP_TX_DLY_UUS 430