mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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 <vpalatin@chromium.org> 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 <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
5ef2054c38
commit
a88b237729
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user