summaryrefslogtreecommitdiff
path: root/chip/stm32/usart_info_command.c
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2015-07-21 12:04:42 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-24 19:08:35 +0000
commit69bd4ce351ca56a3141281bf25431a07ea10512f (patch)
tree4486849beac1b26caf5d6ff8ac691a568869651f /chip/stm32/usart_info_command.c
parent16f63703c9ccc46ec48abcc586a595456e99fc9a (diff)
downloadchrome-ec-69bd4ce351ca56a3141281bf25431a07ea10512f.tar.gz
USART: Add DMA based receiver
This DMA receiver uses a separate small circular buffer to DMA into. This allows the DMA transaction to be made circular, and thus it does not require the interrupt latency to be low enough to setup the next transfer before the next character comes in. Additional diagnostics output have been added to the usart_info console command to facilitate tuning of the FIFO size. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Verify DMA works by cross connecting two discovery boards Change-Id: Idcdf95a47fadf21ec2154f0c9128cd3586e568ec Reviewed-on: https://chromium-review.googlesource.com/292870 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Anton Staaf <robotboy@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org> Trybot-Ready: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'chip/stm32/usart_info_command.c')
-rw-r--r--chip/stm32/usart_info_command.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/stm32/usart_info_command.c b/chip/stm32/usart_info_command.c
index 7b949b10c6..836dc6d84c 100644
--- a/chip/stm32/usart_info_command.c
+++ b/chip/stm32/usart_info_command.c
@@ -26,6 +26,12 @@ static int command_usart_info(int argc, char **argv)
config->hw->index + 1,
atomic_read_clear(&(config->state->rx_dropped)),
atomic_read_clear(&(config->state->rx_overrun)));
+
+ if (config->rx->info)
+ config->rx->info(config);
+
+ if (config->tx->info)
+ config->tx->info(config);
}
return EC_SUCCESS;