cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Formula for converting RAW RSSI value in dBm

DLan.1
Associate II

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 

This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
Sean Park
ST Employee
  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.

View solution in original post

9 REPLIES 9

is there nothing in the datasheet about this?

or the documentation of ACI_HAL_READ_RAW_RSSI  ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
DLan.1
Associate II

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

Sean Park
ST Employee
  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.

@Sean Park​ - even ST Employees don't know how to properly post source code to their own forum? :\

0693W000008xsqBQAQ.png

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I'm sorry. thanks for pointing out

DLan.1
Associate II

Sincerely thank you for your kind solution.

Sincerely yours,

David

@DLan.1​ - Please mark the solution:

0693W000008y9fZQAQ.png

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Dear Sir,

Thank you for your kind help.

Dear Sir,

Thank you for your kind help.

Sincerely yours,

David