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?
This could well be because the fact that HAL is slower … You need to increase the response times and then the delayed TX will work
thanks for your reply, I added 100us to the delays and it worked! This is big difference in response time.
/* Receive response timeout. See NOTE 5 below. */
//#define RESP_RX_TIMEOUT_UUS 210
#define RESP_RX_TIMEOUT_UUS 310
/* 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
Thank you very much for this share, it helps me !