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 5bbe628 commit 1252221Copy full SHA for 1252221
targets/TARGET_STM/TARGET_STM32L0/analogin_device.c
@@ -172,6 +172,12 @@ uint16_t adc_read(analogin_t *obj)
172
173
HAL_ADC_ConfigChannel(&obj->handle, &sConfig);
174
175
+ /* need to wait for some stabilization time after setting the TSEN bit in the ADC_CCR
176
+ register to wake up the temperature sensor from power down mode */
177
+ if (sConfig.Channel == ADC_CHANNEL_TEMPSENSOR) {
178
+ wait_ms(20);
179
+ }
180
+
181
HAL_ADC_Start(&obj->handle); // Start conversion
182
183
// Wait end of conversion and get value
0 commit comments