Skip to content

Commit

Permalink
Merge pull request #13523 from jeromecoutant/PR_H7_ADC2
Browse files Browse the repository at this point in the history
STM32H7 ADC: No MultiMode configuration needed for ADC2
  • Loading branch information
0xc0170 authored Sep 3, 2020
2 parents 2eb2fe4 + 02c79e8 commit 895488f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_STM/TARGET_STM32H7/analogin_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ void analogin_init(analogin_t *obj, PinName pin)
error("analogin_init HAL_ADC_Init");
}

if ( ((ADCName)obj->handle.Instance == ADC_1) || ((ADCName)obj->handle.Instance == ADC_2) ) {
if ((ADCName)obj->handle.Instance == ADC_1) {
ADC_MultiModeTypeDef multimode = {0};
multimode.Mode = ADC_MODE_INDEPENDENT;
if (HAL_ADCEx_MultiModeConfigChannel(&obj->handle, &multimode) != HAL_OK) {
error("analogin_init HAL_ADC_Init");
error("HAL_ADCEx_MultiModeConfigChannel HAL_ADC_Init");
}
}

Expand Down

0 comments on commit 895488f

Please sign in to comment.