projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add hw error detect.
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
ser_stm32.c
diff --git
a/bertos/cpu/cortex-m3/drv/ser_stm32.c
b/bertos/cpu/cortex-m3/drv/ser_stm32.c
index 6fdcf312feda3f98e354f894b38a69471e313e40..8a0ae8a31e81abc3e20f9e70dececa0dcbc84106 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/ser_stm32.c
+++ b/
bertos/cpu/cortex-m3/drv/ser_stm32.c
@@
-233,6
+233,11
@@
static void uart_common_irq_handler(int port)
/* Read and clear the IRQ status */
status = base->SR;
+
+ /* Check hw errors */
+ ser_handles[port]->status = status &
+ (BV(SR_ORE) | BV(SR_FE) | BV(SR_PE) | BV(SR_NE));
+
/* Process the IRQ */
if (status & BV(CR1_RXNEIE))
{