SPI data error with DWM3000

Hello,

I am currently working on my thesis and urgently need your help as I have been stuck on a problem for several days. I’m using the DWM3000 chip and an STM32L452C operating at 12 MHz. I am using the example from DecaWave (ex_05a_ds_twr_init and ex_05b_ds_twr_resp).

The problem is that the 9 byte in the message is corrupted, which means that the timestamps are not transmitted correctly. This results in strange numerical values that are either very large or negative. However, if I use the HAL_SPI from STM and not the self-written one from DecaWave, the frames are correct, but no numerical values come out.

Someone here describes the same problem, but his solution doesn’t work for me.

I would be very grateful if someone could explain to me why this problem occurs.

Kind regards
Selina

Not much to go on here. Perhaps you could answer:

  1. Can you share your port_set_dw_ic_spi_slowrate(), port_set_dw_ic_spi_fastrate() readtospi() and writetospi() functions?
  2. What SPI baud rate are you using?
  3. What do you mean by “no numerical values come out”?
  4. Is it just this “9 byte” which is suspect? Has every other byte always behaved the way you expect?