DWM1001 module failure after upd_rate_cfg call through TLV SPI api

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Hi DecaWave Team,[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I have a strange behavior of my DWM1001 module after I called the [/font][/color][color=#073763][font=monospace, monospace]upd_rate_set function.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Before then everything worked fine.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I have two modules, one on the DEV board configured as anchor and one [/font][/color][color=#073763][font=monospace, monospace]on a custom board configured as [/font][/color][color=#073763][font=monospace, monospace]tag. [/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I called the config commands days before [/font][/color][color=#073763][font=monospace, monospace]and tested everything the past days without any kind of problems.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]The modules joined and I read successfully from my tag dmw_ver_get, dmw_cfg_get, [/font][/color][color=#073763][font=monospace, monospace]dmw_loc_get (distance only), [/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]dwm_status_get and dwm_upd_rate_get.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I have fw 1.5.1.1, cfg 10700 and hw DECA002A, accel and ble enabled, [/font][/color][color=#073763][font=monospace, monospace]firmware update disabled, security as [/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]default, low power not enabled.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Today for the fist time I called the upd_rate_set to change its default [/font][/color][color=#073763][font=monospace, monospace]parameters to 500mS and 1000mS. I [/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]always read 100mS and 10000mS.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]After reading again the cfg_rate_get I noticed that nothing has changed, the [/font][/color][/font][/size][/color][color=#073763][size=small][font=monospace, monospace]call has not been accepted. [/font][/size][/color]
[color=#073763][size=small][font=monospace, monospace]Debugging further I noticed that every time I call that [/font][/size][/color][color=#073763][size=small][font=monospace, monospace]command, the LMH_WaitForRx routine went into timeout. [/font][/size][/color]
[color=#073763][size=small][font=monospace, monospace]Here generally I have a loop of [/font][/size][/color][color=#073763][size=small][font=monospace, monospace]255 * 1mS to re[/font][/size][/color][color=#073763][size=small][font=monospace, monospace]ad/wait for the length value.[/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]In the meantime, reading further the version, configuration, location, status and upd_rate[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]through a loop of a two second interval and logging the results, I noticed that the tag[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]lost connection with the anchor. No location data was available and no uwb joined. [/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Resetting, power off and on tag and anchor and starting again didn´t changed anything.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I tried to resend the upd_rate_cfg command while increasing the timeout up to 1 second[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]without any success.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Debugging my code that I wrote based on your example host api, I found out that I might[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]have incidentally sent the SPI command 32 00 04 00 instead of only 04 00 for the[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]upd_rate_get command. In that case I got always the response from the 32 00 command[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]that corresponds to the status_get call. But maybe something internally in the module[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]went wrong caused by that wrong command?[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Debugging further I also noticed that the tag configuration has changed. uwb_mode went[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]to UWB_MODE_PASSIVE. Before that I have set and always read UWB_MODE_ACTIVE.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace][color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Btw. in your source code example /dwm1001_host_api/examples/ex1…/anchor/anchor_cfg.c[/font][/color][/font][/size][/color][/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]there is the line “cfg_anchor.common.uwb_mode = DWM_UWB_MODE_OFF” that caused initially [/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace][color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]my firmware not to work as the anchor always remained off. I changed that.[/font][/color][/font][/size][/color][/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]As mentioned above the tag is not joining anymore the uwb network. My next attempt will[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]be to resent the cfg_set command, trying to bring it back to ACTIVE mode and in the worst case[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]assemble a new DWM1001 module on my board. I also could try to re-flash the firmware.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Here some more testing and hints that could help you to reconstruct what might have[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]“killed” my DWM1001 tag module.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]A) tag powered on , anchor powered off[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I read successfully dmw_ver_get, dmw_cfg_get, dmw_loc_get, dwm_status_get and dwm_upd_rate_get.[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]No error or timeout in the SPI communication api. All status returns are OK (0).[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Now I power on my anchor. All keeps the same.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]B) tag powered off, anchor powered on[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Now I power on my tag. All keeps the same. [/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]C) coming from A) or B) with tag powered on and anchor powered on[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]I now power off my anchor, wait some time, and power on again the anchor.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]After some seconds my tag goes into tilt, first one and then more of my read commands[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]return 1 (error), all SPI read attempts are stuck in the LMH_WaitForRx loop and go[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]into timeout. Always.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]After powering off both modules, all starts again from A. My tag module is not completely[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]damaged, but it seams that under certain circumstances, while initiating the uwb network[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]and exchanging data, something “hangs” or blocks completely the SPI api communication[/font][/color][/font][/size][/color]
[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]in my tag.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Hope that info is useful and might help you to understand how I “killed” my module. [/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Any further comments or suggestions would be appreciated.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Thanks a lot for your support.[/font][/color][/font][/size][/color]

[color=#222222][size=small][font=arial, sans-serif][color=#073763][font=monospace, monospace]Peter[/font][/color][/font][/size][/color]

Hi,
this sounds interesting. Can you repeat it?

Regards,
drg