You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2019/10/21 18:34:27 UTC

[mynewt-core] branch master updated: bsp/black_vet6: Fix UART2/3 RCC register address

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new b35b8be  bsp/black_vet6: Fix UART2/3 RCC register address
b35b8be is described below

commit b35b8be0a5c8ff77e194885bea9640d79344114c
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon Oct 21 16:28:44 2019 +0200

    bsp/black_vet6: Fix UART2/3 RCC register address
    
    RCC register for UART2 and UART3 were pointing to APB2ENR
    register instead of APB1ENR which is only valid for UART1.
    Correct bit-filed was used though so there is no need to
    checked datasheet.
    Obvious copy/paste error.
    Now UART3 was verified to work.
---
 hw/bsp/black_vet6/src/hal_bsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/bsp/black_vet6/src/hal_bsp.c b/hw/bsp/black_vet6/src/hal_bsp.c
index d5427eb..3d62a02 100644
--- a/hw/bsp/black_vet6/src/hal_bsp.c
+++ b/hw/bsp/black_vet6/src/hal_bsp.c
@@ -343,7 +343,7 @@ static const struct stm32_uart_cfg uart_cfg0 = {
 #if MYNEWT_VAL(UART_1)
 static const struct stm32_uart_cfg uart_cfg1 = {
     .suc_uart = USART2,
-    .suc_rcc_reg = &RCC->APB2ENR,
+    .suc_rcc_reg = &RCC->APB1ENR,
     .suc_rcc_dev = RCC_APB1ENR_USART2EN,
     .suc_pin_tx = MYNEWT_VAL(UART_1_TX),
     .suc_pin_rx = MYNEWT_VAL(UART_1_RX),
@@ -356,7 +356,7 @@ static const struct stm32_uart_cfg uart_cfg1 = {
 #if MYNEWT_VAL(UART_2)
 static const struct stm32_uart_cfg uart_cfg2 = {
     .suc_uart = USART3,
-    .suc_rcc_reg = &RCC->APB2ENR,
+    .suc_rcc_reg = &RCC->APB1ENR,
     .suc_rcc_dev = RCC_APB1ENR_USART3EN,
     .suc_pin_tx = MYNEWT_VAL(UART_2_TX),
     .suc_pin_rx = MYNEWT_VAL(UART_2_RX),