Problem with running example ex_06b_ss_twr_resp

Hi All,

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?

Best regards,
Irek

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
/Leo

Hi Leo,

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

BR,
Irek

Irek_sz,

Thank you very much for this share, it helps me !

BR

Alexandre