From a88b23772990c4c331b12990fd337ba86fc3bf5a Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 24 Oct 2013 17:30:01 -0700 Subject: stm32l: fix ADC all channels conversion Reset the DMA status after the end of the conversions, else we will exit too early at the next call of the function and the values before they are actually transfered. Signed-off-by: Vincent Palatin BRANCH=none BUG=none TEST=run "adc" command several times and always see proper value for each ADC. Change-Id: I7ad335fffa2da34a4b715e9f0c9927bf06baef8f Reviewed-on: https://chromium-review.googlesource.com/174397 Tested-by: Vincent Palatin Reviewed-by: Randall Spangler Commit-Queue: Vincent Palatin --- chip/stm32/adc-stm32l.c | 1 + 1 file changed, 1 insertion(+) (limited to 'chip') diff --git a/chip/stm32/adc-stm32l.c b/chip/stm32/adc-stm32l.c index 2b7a789fde..0dc1d76743 100644 --- a/chip/stm32/adc-stm32l.c +++ b/chip/stm32/adc-stm32l.c @@ -196,6 +196,7 @@ int adc_read_all_channels(int *data) ret = EC_ERROR_UNKNOWN; goto exit_all_channels; } + dma_clear_isr(STM32_DMAC_ADC); for (i = 0; i < ADC_CH_COUNT; ++i) { adc = adc_channels + i; -- cgit v1.2.1