Skip to content

Commit

Permalink
Increase sampling time to 10 uS
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed May 28, 2020
1 parent 7015783 commit be3b258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stm32/stm32l4_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ bool stm32_adc_enable_input(int unit_no, int input_no) {
// Sampling time of at least 5 uS is required for Vrefint and Vts.
// We use it for external sources as well.
// ADCCLK = 80 mhz / 10 * 47.5 = ~6 uS
uint32_t smp_sel = 5;
uint32_t smp_sel = 10;
if (input_no < 10) {
MODIFY_REG(regs->SMPR1, (7 << (input_no * 3)), (smp_sel << (input_no * 3)));
} else {
Expand Down

0 comments on commit be3b258

Please sign in to comment.