Fixed bug #1126.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_20.3.x@13882 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
f9eb33fb33
commit
3fe515416b
|
@ -171,12 +171,16 @@ static void adc_lld_calibrate(ADCDriver *adcp) {
|
||||||
while ((adcp->adcm->CR & ADC_CR_ADCAL) != 0)
|
while ((adcp->adcm->CR & ADC_CR_ADCAL) != 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
osalSysPolledDelayX(OSAL_US2RTC(STM32_HCLK, 20));
|
||||||
|
|
||||||
/* Single-ended calibration for master ADC.*/
|
/* Single-ended calibration for master ADC.*/
|
||||||
adcp->adcm->CR = ADC_CR_ADVREGEN;
|
adcp->adcm->CR = ADC_CR_ADVREGEN;
|
||||||
adcp->adcm->CR = ADC_CR_ADVREGEN | ADC_CR_ADCAL;
|
adcp->adcm->CR = ADC_CR_ADVREGEN | ADC_CR_ADCAL;
|
||||||
while ((adcp->adcm->CR & ADC_CR_ADCAL) != 0)
|
while ((adcp->adcm->CR & ADC_CR_ADCAL) != 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
osalSysPolledDelayX(OSAL_US2RTC(STM32_HCLK, 20));
|
||||||
|
|
||||||
#if STM32_ADC_DUAL_MODE
|
#if STM32_ADC_DUAL_MODE
|
||||||
osalDbgAssert(adcp->adcs->CR == ADC_CR_ADVREGEN, "invalid register state");
|
osalDbgAssert(adcp->adcs->CR == ADC_CR_ADVREGEN, "invalid register state");
|
||||||
|
|
||||||
|
@ -186,11 +190,15 @@ static void adc_lld_calibrate(ADCDriver *adcp) {
|
||||||
while ((adcp->adcs->CR & ADC_CR_ADCAL) != 0)
|
while ((adcp->adcs->CR & ADC_CR_ADCAL) != 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
osalSysPolledDelayX(OSAL_US2RTC(STM32_HCLK, 20));
|
||||||
|
|
||||||
/* Single-ended calibration for slave ADC.*/
|
/* Single-ended calibration for slave ADC.*/
|
||||||
adcp->adcs->CR = ADC_CR_ADVREGEN;
|
adcp->adcs->CR = ADC_CR_ADVREGEN;
|
||||||
adcp->adcs->CR = ADC_CR_ADVREGEN | ADC_CR_ADCAL;
|
adcp->adcs->CR = ADC_CR_ADVREGEN | ADC_CR_ADCAL;
|
||||||
while ((adcp->adcs->CR & ADC_CR_ADCAL) != 0)
|
while ((adcp->adcs->CR & ADC_CR_ADCAL) != 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
osalSysPolledDelayX(OSAL_US2RTC(STM32_HCLK, 20));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** 20.3.3 ***
|
*** 20.3.3 ***
|
||||||
|
- FIX: Fixed STM32 ADCv3 hangin on initialization (bug #1126).
|
||||||
- FIX: Fixed I2S-related problems in STM32F4xx registry (bug #1124).
|
- FIX: Fixed I2S-related problems in STM32F4xx registry (bug #1124).
|
||||||
- FIX: Fixed STM32 EXTIv1 driver unable to enable/disable fixed lines
|
- FIX: Fixed STM32 EXTIv1 driver unable to enable/disable fixed lines
|
||||||
(bug #1123).
|
(bug #1123).
|
||||||
|
|
Loading…
Reference in New Issue