DWM1000 returns wrong vaules

Hi,

If i send the code 0x00 it returns DECA0130 which is correct. If i write to the register 0x21 and read the register it returns the values that was written. As per the debugging pdf this is correct however if I read 0x00 and 0x00 again the returned values are DECA0130 and 1ECA0130? Is this an error with the DWM module or my SPI? I see no issues with my SPI.

Hi Leylan,

I would suspect a spi issue with a corrupted data when reading 0x00 a second time.

which api are you using to read the register >

Thanks
Yves

Hi Leylan_24,

After the correct HW reset of the DW1000, the next operation is to execute the first write operation to the DW1000:

Write the 16bit value 0x1600 to the SYS_CFG (0x04) register. That will set the SPI_EDGE bit (and will not touch other bits in the SYS_CFG after the startup).

This workaround would make DW1000 SPI “more standard”, especially important for SW SPI implementation (for example default NuttX RTOS).

P.S. do not read-modify-write, as that may cause you a wrong read operation. Just execute write16bit(SYS_CFG, 0x1600);