I have one DW1000 module which I program the exact same way as my other DW1000 module, however, it can only transmit but never receive because the CLKPLL_LL bit is set, even if I set TRXOFF:
def waitForSuccessfulReceive(self):
start_time = time.time()
self.activateReceiver()
while True:
SYS_STATUS = self.read(reg_addr=0x0F, sub_reg_addr=0x00, len=5)
RXFCG = SYS_STATUS[1] & (1 << 6)
RXDFR = SYS_STATUS[1] & (1 << 5)
LDEERR = SYS_STATUS[2] & (1 << 2)
RXFCE = SYS_STATUS[1] & (1 << 7)
RXPHE = SYS_STATUS[1] & (1 << 4)
RXRFSL = SYS_STATUS[2] & 0x01
RXRFTO = SYS_STATUS[2] & (1 << 1)
RXPTO = SYS_STATUS[2] & (1 << 5)
RXSFDTO = SYS_STATUS[3] & (1 << 2)
LDEDONE = SYS_STATUS[1] & (1 << 2)
RFPLL_LL = SYS_STATUS[3] & 0x01
CLKPLL_LL = SYS_STATUS[3] & (1 << 1)
if RXFCG != 0 and RXDFR != 0 and LDEDONE != 0:
break
if time.time() - start_time > 1.0:
break
elif RFPLL_LL != 0:
print("RF PLL Losing Lock")
elif CLKPLL_LL != 0:
print("Clock PLL Losing Lock")
self.disableTransceiver()
time.sleep(0.01)
self.activateReceiver()
elif LDEERR != 0:
print("Leading edge detection processing error")
self.activateReceiver()
elif RXFCE != 0:
print("Receiver CRC error")
self.activateReceiver()
elif RXPHE != 0:
print("Receiver PHY Header error")
self.activateReceiver()
elif RXRFSL != 0:
print("Receiver Reed Solomon Frame Sync Loss")
self.activateReceiver()
elif RXRFTO != 0:
print("Receive Frame Wait timeout")
self.activateReceiver()
elif RXPTO != 0:
print("Preamble detection timeout")
self.activateReceiver()
elif RXSFDTO != 0:
print("Receive SFD timeout")
self.activateReceiver()
Is my module broken - what is causing this?