diff --git a/boards/nucleo-l496zg/Makefile.dep b/boards/nucleo-l496zg/Makefile.dep index 729485827299c1a63e12514b30d4943aeea41c0d..f41bf0f86b263ecbbc1cb43a2ac5d1112890672b 100644 --- a/boards/nucleo-l496zg/Makefile.dep +++ b/boards/nucleo-l496zg/Makefile.dep @@ -1 +1,3 @@ +FEATURES_REQUIRED += periph_lpuart + include $(RIOTBOARD)/common/nucleo/Makefile.dep diff --git a/boards/nucleo-l496zg/Makefile.features b/boards/nucleo-l496zg/Makefile.features index ff74d0e79c79b7298643606f6f12dfbb895de0d8..67dc676d956511f6ba9751d7bf0bd1d76bec06c1 100644 --- a/boards/nucleo-l496zg/Makefile.features +++ b/boards/nucleo-l496zg/Makefile.features @@ -4,7 +4,7 @@ FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer -FEATURES_PROVIDED += periph_uart +FEATURES_PROVIDED += periph_uart periph_lpuart # load the common Makefile.features for Nucleo boards include $(RIOTBOARD)/common/nucleo144/Makefile.features diff --git a/boards/nucleo-l496zg/Makefile.include b/boards/nucleo-l496zg/Makefile.include index a7612cbebaf7c55241bd02b8b61e26dac298642a..51050cea5be68fe92583f05fe58594adb8ff3170 100644 --- a/boards/nucleo-l496zg/Makefile.include +++ b/boards/nucleo-l496zg/Makefile.include @@ -4,7 +4,7 @@ export CPU_MODEL = stm32l496zg # stdio is not available over st-link but on the Arduino TX/RX pins # A serial to USB converter plugged to the host is required -PORT_LINUX ?= /dev/ttyUSB0 +PORT_LINUX ?= /dev/ttyACM0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # load the common Makefile.include for Nucleo boards diff --git a/boards/nucleo-l496zg/include/periph_conf.h b/boards/nucleo-l496zg/include/periph_conf.h index 851b9de54f762b14764e6c7e1f679a8fd04ca52e..0366faa80b7bbb5a4fc467dccec5fa70c0e1af7f 100644 --- a/boards/nucleo-l496zg/include/periph_conf.h +++ b/boards/nucleo-l496zg/include/periph_conf.h @@ -112,6 +112,18 @@ static const timer_conf_t timer_config[] = { * @{ */ static const uart_conf_t uart_config[] = { + { + .dev = LPUART1, + .rcc_mask = RCC_APB1ENR2_LPUART1EN, + .rx_pin = GPIO_PIN(PORT_G, 8), + .tx_pin = GPIO_PIN(PORT_G, 7), + .rx_af = GPIO_AF8, + .tx_af = GPIO_AF8, + .bus = APB12, + .irqn = LPUART1_IRQn, + .type = STM32_LPUART, + .clk_src = 0, + }, { .dev = USART3, .rcc_mask = RCC_APB1ENR1_USART3EN, @@ -130,8 +142,9 @@ static const uart_conf_t uart_config[] = { } }; -#define UART_0_ISR (isr_usart3) -#define UART_0_DMA_ISR (isr_dma1_stream5) +#define UART_0_ISR (isr_lpuart1) +#define UART_1_ISR (isr_usart3) +#define UART_1_DMA_ISR (isr_dma1_stream5) #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0])) /** @} */