diff --git a/boards/nucleo-l433rc/Makefile.dep b/boards/nucleo-l433rc/Makefile.dep index 7294858272..f41bf0f86b 100644 --- a/boards/nucleo-l433rc/Makefile.dep +++ b/boards/nucleo-l433rc/Makefile.dep @@ -1 +1,3 @@ +FEATURES_REQUIRED += periph_lpuart + include $(RIOTBOARD)/common/nucleo/Makefile.dep diff --git a/boards/nucleo-l433rc/Makefile.features b/boards/nucleo-l433rc/Makefile.features index 1c3821ce3d..654c563ed4 100644 --- a/boards/nucleo-l433rc/Makefile.features +++ b/boards/nucleo-l433rc/Makefile.features @@ -1,5 +1,6 @@ # Put defined MCU peripherals here (in alphabetical order) FEATURES_PROVIDED += periph_gpio periph_gpio_irq +FEATURES_PROVIDED += periph_lpuart FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_rtt diff --git a/boards/nucleo-l433rc/Makefile.include b/boards/nucleo-l433rc/Makefile.include index 83fedf0dc9..9c2743b776 100644 --- a/boards/nucleo-l433rc/Makefile.include +++ b/boards/nucleo-l433rc/Makefile.include @@ -2,10 +2,5 @@ export CPU = stm32l4 export CPU_MODEL = stm32l433rc -# 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_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) - # load the common Makefile.include for Nucleo boards include $(RIOTBOARD)/common/nucleo64/Makefile.include diff --git a/boards/nucleo-l433rc/include/periph_conf.h b/boards/nucleo-l433rc/include/periph_conf.h index 64e830ee06..f3f3656f7d 100644 --- a/boards/nucleo-l433rc/include/periph_conf.h +++ b/boards/nucleo-l433rc/include/periph_conf.h @@ -106,6 +106,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_A, 3), + .tx_pin = GPIO_PIN(PORT_A, 2), + .rx_af = GPIO_AF8, + .tx_af = GPIO_AF8, + .bus = APB12, + .irqn = LPUART1_IRQn, + .type = STM32_LPUART, + .clk_src = 0, /* Use APB clock */ + }, { .dev = USART1, .rcc_mask = RCC_APB2ENR_USART1EN, @@ -115,6 +127,8 @@ static const uart_conf_t uart_config[] = { .tx_af = GPIO_AF7, .bus = APB2, .irqn = USART1_IRQn, + .type = STM32_USART, + .clk_src = 0, /* Use APB clock */ #ifdef UART_USE_DMA .dma_stream = 5, .dma_chan = 4 @@ -122,7 +136,8 @@ static const uart_conf_t uart_config[] = { } }; -#define UART_0_ISR (isr_usart1) +#define UART_0_ISR (isr_lpuart1) +#define UART_1_ISR (isr_usart1) #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0])) /** @} */