diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-11-30 13:01:06 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-11-30 13:01:06 +0000 |
commit | 6a3c599bc49ba4824c6087beba60bf2f29d31113 (patch) | |
tree | 6c2134b9d853b41809d1421de9c05892a6b13ece /os/hal/platforms/STM32/USARTv2/uart_lld.c | |
parent | 669acd0d64d55109d6ed2cafec3f23570de23351 (diff) | |
download | ChibiOS-6a3c599bc49ba4824c6087beba60bf2f29d31113.tar.gz ChibiOS-6a3c599bc49ba4824c6087beba60bf2f29d31113.tar.bz2 ChibiOS-6a3c599bc49ba4824c6087beba60bf2f29d31113.zip |
Fixed bug 3589412.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4849 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/USARTv2/uart_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/USARTv2/uart_lld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/USARTv2/uart_lld.c b/os/hal/platforms/STM32/USARTv2/uart_lld.c index 276aa7e8d..e35b386c5 100644 --- a/os/hal/platforms/STM32/USARTv2/uart_lld.c +++ b/os/hal/platforms/STM32/USARTv2/uart_lld.c @@ -93,7 +93,7 @@ UARTDriver UARTD3; *
* @return The error flags.
*/
-static uartflags_t translate_errors(uint16_t isr) {
+static uartflags_t translate_errors(uint32_t isr) {
uartflags_t sts = 0;
if (isr & USART_ISR_ORE)
@@ -154,7 +154,7 @@ static void usart_stop(UARTDriver *uartp) { * @param[in] uartp pointer to the @p UARTDriver object
*/
static void usart_start(UARTDriver *uartp) {
- uint16_t cr1;
+ uint32_t cr1;
USART_TypeDef *u = uartp->usart;
/* Defensive programming, starting from a clean state.*/
@@ -183,10 +183,10 @@ static void usart_start(UARTDriver *uartp) { else
cr1 = USART_CR1_UE | USART_CR1_PEIE | USART_CR1_TE | USART_CR1_RE |
USART_CR1_TCIE;
- u->CR1 = uartp->config->cr1 | cr1;
u->CR2 = uartp->config->cr2 | USART_CR2_LBDIE;
u->CR3 = uartp->config->cr3 | USART_CR3_DMAT | USART_CR3_DMAR |
USART_CR3_EIE;
+ u->CR1 = uartp->config->cr1 | cr1;
/* Starting the receiver idle loop.*/
set_rx_idle_loop(uartp);
@@ -268,7 +268,7 @@ static void uart_lld_serve_tx_end_irq(UARTDriver *uartp, uint32_t flags) { * @param[in] uartp pointer to the @p UARTDriver object
*/
static void serve_usart_irq(UARTDriver *uartp) {
- uint16_t isr;
+ uint32_t isr;
USART_TypeDef *u = uartp->usart;
/* Reading and clearing status.*/
|