Skip to main content
Associate II
July 24, 2026
Question

STM32WL55 Power issue

  • July 24, 2026
  • 2 replies
  • 40 views

I am working on STM32WL55 dual core in which the current consumption is as not as expected as according to the datasheet. It is hardcoded for high power only. and the current consumption is coming for +17dBm and +14dBm as expected which is 58mA and 45mA approax but when switching to the +20dBm and +22dBm it is getting capped at 68mA only. It is not going above 68mA at any way. I have hardcoded it to 22dBm but it is still getting capped to 68mA only. I want to do changes in the code in such a way that the current consumption changes. what are the possible reasons of it and what are the functions where the code modification can help in changing the current consumption. Is there that ST has capped it to +18dBm or +17dBM  and will never work above it?

 

void SUBGRF_SetTxParams( uint8_t paSelect, int8_t power, RadioRampTimes_t rampTime )

{

uint8_t buf[2];

int32_t max_power;



if (paSelect == RFO_LP)

{

max_power = RBI_GetRFOMaxPowerConfig(RBI_RFO_LP_MAXPOWER);

if (power > max_power)

{

power = max_power;

}

if (max_power == 14)

{

SUBGRF_SetPaConfig(0x04, 0x00, 0x01, 0x01);

power = 0x0E - (max_power - power);

}

else if (max_power == 10)

{

SUBGRF_SetPaConfig(0x01, 0x00, 0x01, 0x01);

power = 0x0D - (max_power - power);

}

else /*default 15dBm*/

{

SUBGRF_SetPaConfig(0x07, 0x00, 0x01, 0x01);

power = 0x0E - (max_power - power);

}

if (power < -17)

{

power = -17;

}

SUBGRF_WriteRegister(REG_OCP, 0x18); /* current max is 80 mA for the whole device*/

}

else /* rfo_hp*/

{

/* WORKAROUND - Better Resistance of the RFO High Power Tx to Antenna Mismatch, see STM32WL Erratasheet*/

SUBGRF_WriteRegister(REG_TX_CLAMP, SUBGRF_ReadRegister(REG_TX_CLAMP) | (0x0F << 1));

/* WORKAROUND END*/

max_power = RBI_GetRFOMaxPowerConfig(RBI_RFO_HP_MAXPOWER);

if (power > max_power)

{

power = max_power;

}

if (max_power == 20)

{

SUBGRF_SetPaConfig(0x03, 0x05, 0x00, 0x01);

power = 0x16 - (max_power - power);

}

else if (max_power == 17)

{

SUBGRF_SetPaConfig(0x02, 0x03, 0x00, 0x01);

power = 0x16 - (max_power - power);

}

else if (max_power == 14)

{

SUBGRF_SetPaConfig(0x02, 0x02, 0x00, 0x01);

power = 0x0E - (max_power - power);

}

else /*22dBm*/

{

SUBGRF_SetPaConfig(0x04, 0x07, 0x00, 0x01);

power = 0x16 - (max_power - power);

}

if (power < -9)

{

power = -9;

}

SUBGRF_WriteRegister(REG_OCP, 0x38); /*current max 160mA for the whole device*/

}

buf[0] = power;

buf[1] = (uint8_t)rampTime;

SUBGRF_WriteCommand(RADIO_SET_TXPARAMS, buf, 2);

}



static void RadioInit( RadioEvents_t *events )

{

RadioEvents = events;



SubgRf.RxContinuous = false;

SubgRf.TxTimeout = 0;

SubgRf.RxTimeout = 0;

/*See STM32WL Errata: RadioSetRxDutyCycle*/

SubgRf.RxDcPreambleDetectTimeout = 0;

#if( RADIO_LR_FHSS_IS_ON == 1 )

SubgRf.lr_fhss.is_lr_fhss_on = false;

#endif /* RADIO_LR_FHSS_IS_ON == 1 */

SUBGRF_Init( RadioOnDioIrq );

/*SubgRf.publicNetwork set to false*/

SubgRf.PublicNetwork.Current = false;

SubgRf.PublicNetwork.Previous = false;



RADIO_IRQ_PROCESS_INIT();



SUBGRF_SetRegulatorMode( );



SUBGRF_SetBufferBaseAddress( 0x00, 0x00 );

SUBGRF_SetTxParams( RFO_HP, 0, RADIO_RAMP_200_US );

SUBGRF_SetDioIrqParams( IRQ_RADIO_ALL, IRQ_RADIO_ALL, IRQ_RADIO_NONE, IRQ_RADIO_NONE );



RadioSleep();

// Initialize driver timeout timers

TimerInit( &TxTimeoutTimer, RadioOnTxTimeoutIrq );

TimerInit( &RxTimeoutTimer, RadioOnRxTimeoutIrq );

TimerStop( &TxTimeoutTimer );

TimerStop( &RxTimeoutTimer );

}

What are the possibilities in the code for the above situation

 

 

2 replies

mƎALLEm
ST Technical Moderator
July 24, 2026

Hello ​@Somya ,

1- Your thread is not posted in the correct forum board. Your question is about STM32WL55 device which is a wireless MCU. So “STM32 MCUs Wireless” forum musty be used in your cvase. I’ve already moved it.

2- Please use Code button to paste your code:

When you started this post you would see this pop-up: did you see it?

I’ve edited you post to comply with this community rule. Please also read: How to write your question to maximize your chances to find a solution

Thank you for your understanding

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
SomyaAuthor
Associate II
July 25, 2026

Thank You so much for clarification. 

ST Technical Moderator
July 24, 2026

Hi Somya,

 

using a MB1389E Nucleo Board and LoRaWAN_AT_Slave Application Example, you can get around 21 dBm. If you want to get +22 dBm I suggest you double checking the BOM you are using.

Here are the AT command I used for the test (I set the US band and not the EU to reach that power):

 

AT+TCONF=868000000:22:50000:50000:4/5:0:0:0:16:25000:2:3

OK

AT+TCONF=?

1: Freq= 868000000 Hz

2: Power= 22 dBm

3: Bandwidth= 50000 Hz

4: FSK datarate= 50000 bps

5: Coding Rate not applicable

6: LNA State= 0

7: PA Boost State= 0

8: modulation FSK

9: Payload len= 16 Bytes

10: FSK deviation= 25000 Hz

11: LowDRopt not applicable

12: FSK gaussian BT product= 3

OK

AT+TTONE

363s378:Tx FSK Test

AT+BAND=?

8:US915

 



BR,
Filippo

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
SomyaAuthor
Associate II
July 25, 2026

I’ll definitely try it and sure i’ll double check BOM.
Thanks for replying. It is actually helpful.