aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/LPC8xx/serial_lld.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/platforms/LPC8xx/serial_lld.c b/os/hal/platforms/LPC8xx/serial_lld.c
index e5937bae8..d1d273621 100644
--- a/os/hal/platforms/LPC8xx/serial_lld.c
+++ b/os/hal/platforms/LPC8xx/serial_lld.c
@@ -131,7 +131,9 @@ static void serve_interrupt(SerialDriver *sdp) {
if (u->INTSTAT & (STAT_OVERRUN | STAT_DELTARXBRK |
STAT_FRAMERR | STAT_PARITYERR) ) {
- set_error(sdp, u->STAT);
+ IOREG32 stat = u->STAT;
+ set_error(sdp, stat);
+ u->STAT = stat;
}
}