Fixed bug 3589412.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4849 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
669acd0d64
commit
6a3c599bc4
|
@ -196,10 +196,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);
|
||||
|
|
|
@ -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.*/
|
||||
|
|
|
@ -222,11 +222,11 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) {
|
|||
u->BRR = STM32_PCLK1 / config->sc_speed;
|
||||
|
||||
/* Note that some bits are enforced.*/
|
||||
u->CR2 = config->sc_cr2 | USART_CR2_LBDIE;
|
||||
u->CR3 = config->sc_cr3 | USART_CR3_EIE;
|
||||
u->CR1 = config->sc_cr1 | USART_CR1_UE | USART_CR1_PEIE |
|
||||
USART_CR1_RXNEIE | USART_CR1_TE |
|
||||
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.*/
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
3591321)(backported to 2.4.3).
|
||||
- FIX: Fixed different redefinition for __main_stack_end__ symbol (bug
|
||||
3591317)(backported to 2.4.3).
|
||||
- FIX: Fixed errors in STM32F0xx UART driver (bug 3589412).
|
||||
- FIX: Fixed workaround for errata in STM32F4-A devices (bug 3586425)
|
||||
(backported to 2.4.3).
|
||||
- FIX: Fixed error in palWritePad() macro (bug 3586230)(backported to 2.2.10
|
||||
|
|
Loading…
Reference in New Issue