DW1000 SPI cock error for speeds lower than 6Mhzl

[attachment=262]
[attachment=263]
[attachment=264]
[attachment=265]

All figures Read the Device ID 0x00 register.
Yellow-clock
Blue-MISO
Green-MOSI
Purple- CS

[color=red]Figure1[/color] is a zoomed signal sequence of SPI which reading the device id register. Shows the last 3 bytes of the reply from DW1000.(wrong reply 60,03,95,BC: one bit shifted)
[color=red]Figure2[/color] is the full spi signal sequence of figure 1.
[color=red]Figure3[/color] is a zoomed signal sequence of SPI which reading the device id register. Shows the last 3 bytes of the reply from DW1000.(correct reply 30,01,CA,DE )
[color=red]Figure4[/color] is the full spi signal sequence of figure 3.

The SPI of host microcontroller is configured to SPI_MODE_0 (CPOL = 0 & CPHA = 0).
When I test DW1000 to read device ID, I get one bit shifted reply for frequencies under 6MHz. (Figure 1&2)
But when tested with high SPI speed (>6MHz), I get the correct reply.
Also sometimes I see that the correct device ID reply is not consistent.
I think this is a spi clock related problem in the chip.

Can anyone please tell the reason for this behavior?
How to get correct ID reply all the time?

I have a same your problem with ESP8266 and ESP32

  • Update:
    I had setup SPI mode 3 (GPIO5, GPIO6 Pullup) and I had got same your problem. Then I monitor SPI bus by OSC and found that exactly SPI mode 2 is right.
    I setup ESP into SPI mode 2 and solved the problem. I don’t know why DW1000 actived SPI mode 2 but i think you can setup SPI mode 1/2/3 and try again.