mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Fix ADC clock speed to be within specification
ADC clock speed may be slightly higher, but there is no benefit in current code
This commit is contained in:
parent
bebf43d568
commit
6888de5192
1 changed files with 3 additions and 0 deletions
|
@ -117,6 +117,9 @@ void adcInit(drv_adc_config_t *init)
|
|||
adcConfig[ADC_CURRENT].sampleTime = ADC_SampleTime_239Cycles5;
|
||||
}
|
||||
|
||||
|
||||
RCC_ADCCLKConfig(RCC_PCLK2_Div8); // 9MHz from 72MHz APB2 clock(HSE), 8MHz from 64MHz (HSI)
|
||||
|
||||
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue