Distance measurements (Nordic Distance Measurement Library) can result in a hung state, but only on the DM_ROLE_INITIATOR role device

I am an experienced user of the Nordic Distance Measurement Library and I am encountering an issue where the device that is assuming the role of the DM_ROLE_INITIATOR can hang at random, but when it occurs, it will always be at the completion of a distance measurement - where there appears to be a timeout on the RX part (as shown below on the left) and the device never reaches the TX part.



Not all 'timeout' waveforms result in a hung state, but shown below is an example of what occurs just prior to the hung state when current draw then remains high (multiple mAs).



Shown below is the image above, but zoomed out.



When I swap the role to DM_ROLE_REFLECTOR (and no other changes to the code are made), then the device never runs into the issue (but of course, the other device that is now the DM_ROLE_INITIATOR will eventually encounter the issue instead).

The issue doesn't relate to synchronization, as both devices are happily synchronized and performing multiple distance measurements up until this issue occurs.

I am using multiple nRF52833 devices (including a nRF52833-DK on which the issue can occur) and using SDK v2.8.0 and toolchain v2.8.0.

My hunch is that the code in the nrf_dm/dm module that listens for a transmission from the reflector is designed to timeout if that transmission fails to show, but sometimes this timeout is not being handled correctly. In other words, in all examples of this issue, the initial ranging is successful, but the tail end of the distance measurement seems to fail.

Related