Skip to content

Commit

Permalink
boards: nucleo_wb55rg: Configure LPUART
Browse files Browse the repository at this point in the history
Configure LPUART pin and set it as adruino_serial.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
  • Loading branch information
erwango authored and galak committed May 21, 2019
1 parent 9c1ffdd commit 56e50cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions boards/arm/nucleo_wb55rg/Kconfig.defconfig
Expand Up @@ -17,6 +17,13 @@ config UART_1

endif # UART_CONSOLE

if SERIAL

config LPUART_1
default y

endif # SERIAL

if BT_DEBUG_MONITOR

config UART_1
Expand Down
1 change: 1 addition & 0 deletions boards/arm/nucleo_wb55rg/doc/nucleowb55rg.rst
Expand Up @@ -177,6 +177,7 @@ Default Zephyr Peripheral Mapping:
----------------------------------

- UART_1 TX/RX : PB7/PB6
- LPUART_1 TX/RX : PA3/PA2 (arduino_serial)
- USER_PB : PC4
- USER_PB1 : PD0
- USER_PB2 : PD1
Expand Down
7 changes: 6 additions & 1 deletion boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
Expand Up @@ -12,7 +12,7 @@
compatible = "st,stm32wb55rg-nucleo", "st,stm32wb55rg";

chosen {
zephyr,console = &usart1;
zephyr,console = &lpuart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
Expand Down Expand Up @@ -61,3 +61,8 @@
current-speed = <115200>;
status = "ok";
};

arduino_serial: &lpuart1 {
current-speed = <115200>;
status = "ok";
};
4 changes: 4 additions & 0 deletions boards/arm/nucleo_wb55rg/pinmux.c
Expand Up @@ -18,6 +18,10 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PB7, STM32WBX_PINMUX_FUNC_PB7_USART1_RX},
{STM32_PIN_PB6, STM32WBX_PINMUX_FUNC_PB6_USART1_TX},
#endif /* CONFIG_UART_1 */
#ifdef CONFIG_LPUART_1
{STM32_PIN_PA2, STM32WBX_PINMUX_FUNC_PA2_LPUART1_TX},
{STM32_PIN_PA3, STM32WBX_PINMUX_FUNC_PA3_LPUART1_RX},
#endif /* CONFIG_LPUART_1 */
};

static int pinmux_stm32_init(struct device *port)
Expand Down

0 comments on commit 56e50cf

Please sign in to comment.