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 <[email protected]>
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)