Merge pull request #13905 from jeromecoutant/PR_L422

STM32L4: ADC compilation issue with L422
pull/13918/head
Martin Kojtal 2020-11-18 10:59:06 +00:00 committed by GitHub
commit 134c39cb7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -92,7 +92,9 @@ static void _analogin_init_direct(analogin_t *obj, const PinMap *pinmap)
// Enable ADC clock
__HAL_RCC_ADC_CLK_ENABLE();
#if defined(RCC_CCIPR_ADCSEL)
__HAL_RCC_ADC_CONFIG(RCC_ADCCLKSOURCE_SYSCLK);
#endif
if (HAL_ADC_Init(&obj->handle) != HAL_OK) {
error("Cannot initialize ADC\n");