DWM1000, I cant read correct ID (0xDECA0130)

Hello, i use stm32l4xxx to communicate with dw1000. I followed the example code from
(https://www.decawave.com/software/).
More specific my code is:

port_SPIx_clear_chip_select(); // => HAL_GPIO_WritePin(DW_NSS_GPIO_Port, DW_NSS_Pin, GPIO_PIN_RESET);
Sleep (100);
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_128;
HAL_SPI_Init(&hspi1);
reset_DW1000(); /* Target specific drive of RSTn line into DW1000 low for a period. */
Sleep(100);

if (dwt_initialise(DWT_LOADNONE) == DWT_ERROR)
{…}

But the dwt_initialise(DWT_LOADNONE) return 0xfff
Can you help me please?

L

1 Like

So i should, use the address 0x21 ?

If you are getting values of 0xffff back then that implies a fundamental issue with the SPI bus. The bus normally idles high so 0xff is the default value if the DW1000 doesn’t respond.

Check voltage levels and connections, SPI mode and speed, the chip select status etc…
Issues with the DW1000 clock and power can also cause this issue.

Ideally put an oscilloscope on the MISO line and see if there is anything there at all. If there is something there then it’s a SPI bus setup issue if your code isn’t seeing it. If there is nothing there then check CS, MISO and SCLK and check they are acting as expected. If not then fix your SPI settings. If the bus out of your processor looks good but there is nothing coming out of the DW1000 then check the DW1000 clock, reset and all the power pins to make sure they are as expected.

2 Likes

Ok thank you very much, i am gonna check it!!

image
main reason is the voltage of the vddldoa, vddldod. please check it, it must be high(1.8~3.3v).