Problem with RSSI Calculation on QM33120WDK1

Hi,

I have extended the rx_diagnostics.c application in ex_02c_rx_diagnostics for RSSI measurements.

I added the following

dwt_readdiagnostics_acc(&rx_cir_diag, DWT_ACC_IDX_IP_M);
dwt_calculate_first_path_power(&rx_cir_diag, DWT_ACC_IDX_IP_M, rssi_ptr);

However, the values calculated (rssi_ptr) are strange. I see values in the range of -14734, to -14508 for a distance of 60CM.

Am I doing something wrong here? Is there some configuration missing?

Hello, according to the API guide, the rssi is provided in Q8.8 format. So, converted in integer you should see -57.5546875 Which is a pretty good value.

Thanks for the reply!!. May I know how did you convert the value? Also, is it in dBm ?

Yes, it is in dBm.

The Q format is fixed point format. You can take a look at https://www.allaboutcircuits.com/technical-articles/fixed-point-representation-the-q-format-and-addition-examples/ for more details.