internal ADC channels ?
Posted: Tue Jul 16, 2024 2:28 pm
Hello,
I want to try out the ADC internal channels example on a STM32G0B1CBT6
In example are some definitions:
In datasheet I found chapters:
5.3.4 Embedded voltage reference
5.3.21 Temperature sensor characteristics
5.3.22 VBAT monitoring characteristics
So:
a) VTEMP is "voltage at 30°C" - for this MCU 0,76 V?
b) AVG_SLOPE 2500 means 2,5 mV/°C?
c) VREFINT is the typical "internal reference voltage" - for this MCU 1,212 V
But there is no CALX_TEMP in datasheet.
Is is simply the temperature, for which VTEMP is valid - so 25°C or 30°C
BTW: I know from reference manual RM0444 chapter 15.10 Battery voltage monitoring there is a voltage divider. For STM32G0B1CBT6 it is Vbat/3. And I think some MCU have a divider by 4 - that's nothing I have to setup for my MCU?
I want to try out the ADC internal channels example on a STM32G0B1CBT6
In example are some definitions:
Code: Select all
/* Values available in datasheet */
#if defined(STM32C0xx)
#define CALX_TEMP 30
#else
#define CALX_TEMP 25
#endif
#if defined(STM32C0xx)
#define VTEMP 760
#define AVG_SLOPE 2530
#define VREFINT 1212
#elif defined(STM32F1xx)
#define VTEMP 1430
#define AVG_SLOPE 4300
#define VREFINT 1200
#elif defined(STM32F2xx) || defined(STM32F4xx)
#define VTEMP 760
#define AVG_SLOPE 2500
#define VREFINT 1210
#endif
5.3.4 Embedded voltage reference
5.3.21 Temperature sensor characteristics
5.3.22 VBAT monitoring characteristics
So:
a) VTEMP is "voltage at 30°C" - for this MCU 0,76 V?
b) AVG_SLOPE 2500 means 2,5 mV/°C?
c) VREFINT is the typical "internal reference voltage" - for this MCU 1,212 V
But there is no CALX_TEMP in datasheet.
Is is simply the temperature, for which VTEMP is valid - so 25°C or 30°C
BTW: I know from reference manual RM0444 chapter 15.10 Battery voltage monitoring there is a voltage divider. For STM32G0B1CBT6 it is Vbat/3. And I think some MCU have a divider by 4 - that's nothing I have to setup for my MCU?