aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/uart_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32/uart_lld.c')
-rw-r--r--os/hal/platforms/STM32/uart_lld.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/os/hal/platforms/STM32/uart_lld.c b/os/hal/platforms/STM32/uart_lld.c
index 6708fe1e6..02fc46bb7 100644
--- a/os/hal/platforms/STM32/uart_lld.c
+++ b/os/hal/platforms/STM32/uart_lld.c
@@ -373,10 +373,10 @@ void uart_lld_init(void) {
RCC->APB1RSTR = RCC_APB1RSTR_USART2RST;
RCC->APB1RSTR = 0;
uartObjectInit(&UARTD2);
- UARTD1.ud_usart = USART2;
- UARTD1.ud_dmarx = STM32_DMA_CHANNEL_6;
- UARTD1.ud_dmatx = STM32_DMA_CHANNEL_7;
- UARTD1.ud_dmaccr = 0;
+ UARTD2.ud_usart = USART2;
+ UARTD2.ud_dmarx = STM32_DMA_CHANNEL_6;
+ UARTD2.ud_dmatx = STM32_DMA_CHANNEL_7;
+ UARTD2.ud_dmaccr = 0;
#endif
}
@@ -410,7 +410,7 @@ void uart_lld_start(UARTDriver *uartp) {
CORTEX_PRIORITY_MASK(STM32_UART_USART2_IRQ_PRIORITY));
NVICEnableVector(DMA1_Channel7_IRQn,
CORTEX_PRIORITY_MASK(STM32_UART_USART2_IRQ_PRIORITY));
- RCC->APB1ENR |= RCC_APB2ENR_USART1EN;
+ RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
}
#endif