Fixed bug #725.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9088 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
8464f9100e
commit
e0ed67de6b
|
@ -150,6 +150,14 @@ void adc_lld_init(void) {
|
||||||
|
|
||||||
/* Calibration procedure.*/
|
/* Calibration procedure.*/
|
||||||
rccEnableADC1(FALSE);
|
rccEnableADC1(FALSE);
|
||||||
|
|
||||||
|
/* CCR setup.*/
|
||||||
|
#if STM32_ADC_SUPPORTS_PRESCALER
|
||||||
|
ADC->CCR = STM32_ADC_PRESC << 18;
|
||||||
|
#else
|
||||||
|
ADC->CCR = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
osalDbgAssert(ADC1->CR == 0, "invalid register state");
|
osalDbgAssert(ADC1->CR == 0, "invalid register state");
|
||||||
ADC1->CR |= ADC_CR_ADCAL;
|
ADC1->CR |= ADC_CR_ADCAL;
|
||||||
osalDbgAssert(ADC1->CR != 0, "invalid register state");
|
osalDbgAssert(ADC1->CR != 0, "invalid register state");
|
||||||
|
@ -207,6 +215,13 @@ void adc_lld_stop(ADCDriver *adcp) {
|
||||||
|
|
||||||
dmaStreamRelease(adcp->dmastp);
|
dmaStreamRelease(adcp->dmastp);
|
||||||
|
|
||||||
|
/* Restoring CCR default.*/
|
||||||
|
#if STM32_ADC_SUPPORTS_PRESCALER
|
||||||
|
ADC->CCR = STM32_ADC_PRESC << 18;
|
||||||
|
#else
|
||||||
|
ADC->CCR = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Disabling ADC.*/
|
/* Disabling ADC.*/
|
||||||
if (adcp->adc->CR & ADC_CR_ADEN) {
|
if (adcp->adc->CR & ADC_CR_ADEN) {
|
||||||
adc_lld_stop_adc(adcp->adc);
|
adc_lld_stop_adc(adcp->adc);
|
||||||
|
|
|
@ -96,6 +96,8 @@
|
||||||
- RT: Merged RT4.
|
- RT: Merged RT4.
|
||||||
- NIL: Merged NIL2.
|
- NIL: Merged NIL2.
|
||||||
- NIL: Added STM32F7 demo.
|
- NIL: Added STM32F7 demo.
|
||||||
|
- HAL: Fixed prescaler not initialized in STM32 ADCv1 (bug #725)
|
||||||
|
(backported to 16.1.5).
|
||||||
- HAL: Fixed missing DAC section in STM32F072 mcuconf.h files (bug #724)
|
- HAL: Fixed missing DAC section in STM32F072 mcuconf.h files (bug #724)
|
||||||
(backported to 16.1.5).
|
(backported to 16.1.5).
|
||||||
- VAR: Fixed palSetMode glitching outputs (bug #723)(backported to 3.0.6
|
- VAR: Fixed palSetMode glitching outputs (bug #723)(backported to 3.0.6
|
||||||
|
|
Loading…
Reference in New Issue