Skip to content

Commit c9adabc

Browse files
committed
stm32/adc: Fix core temperature reading on WB55.
It needs a divisor of 100 because the calibration temperatures are 30 and 130 degrees, similar to the H5. Signed-off-by: Damien George <damien@micropython.org>
1 parent 841439d commit c9adabc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/stm32/adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ float adc_read_core_temp_float(ADC_HandleTypeDef *adcHandle) {
923923
return 0;
924924
}
925925
float core_temp_avg_slope = (*ADC_CAL2 - *ADC_CAL1) / 100.0f;
926-
#elif defined(STM32H5)
926+
#elif defined(STM32H5) || defined(STM32WB)
927927
int32_t raw_value = adc_config_and_read_ref(adcHandle, ADC_CHANNEL_TEMPSENSOR);
928928
float core_temp_avg_slope = (*ADC_CAL2 - *ADC_CAL1) / 100.0f;
929929
#else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy