diff options
author | Vic Yang <victoryang@chromium.org> | 2013-02-07 10:53:59 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-02-06 23:17:15 -0800 |
commit | f84a5fa8b1f6d688c73a1e6e9b33df79489cbfef (patch) | |
tree | f2d4592d515d8b6101ba8a2f629e0614bb5f19df | |
parent | fe2e8852b9a3f352aec2e303a91cf8a7f9aaeff0 (diff) | |
download | chrome-ec-f84a5fa8b1f6d688c73a1e6e9b33df79489cbfef.tar.gz |
stm32: Lengthen ADC sample time
Current sample time 1.75us seems too short and some nets with weaker
driver don't convert correctly. Let's lengthen it to 8.75us.
BUG=chrome-os-partner:14319
TEST=See correct voltage level.
BRANCH=none
Change-Id: Ib65a07474787504e5f72522167bafad8bb5730bc
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42845
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | chip/stm32/adc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chip/stm32/adc.c b/chip/stm32/adc.c index c91a5148cb..835f700e23 100644 --- a/chip/stm32/adc.c +++ b/chip/stm32/adc.c @@ -169,11 +169,11 @@ static void adc_init(void) STM32_ADC_CR2 &= ~(1 << 11); /* - * Set sample time of all channels to 1.5 cycles. - * Conversion takes 1.75 us. + * Set sample time of all channels to 7.5 cycles. + * Conversion takes 8.75 us. */ - STM32_ADC_SMPR1 = 0; - STM32_ADC_SMPR2 = 0; + STM32_ADC_SMPR1 = 0x00249249; + STM32_ADC_SMPR2 = 0x09249249; } DECLARE_HOOK(HOOK_INIT, adc_init, HOOK_PRIO_DEFAULT); |