2022-07-11 01:55 AM
Dear Sir,
I'm new to STM32WB55 and using STM32CubeMonitor-RF.
We see the value of RAW RSSI from the Value parameter of Command Complete of ACI_HAL_READ_RAW_RSSI in STM32CubeMonitor-RF and it results in the RSSI dBm.
Such as:
(RAW RSSI) --> (RSSI dBm)
0x000006 --> -107.00 dBm
0x000007 --> -107.00 dBm
0x00000A --> -106 dBm
0x00000B --> -105.00 dBm
0x000012 --> -103.00 dBm
0x000014 --> -102.00 dBm
0x000017 --> -100.00 dBm
0x00001C --> -98.00 dBm
0x00001D --> -98.00 dBm
0x000021 --> -97.00 dBm
0x000024 --> -97.00 dBm
0x000029 --> -96.00 dBm
...
0x0001A9 --> -75.00 dBm
May we ask you about the formula for converting RAW RSSI value in dBm? Thank you.
Sincerely yours,
David
Solved! Go to Solution.
2022-07-11 08:59 PM
int32_t rsi_dbm;
uint32_t rssi_int16;
uint32_t reg_agc;
// extract the data rssi_int16 + agc
rssi_int16 = ((rssi_level[0]) >> 16) & 0xFFFFU ;
reg_agc = (rssi_level[1]) & 0xffU;
// check if rssi is too low
if((rssi_int16 == 0U) || (reg_agc > 0xbU))
{
rsi_dbm = 127 ;
}
else
{
rsi_dbm = (int32_t)reg_agc * 6 - 127 ;
while(rssi_int16 > 30U)
{
rsi_dbm += 6 ;
rssi_int16 = (rssi_int16 >> 1) ;
}
rsi_dbm += (int32_t)(uint32_t)((417U*rssi_int16 + 18080U)>>10) ;
}
// result is in rsi_dbm ;
Ex) RSSI Level : 0x0701BF
rssi_int16 = 0x01BF (lower 2 bytes of RSSI Level value)
reg_agc = 0x07 (High 1 byte of RSSI Level value)
result -> -33.00dBm
You can refer to the above formula.
2022-07-11 03:15 AM
is there nothing in the datasheet about this?
or the documentation of ACI_HAL_READ_RAW_RSSI ?
2022-07-11 05:22 PM
We noticed the description in an5270 adhere:
This command of ACI_HAL_READ_RAW_RSSI returns the raw value of the RSSI
and an5378 for Figure 10. ACI_HAL_READ_RAW_RSSI in STM32CubeMonitor-RF packet rate exchange configuration.
We can see the ACI_HAL_READ_RAW_RSSI Command Complete returns the raw value of the RSSI and STM32CubeMonitor-RF performs an RSSI dBm measurement.
Is there datasheet about the Formula for converting the RAW RSSI value in dBm? Thank you.
Sincerely yours,
David
2022-07-11 08:59 PM
int32_t rsi_dbm;
uint32_t rssi_int16;
uint32_t reg_agc;
// extract the data rssi_int16 + agc
rssi_int16 = ((rssi_level[0]) >> 16) & 0xFFFFU ;
reg_agc = (rssi_level[1]) & 0xffU;
// check if rssi is too low
if((rssi_int16 == 0U) || (reg_agc > 0xbU))
{
rsi_dbm = 127 ;
}
else
{
rsi_dbm = (int32_t)reg_agc * 6 - 127 ;
while(rssi_int16 > 30U)
{
rsi_dbm += 6 ;
rssi_int16 = (rssi_int16 >> 1) ;
}
rsi_dbm += (int32_t)(uint32_t)((417U*rssi_int16 + 18080U)>>10) ;
}
// result is in rsi_dbm ;
Ex) RSSI Level : 0x0701BF
rssi_int16 = 0x01BF (lower 2 bytes of RSSI Level value)
reg_agc = 0x07 (High 1 byte of RSSI Level value)
result -> -33.00dBm
You can refer to the above formula.
2022-07-12 01:46 AM
@Sean Park - even ST Employees don't know how to properly post source code to their own forum? :\
2022-07-12 01:52 AM
I'm sorry. thanks for pointing out
2022-07-12 05:04 PM
Sincerely thank you for your kind solution.
Sincerely yours,
David
2022-07-13 01:04 AM
@DLan.1 - Please mark the solution:
2022-07-13 07:48 PM
Dear Sir,
Thank you for your kind help.
2022-07-13 07:51 PM
Dear Sir,
Thank you for your kind help.
Sincerely yours,
David