Skip to main content
Associate II
May 13, 2026
Solved

Read Vcore Channel (ADC4) with USE TEMPERATURE BASED RADIO CALIBRATION active

  • May 13, 2026
  • 1 reply
  • 94 views

Hi,

 

I'm using the STM32WBA54KG microcontroller to comunicate by BLE.

 

In STM32CubeMX (v6.13.0), I have actived the STM32_WPAN packet and the configuration "USE_TEMPERATURE_BASED_RADIO_CALIBRATION" is "YES".

I need to read the Vcore channel to know if the battery is low.

 

How can I do it?

 

Thanks.

Best answer by Petr DAVID

Hello Carlos,

You did not mention how often you would like to check the voltage, or whether you have any specific constraints. Based on that, I would suggest considering these two options:

  1. Use the existing adc_ctrl module
    This module is already available in your project for the temperature-based radio calibration. It also includes the ADCCTRL_RequestCoreVoltage function.
    If you would like to see an example of how it is used, you can look at the TEMPMEAS_RequestTemperatureMeasurement function, which periodically measures the temperature for calibration purposes.

  2. Handle the ADC manually
    You can also manage the ADC yourself. In this case, you would need to include the temperature sensor reading in your ADC conversion sequence and store the measured value. Then, when the low-level (LL) driver requests the temperature value, you can simply return the stored value instead of starting a new ADC conversion at that moment.
    This approach gives you full control over the ADC while keeping the temperature measurement from affecting other ADC operations.

Please let me know if you would like to discuss either option further or if you have any additional questions.

1 reply

Petr DAVID
ST Employee
May 18, 2026

Hello Carlos,

You did not mention how often you would like to check the voltage, or whether you have any specific constraints. Based on that, I would suggest considering these two options:

  1. Use the existing adc_ctrl module
    This module is already available in your project for the temperature-based radio calibration. It also includes the ADCCTRL_RequestCoreVoltage function.
    If you would like to see an example of how it is used, you can look at the TEMPMEAS_RequestTemperatureMeasurement function, which periodically measures the temperature for calibration purposes.

  2. Handle the ADC manually
    You can also manage the ADC yourself. In this case, you would need to include the temperature sensor reading in your ADC conversion sequence and store the measured value. Then, when the low-level (LL) driver requests the temperature value, you can simply return the stored value instead of starting a new ADC conversion at that moment.
    This approach gives you full control over the ADC while keeping the temperature measurement from affecting other ADC operations.

Please let me know if you would like to discuss either option further or if you have any additional questions.

Associate II
May 18, 2026

Thank you so much.

 

I have used the adc_ctrl module and I have read the Vref channel.