diff --git a/boards/nucleo-l073rz/Makefile.features b/boards/nucleo-l073rz/Makefile.features index 8b9e19e634..4a7b8528a0 100644 --- a/boards/nucleo-l073rz/Makefile.features +++ b/boards/nucleo-l073rz/Makefile.features @@ -2,6 +2,7 @@ FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_gpio periph_gpio_irq FEATURES_PROVIDED += periph_i2c +FEATURES_PROVIDED += periph_lpuart FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_spi diff --git a/boards/nucleo-l073rz/include/periph_conf.h b/boards/nucleo-l073rz/include/periph_conf.h index e7c1688519..f80178faad 100644 --- a/boards/nucleo-l073rz/include/periph_conf.h +++ b/boards/nucleo-l073rz/include/periph_conf.h @@ -85,7 +85,9 @@ static const uart_conf_t uart_config[] = { .rx_af = GPIO_AF4, .tx_af = GPIO_AF4, .bus = APB1, - .irqn = USART2_IRQn + .irqn = USART2_IRQn, + .type = STM32_USART, + .clk_src = 0, /* Use APB clock */ }, { .dev = USART1, @@ -95,23 +97,32 @@ static const uart_conf_t uart_config[] = { .rx_af = GPIO_AF4, .tx_af = GPIO_AF4, .bus = APB2, - .irqn = USART1_IRQn + .irqn = USART1_IRQn, + .type = STM32_USART, + .clk_src = 0, /* Use APB clock */ }, +#ifdef MODULE_PERIPH_LPUART { - .dev = USART4, - .rcc_mask = RCC_APB1ENR_USART4EN, + .dev = LPUART1, + .rcc_mask = RCC_APB1ENR_LPUART1EN, .rx_pin = GPIO_PIN(PORT_C, 11), .tx_pin = GPIO_PIN(PORT_C, 10), - .rx_af = GPIO_AF6, - .tx_af = GPIO_AF6, + .rx_af = GPIO_AF0, + .tx_af = GPIO_AF0, .bus = APB1, - .irqn = USART4_5_IRQn + .irqn = LPUART1_IRQn, + .type = STM32_LPUART, + .clk_src = 0, /* Use APB clock */ }, +#endif }; #define UART_0_ISR (isr_usart2) #define UART_1_ISR (isr_usart1) -#define UART_2_ISR (isr_usart4_5) + +#ifdef MODULE_PERIPH_LPUART +#define UART_2_ISR (isr_rng_lpuart1) +#endif #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0])) /** @} */