diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-01-22 09:52:08 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-01-22 09:52:08 +0000 |
commit | f0e2c8c324dd6a71415cbd42b4ceaf6732fe990b (patch) | |
tree | 8136289f0f78fa32c820963509bccb2402bf6e9c | |
parent | 1664a6573e8b8c6caf4104c1e4e298a34e8c8271 (diff) | |
download | ChibiOS-f0e2c8c324dd6a71415cbd42b4ceaf6732fe990b.tar.gz ChibiOS-f0e2c8c324dd6a71415cbd42b4ceaf6732fe990b.tar.bz2 ChibiOS-f0e2c8c324dd6a71415cbd42b4ceaf6732fe990b.zip |
Fixed bug 3163851.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2664 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/platforms/STM32/serial_lld.c | 8 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c index 84e42f44d..1d45315cc 100644 --- a/os/hal/platforms/STM32/serial_lld.c +++ b/os/hal/platforms/STM32/serial_lld.c @@ -98,10 +98,10 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) { * Note that some bits are enforced.
*/
u->CR1 = config->sc_cr1 | USART_CR1_UE | USART_CR1_PEIE |
- USART_CR1_RXNEIE | USART_CR1_TE |
- USART_CR1_RE;
+ USART_CR1_RXNEIE | USART_CR1_RE;
u->CR2 = config->sc_cr2 | USART_CR2_LBDIE;
u->CR3 = config->sc_cr3 | USART_CR3_EIE;
+ u->SR = 0;
(void)u->SR; /* SR reset step 1.*/
(void)u->DR; /* SR reset step 2.*/
}
@@ -175,8 +175,10 @@ static void serve_interrupt(SerialDriver *sdp) { chIOAddFlagsI(sdp, IO_OUTPUT_EMPTY);
u->CR1 = cr1 & ~USART_CR1_TXEIE;
}
- else
+ else {
u->DR = b;
+ u->CR1 = cr1 | USART_CR1_TE;
+ }
chSysUnlockFromIsr();
}
}
diff --git a/readme.txt b/readme.txt index 6ff76dc40..3d6c5f54d 100644 --- a/readme.txt +++ b/readme.txt @@ -69,6 +69,8 @@ *****************************************************************************
*** 2.1.8 ***
+- FIX: Fixed spurious character transmission in STM32 serial driver after
+ reset (bug 3163851)(backported to 2.0.11).
- FIX: Fixed error in STM32 ADC driver macro names (bug 3160306)(backported
to 2.0.11).
- FIX: Fixed IAR Cortex-Mx port memory organization problem (bug 3158776).
|