Skip to content

Commit

Permalink
fixup! cpu/stm32l1: fix ADC initialization & resolution setting
Browse files Browse the repository at this point in the history
  • Loading branch information
crasbe authored Dec 10, 2024
1 parent 0485824 commit e24ca9c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpu/stm32/periph/adc_l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
prep();

/* mask and set resolution, conversion channel and single read */
ADC1->CR1 &= ~ADC_CR1_RES_Msk;
ADC1->CR1 |= res & ADC_CR1_RES;
ADC1->CR1 = (ADC1->CR1 & ~ADC_CR1_RES_Msk) | (res & ADC_CR1_RES);
ADC1->SQR1 &= ~ADC_SQR1_L;
ADC1->SQR5 = adc_config[line].chan;

Expand Down

0 comments on commit e24ca9c

Please sign in to comment.