We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e82ca1 commit d43dcecCopy full SHA for d43dcec
examples/Peripherals/ADC/Internal_channels/Internal_channels.ino
@@ -54,6 +54,13 @@ void setup() {
54
55
static int32_t readVref()
56
{
57
+#ifdef STM32U0xx
58
+ /* On some devices Internal voltage reference calibration value not programmed
59
+ during production and return 0xFFFF. See errata sheet. */
60
+ if ((uint32_t)(*VREFINT_CAL_ADDR) == 0xFFFF) {
61
+ return 3300U;
62
+ }
63
+#endif
64
#ifdef __LL_ADC_CALC_VREFANALOG_VOLTAGE
65
#ifdef STM32U5xx
66
return (__LL_ADC_CALC_VREFANALOG_VOLTAGE(ADC1, analogRead(AVREF), LL_ADC_RESOLUTION));
0 commit comments