Skip to main content
Associate II
November 6, 2024
Solved

Tx radio power on STM32 Nucleo WBA55CG using Zephyr

  • November 6, 2024
  • 3 replies
  • 2083 views

Hi,

 

I am using the STM32 Nucleo WBA52CG evaluation board and programming it using Zephyr v3.7.0 and am looking how to set the Tx output power of the BLE radio. Are there any configs available in Zephyr for the same? 

 

If not, alternatively please suggest a way to do this. I want to configure the Tx output power of the radio to +5 dBm.

 

Thanks, Kaiwalya

 

 

 

Best answer by STTwo-32

Hello @BKaiwalya 

Could you please change :

    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x0F;
    /* Deprecated and ignored */
    param->value[1= 0x00;
 
To :
    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x14;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a -5 dBm
Or 
  /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x1E;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a 5 dBm
  
Best Regards.
STTwo-32
 

3 replies

STTwo-32
Technical Moderator
November 7, 2024

Hello @BKaiwalya and welcome to the ST Community.

I'm checking this internally (throw internal ticket number 195885) and I will be back to you soon with an answer.

Best Regards.

STTwo-32

STTwo-32
Technical Moderator
November 7, 2024

Hello @BKaiwalya 

Could you try to use the same implementation of the Zephyr Project zephyrproject-rtos/zephyr: Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. and replace the zephyr/samples/bluetooth/peripheral_hr/src/main.c at main · zephyrproject-rtos/zephyr by the attached main.c file (including a patch).

Please provide feedback as soon as you have tested this application.

Best Regards.

STTwo-32

BKaiwalyaAuthor
Associate II
November 7, 2024

Hi,

 

Thanks for providing the quick patch.I tried it and it gives me the following output on console:

 

Setting PA output level to : 0x0f

Current TX power level in dBm : -10

Is this expected?

 

However, I would like to set the Tx output power to +5 dBm, what do I need to configure in param here and where can I find the guide for it:

param = net_buf_add(buf, sizeof(*param));
 
    /* See STM32WBA table conversion in Annex A */
    param->value[0] = 0x0F;
    /* Deprecated and ignored */
    param->value[1] = 0x00;
 
?
STTwo-32
STTwo-32Best answer
Technical Moderator
November 7, 2024

Hello @BKaiwalya 

Could you please change :

    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x0F;
    /* Deprecated and ignored */
    param->value[1= 0x00;
 
To :
    /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x14;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a -5 dBm
Or 
  /* See STM32WBA table conversion in Annex A */
    param->value[0= 0x1E;
    /* Deprecated and ignored */
    param->value[1= 0x00;
To have a 5 dBm
  
Best Regards.
STTwo-32
 
BKaiwalyaAuthor
Associate II
November 7, 2024

Hi,

 

using 

    /* See STM32WBA table conversion in Annex A */
    param->value[0] = 0x1E;
    /* Deprecated and ignored */
    param->value[1] = 0x00;
 
I could get the Tx output power to +5dBm:output from console
 
Current TX power level in dBm : 5
STTwo-32
Technical Moderator
November 7, 2024

The values for each power are available here. You can download this web page and open it to have the annexe table.

I've added this link to my post of solution. And added the necessary senario to my command. If you find that our support is helpful. Please select the original answer as best answer.

ST Community is always here for you.

Best Regards.

STTwo-32