I’m having some strange issue with the SPI transactions with the DW1000. I’m trying to pair two DW1000 (resp. DWM1000) on an NXP/Freescale Kinetis MK64 platform. I’m using the Decawave demo code and I was already able to pair two devices (simple transmit and receive). So things cannot be very wrong…
However, I’m observing failed initializations often. They result in an apparently disfunctional DW1000. That is, when I read the ID register I’m receiving 0xFFFFFFFF only. I found out that this issue is triggered with the very first write operation into a register of the DW1000. I.e. I reduced the code to a simple Read ID Register and Write Register (writing a 0x01 into register 0x01) sequence and looping that one. Often I’m not reading the proper ID register value but all 1s. When I skip the write operation, reading the ID register is working always.
I know that reading all 1s can also mean that the device is
in DEEPSLEEP. But I never placed it there, and sometimes reading the ID register is working again. I’m not seeing any odds on the oscilloscope during the SPI transfers. I’m using slower SPI frequencies - 2MHz, 1MHz, 500kHz…
SPIPHA and SPIPOL are left open and WAKEUP is connected to ground.
I also do not have an explanation why the whole system is sometimes working (i.e. TX on one system, RX on another one), and is working stable over longer periods. So it seems that only the initialization phase is somehow critical.
Power-Cycling does also seem to help to bring out the DW1000 out of this strange state. I.e. after a power up the very first read of the ID register is working always.
Does anybody have an idea what could go wrong here?