I’m working with a DWM1000 board and a MikroE “Flip&Click” board that uses an ATSAM3X8E processor. I’ve been experiencing the same bit-shift issues as some others have reported here trying to read the chip ID (register 0). After working for a while, and looking carefully at the signals with a logic probe (sorry, I can’t copy the screen here) I followed one recommendation and added a pull-up to GPIO6 to put the DW1000 into SPI mode 1. Didn’t work. After looking more closely, it looks as if even though the pullup is there the DW1000 is still putting data out on the falling edge to be read on the next rising edge. I ended up having to put the processor into mode 0. Now it works right.
Something is definitely weird with the SPI settup with this chip.
I am pretty sure it was an answer in this forum about SPI in dw1000…
I also was working with DW1000 using ATMEL SAM3 and SAM4 with no problems, these are very good MCU, you can do fractional clock multiplication and exact 20MHz on the SPI bus.
Anyway, the issue is the default bit (cant recall its exact name, something like SPI_MODE), which described as “for best speed use this value, for best compat use this value”. The problem is that DW chip By DEFAULT holds the data on MISO for only 30us or so after the Strobe on the SPI_CLK.
For some MCU, or for bit-bashing SPI (Sw spi) implementations that hold time is not enough to latch the data by MCU peripheral on the MISO pin.
You can switch this bit In the dw1000, but very important - just by writing (without reading) to the register after the reset.
Again, i cant recall now, but it was something like writing 0x06 or so to one of the config registers. After that the data on MISO would be hold longer and you can do Read/write (i am always using MODE 0, as it is the best mode for low-current consumption applications).
Take a look to the UM…