Hello,
I am working with personalized Code that is based on the examples 5a and b (with sts). When running both scripts I am able to get distance measurements, but ONLY when I am setting a breakpoint in the ds_twr_responder_sts file at the following line for the first loop:
/Poll for reception of a frame or error/timeout. See NOTE 6 below/
waitforsysstatus(&status_reg, NULL, (DWT_INT_RXFCG_BIT_MASK | SYS_STATUS_ALL_RX_TO | SYS_STATUS_ALL_RX_ERR), 0);
I need this breakpoint only for the first loop. As soon as it stops there once I get rid of the breakpoint and everything works fine.
If I am not setting the breakpoint the script stops at the following line:
/Poll DW IC until TX frame sent event set. See NOTE 6 below./
waitforsysstatus(NULL, NULL, DWT_INT_TXFRS_BIT_MASK, 0);
It seems like TX frame event flag is never set. But why does this problem not occur when I am setting a breakpoint at the line mentioned in the frist loop? It makes no sense to me.
Does anybody know what could be the problem here?
Thank you for your help.