diff --git a/os/hal/platforms/STM32F3xx/adc_lld.c b/os/hal/platforms/STM32F3xx/adc_lld.c index e661b4b9c..35960d84d 100644 --- a/os/hal/platforms/STM32F3xx/adc_lld.c +++ b/os/hal/platforms/STM32F3xx/adc_lld.c @@ -152,14 +152,14 @@ static void adc_lld_analog_off(ADCDriver *adcp) { */ static void adc_lld_calibrate(ADCDriver *adcp) { - chDbgAssert(adcp->adcm->CR == 0, "adc_lld_calibrate(), #1", - "invalid register state"); + chDbgAssert(adcp->adcm->CR == ADC_CR_ADVREGEN_0, "adc_lld_calibrate(), #1", + "invalid register state"); adcp->adcm->CR |= ADC_CR_ADCAL; while ((adcp->adcm->CR & ADC_CR_ADCAL) != 0) ; #if STM32_ADC_DUAL_MODE - chDbgAssert(adcp->adcs->CR == 0, "adc_lld_calibrate(), #2", - "invalid register state"); + chDbgAssert(adcp->adcs->CR == ADC_CR_ADVREGEN_0, "adc_lld_calibrate(), #2", + "invalid register state"); adcp->adcs->CR |= ADC_CR_ADCAL; while ((adcp->adcs->CR & ADC_CR_ADCAL) != 0) ; diff --git a/testhal/STM32F0xx/ADC/main.c b/testhal/STM32F0xx/ADC/main.c index bdb8bed0f..90f34f775 100644 --- a/testhal/STM32F0xx/ADC/main.c +++ b/testhal/STM32F0xx/ADC/main.c @@ -127,7 +127,7 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /* - * Activates the ADC1 driver and the thermal sensor. + * Activates the ADC1 driver and the temperature sensor. */ adcStart(&ADCD1, NULL); adcSTM32SetCCR(ADC_CCR_VBATEN | ADC_CCR_TSEN | ADC_CCR_VREFEN); diff --git a/testhal/STM32F1xx/ADC/main.c b/testhal/STM32F1xx/ADC/main.c index 280a74451..3a9c62541 100644 --- a/testhal/STM32F1xx/ADC/main.c +++ b/testhal/STM32F1xx/ADC/main.c @@ -134,7 +134,7 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /* - * Activates the ADC1 driver and the thermal sensor. + * Activates the ADC1 driver and the temperature sensor. */ adcStart(&ADCD1, NULL); diff --git a/testhal/STM32F3xx/ADC/main.c b/testhal/STM32F3xx/ADC/main.c index ee5dfa922..4d4add7d6 100644 --- a/testhal/STM32F3xx/ADC/main.c +++ b/testhal/STM32F3xx/ADC/main.c @@ -146,7 +146,7 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /* - * Activates the ADC1 driver and the thermal sensor. + * Activates the ADC1 driver and the temperature sensor. */ adcStart(&ADCD1, NULL); // adcSTM32EnableTSVREFE(); diff --git a/testhal/STM32F4xx/ADC/main.c b/testhal/STM32F4xx/ADC/main.c index d08bef1cc..3499c304d 100644 --- a/testhal/STM32F4xx/ADC/main.c +++ b/testhal/STM32F4xx/ADC/main.c @@ -135,7 +135,7 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /* - * Activates the ADC1 driver and the thermal sensor. + * Activates the ADC1 driver and the temperature sensor. */ adcStart(&ADCD1, NULL); adcSTM32EnableTSVREFE(); diff --git a/testhal/STM32L1xx/ADC/main.c b/testhal/STM32L1xx/ADC/main.c index 140834f9c..46e39798c 100644 --- a/testhal/STM32L1xx/ADC/main.c +++ b/testhal/STM32L1xx/ADC/main.c @@ -138,7 +138,7 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); /* - * Activates the ADC1 driver and the thermal sensor. + * Activates the ADC1 driver and the temperature sensor. */ adcStart(&ADCD1, NULL); adcSTM32EnableTSVREFE();