Hi,
i am working with the DWM1001 chip on channel 5, PRF_64M, PLEN_128, PAC16 @ 6.8 Mbits/s.
Frame filtering is enabled, auto ack disabled.
I am currently facing the problem, that during reception once every few hours the RXRFTO event is not set (even though no other device is transmitting or even turned on). While polling the System Event Status Register 0x0F the device is stuck in the loop. The register holds the following value: 0x800072
Before starting reception, a frame is transmitted + busy waiting for clearing TXFRS flag once set. This means, in my understanding, the dw1000 should be in IDLE state before reception.
Simplified code for reception:
void receiveFrame(uint16 timeout){
dwt_setrxtimeout(timeout);
dwt_rxenable(DWT_START_RX_IMMEDIATE);
uint32 status_reg;
do{
//problem: sometimes RXRFTO event is not set
status_reg = dwt_read32bitreg(SYS_STATUS_ID);
} while (!(status_reg & (SYS_STATUS_RXFCG | SYS_STATUS_ALL_RX_TO | SYS_STATUS_ALL_RX_ERR)));
if (status_reg & SYS_STATUS_RXFCG) {
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG);
//received frame!
return;
} else if (status_reg & SYS_STATUS_ALL_RX_TO) {
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_ALL_RX_TO);
dwt_rxreset();
} else if (status_reg & SYS_STATUS_ALL_RX_ERR) {
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_ALL_RX_ERR);
}
timeout = getRxTimeoutLeft();
if(timeout > 0){
receiveFrame(timeout); //recursive call if some time is left for staying in RX
}
return;
}