cancel
Showing results for 
Search instead for 
Did you mean: 

RF transmit power on STM32WB with Zigbee stack

ABrua.1
Associate II

Hello,

The datasheet for STM32WB55RG (DS11929, 3.6.1 RF front-end block diagram, page 22) states that the output power is user programmable:

"In Transmit mode, the maximum output power is user selectable through the programmable LDO voltage of the power amplifier. A linearized, smoothed analog control offers clean power ramp-up."

The figure 5 in reference manual RM0434 shows a Max PA level input to the LDO but I can't find the register to set this value.0693W00000Bb3r6QAB.png 

How do I program the RF transmit power on a STM32WB55 ?

Thanks for considering my request.

1 ACCEPTED SOLUTION

Accepted Solutions
ABrua.1
Associate II

After a brief exchange with ST support:

  • TX power after reset is 0 dBm
  • name must be "wpan0"
  • tx_power is the level in dBm, in the range [-20, +6]

For example, to set the maximum tx power:

  if( ZbNwkIfSetTxPower(zigbee_app_info.zb, "wpan0", 6) ) {
    APP_DBG("Max tx power set");
  } else {
    APP_DBG("Error while setting tx power");
  }

View solution in original post

5 REPLIES 5
Vyacheslav
Senior II

tBleStatus aci_hal_set_tx_power_level( uint8_t En_High_Power, uint8_t PA_Level );

/* @param En_High_Power Enable High Power mode - Deprecated and ignored on

 *    STM32WB

 *    Values:

 *    - 0x00: Standard Power

 *    - 0x01: High Power

 *

* @param PA_Level Power amplifier output level. Output power is indicative and

 *    it depends on the PCB layout and associated

 *    components.Here the values are given at the IC pin

 *    Values:

 *    - 0x00: -40 dBm

 *    - 0x01: -20.85 dBm

 *    - 0x02: -19.75 dBm

 *    - 0x03: -18.85 dBm

 *    - 0x04: -17.6 dBm

 *    - 0x05: -16.5 dBm

 *    - 0x06: -15.25 dBm

 *    - 0x07: -14.1 dBm

 *    - 0x08: -13.15 dBm

 *    - 0x09: -12.05 dBm

 *    - 0x0A: -10.9 dBm

 *    - 0x0B: -9.9 dBm

 *    - 0x0C: -8.85 dBm

 *    - 0x0D: -7.8 dBm

 *    - 0x0E: -6.9 dBm

 *    - 0x0F: -5.9 dBm

 *    - 0x10: -4.95 dBm

 *    - 0x11: -4 dBm

 *    - 0x12: -3.15 dBm

 *    - 0x13: -2.45 dBm

 *    - 0x14: -1.8 dBm

 *    - 0x15: -1.3 dBm

 *    - 0x16: -0.85 dBm

 *    - 0x17: -0.5 dBm

 *    - 0x18: -0.15 dBm

 *    - 0x19: 0 dBm

 *    - 0x1A: +1 dBm

 *    - 0x1B: +2 dBm

 *    - 0x1C: +3 dBm

 *    - 0x1D: +4 dBm

 *    - 0x1E: +5 dBm

 *    - 0x1F: +6 dBm

*/

Thank you. I forgot to say I am using the Zigbee stack. I assume from your answer that the TX power is set by the M0 coprocessor and accessible only via the stack's specific API. Your answer hinted that I should look into the ZSDK API documentation (AN5500) where I found the following:

bool ZbNwkIfGetTxPower(struct ZigBeeT *zb, const char *name, int8_t *tx_power)
bool ZbNwkIfSetTxPower(struct ZigBeeT *zb, const char *name, int8_t tx_power)

Unfortunately, I can't find what's supposed to go in the parameter name. I tried to pass NULL assuming they may be a default behaviour. I also tried to pass a pointer to the value 0, because interfaces are refered to by index in ZbNlmeGetInterface().

I would also need to know how to transform tx_power to dBm. Shall I assume the scale is identical to that of the ACI interface?

A google search on the function name lead me to this unanswered thread: https://community.st.com/s/question/0D53W00000LEgFJSA1/how-did-settxpower-for-stm32wb55-run-zigbee

ABrua.1
Associate II

After a brief exchange with ST support:

  • TX power after reset is 0 dBm
  • name must be "wpan0"
  • tx_power is the level in dBm, in the range [-20, +6]

For example, to set the maximum tx power:

  if( ZbNwkIfSetTxPower(zigbee_app_info.zb, "wpan0", 6) ) {
    APP_DBG("Max tx power set");
  } else {
    APP_DBG("Error while setting tx power");
  }

NZube.2
Associate

I used the code in this post to increase and decrease the TXPower setting. I am able to write a value, and read back that value using ZbNwkIfGetTxPower and ZbNwkIfSetTxPower.

However, I am not seeing a resulting increase or decrease when measuring the output power with spectrum analyzer. Is there a reason I am not able to control the power?

Perhaps Zigbee can't be running when this is changed?

I have the SMPS set to 1.9V and 220mA using the following code and verified the SMPS voltage with a mulitmeter, so I believe it is set correctly.

LL_PWR_SMPS_SetStartupCurrent(LL_PWR_SMPS_STARTUP_CURRENT_220MA);

LL_PWR_SMPS_SetOutputVoltageLevel(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V90);

LL_PWR_SMPS_Enable();

I am modifying the P-Nucleo Dongle Zigbee_OnOff_Client_Router example.

I have flashed the stm32wb5x_Zigbee_FFD_FW.bin, version 1.13.2, but version 1.13.1 showed the same behavior

I have been able to load the BLE_ptpClient and BLE_ptpServer examples with the stm32wb5x_BLE_Stack_full_fw.bin binaries.

With this configuration, I am able to use the aci_hal_set_tx_power_level() to set a desired power level and see that level reflected in the measurement on a spectrum analyzer. Therefore my hardware setup is valid, and I am not seeing TX power changing in the zigbee demo.