I’m trying to use interrupts in the TWR example. I got it to work for the responder, but I’m having a hard time to make it work with the initiator. Only the TX confirmation callback is called, but not the RX frame ok callback. Should the TWR response in the initator be handled in the tx_conf_cb? Did I set the wrong flags?
dwt_setcallbacks(&tx_conf_cb, &rx_ok_cb, &rx_to_cb, &rx_err_cb, &spi_error_cb, &spi_ready_cb);
dwt_setinterrupt(
SYS_ENABLE_LO_TXFRS_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXFCG_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXFTO_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXPTO_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXPHE_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXFCE_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXFSL_ENABLE_BIT_MASK |
SYS_ENABLE_LO_RXSTO_ENABLE_BIT_MASK,
0,
DWT_ENABLE_INT);