Hello,
I managed to run the examples for nrf54l15 channel_sounding_ras_initiator.c and reflector on my custom hardware boards. I changed the overlay files to use my own LED and UART for logging. I have only one RF antenna. I also do not have an external LF 32khz crystal, so I added these lines to my prj.conf:
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
After starting, I get some results from the initiator, but it does not work 100 percent as I expect.
At the beginning, I get this log:
D: On-demand Ranging Data notification received
D: On-demand Ranging Data notification received
D: On-demand Ranging Data notification received
D: Ack Ranging data for counter 2
I: Distance estimates on antenna path 0: ifft: 0.785345, phase_slope: 0.720688, rtt: 8.246675
I: Sleeping for a few seconds...
I: Distance estimates on antenna path 0: ifft: 0.785345, phase_slope: 0.720688, rtt: 8.246675
I: Sleeping for a few seconds...
I: Ranging data overwritten 3
D: Get Ranging Data Success
...
I: Distance estimates on antenna path 0: ifft: 0.785345, phase_slope: 0.720688, rtt: 8.246675
I: Sleeping for
D: On-demand Ranging Data notification received
D: Ack Ranging data for counter 4
But when I move the reflector farther away, it starts printing this, and the measured distance does not change anymore, even if I move the reflector:
I: Sleeping for a few seconds...
I: Ranging data overwritten 211
I: Distance estimates on antenna path 0: ifft: 0.320133, phase_slope: 1.553719, rtt: 7.424473
I: Sleeping for a few seconds...
I: Ranging data overwritten 212
I: Distance estimates on antenna path 0: ifft: 0.320133, phase_slope: 1.553719, rtt: 7.424473
I: Sleeping for a few seconds...
I: Ranging data overwritten 213
-
What does "Ranging data overwritten" mean here?
-
If I change the main loop delay from the original 5 seconds to for example 200 ms, I never get any measured distance in the log anymore. Why should changing the sleep time matter if the code just checks
if (buffer_num_valid != 0)
?
It is also strange why there is such a big difference between the results of different methods (rtt, phase, slope, etc.). Could this be caused by unsuitable hardware - for example the antenna?
My HW board:
Thank you for any help.
Jan.