Dw1000 API example ex_05a_ds_twr_init not work on dwm1001

Hello All!
My try to launch example ex_05a_ds_twr_init from DW1000 API package on DWM1001-DEV is failed: TRX can’t enable RX after packet was successfully sent. Here is a piece of code from example that is used by me and dump of screen of J-LINK RTT Viewer:

// Write frame data to DW1000 and prepare transmission.
tx_poll_msg[ALL_MSG_SN_IDX] = frame_seq_nb;
dwt_writetxdata(sizeof(tx_poll_msg), tx_poll_msg, 0); // zero offset in TX buffer.
dwt_writetxfctrl(sizeof(tx_poll_msg), 0, 1); // set ranging bit

    /* Start transmission, indicating that a response is expected so that 
     * reception is enabled automatically after the frame is sent and the delay
     * set by dwt_setrxaftertxdelay() has elapsed. */        

// sys();
SEGGER_RTT_printf(0,"Send POLL: ");
if(DWT_ERROR == dwt_starttx(DWT_START_TX_IMMEDIATE | DWT_RESPONSE_EXPECTED))
{
SEGGER_RTT_printf(0,“fail!\n”);
}
SEGGER_RTT_printf(0,“success\n”);
// sys();
while(!((status = dwt_read32bitreg(SYS_STATUS_ID)) & SYS_STATUS_TXFRS)) {;}
if((status = dwt_read32bitreg(SYS_STATUS_ID) & SYS_STATUS_TXFRS))
{
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG | SYS_STATUS_ALL_TX);
SEGGER_RTT_printf(0,“POLL sent\n”);
}
sys();
SEGGER_RTT_printf(0,“Wait RESPONSE\n”);
/* We assume that the transmission is achieved correctly, poll for reception of a frame or error/timeout. See NOTE 9 below. */
#ifndef USE_IRQ
while (!((status = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_RXFCG | SYS_STATUS_ALL_RX_TO | SYS_STATUS_ALL_RX_ERR)))
{ ; };
#else
while((!rx_ok)||(!rx_to)|(!rx_err)) {;}
#endif
SEGGER_RTT_printf(0,“have smth:\n”);
regs();

sys() and regs() are my custom utils for SYS_CFG and SYS_STATE - SYS_STATUS dumping.

Here is piece of RTT log:

0> Start ranging in tag mode
0> Send POLL: success
0> POLL sent
0> SYS_CFG: 0x10001200
0> Wait RESPONSE
0> have smth:
0> 0x00010000 - 0x00A00002
As I can see DW1000 is in IDLE, RXOVRR flag is raised, but I’m using only single RX buffer. No other events are generated. I would be happy if somebody tell me whats going on and how to overcome this.
Thanks!

Reply himself :slight_smile: - problem solved. It was all about a too small preamble timeout delay

Thanks for giving the solution !

Yves