diff --git a/os/hal/platforms/STM32/uart_lld.c b/os/hal/platforms/STM32/uart_lld.c index 5d5f323f1..9769aa090 100644 --- a/os/hal/platforms/STM32/uart_lld.c +++ b/os/hal/platforms/STM32/uart_lld.c @@ -243,7 +243,7 @@ CH_IRQ_HANDLER(DMA1_Ch5_IRQHandler) { /* Receiver in idle state, a callback is generated, if enabled, for each received character and then the driver stays in the same state.*/ if (uartp->ud_config->uc_rxchar != NULL) - uartp->ud_config->uc_rxchar(uartp->ud_rxbuf); + uartp->ud_config->uc_rxchar(uartp, uartp->ud_rxbuf); } else { /* Receiver in active state, a callback is generated, if enabled, after @@ -379,7 +379,7 @@ CH_IRQ_HANDLER(DMA1_Ch3_IRQHandler) { /* Receiver in idle state, a callback is generated, if enabled, for each received character and then the driver stays in the same state.*/ if (uartp->ud_config->uc_rxchar != NULL) - uartp->ud_config->uc_rxchar(uartp->ud_rxbuf); + uartp->ud_config->uc_rxchar(uartp, uartp->ud_rxbuf); } else { /* Receiver in active state, a callback is generated, if enabled, after @@ -463,11 +463,11 @@ void uart_lld_init(void) { RCC->APB1RSTR = RCC_APB1RSTR_USART3RST; RCC->APB1RSTR = 0; uartObjectInit(&UARTD3); - UARTD2.ud_usart = USART3; - UARTD2.ud_dmap = STM32_DMA1; - UARTD2.ud_dmarx = STM32_DMA_CHANNEL_3; - UARTD2.ud_dmatx = STM32_DMA_CHANNEL_2; - UARTD2.ud_dmaccr = 0; + UARTD3.ud_usart = USART3; + UARTD3.ud_dmap = STM32_DMA1; + UARTD3.ud_dmarx = STM32_DMA_CHANNEL_3; + UARTD3.ud_dmatx = STM32_DMA_CHANNEL_2; + UARTD3.ud_dmaccr = 0; #endif } diff --git a/readme.txt b/readme.txt index 02ccbe50e..ae61387dc 100644 --- a/readme.txt +++ b/readme.txt @@ -65,6 +65,7 @@ ***************************************************************************** *** 2.1.7 *** +- FIX: Fixed error in STM32 unbuffered UART driver (bug 3153437). - FIX: Fixed wrong macro check in LPC214x driver (bug 3152510). - FIX: Fixed switch condition error in STM32 PWM driver (bug 3152482) (backported to 2.0.10).