Report
1 year, 5 months ago.

LPUART1 not working on DISCO L476

Hi I am developed a board based on the DISCO L476 and after porting it to VisualGDB everything works great. The only thing that doesn't work is LPUART1. I hooked it to PB10, PB11 but whenever I declare the port in my code and download it, the program hangs and doesn't even start:

Serial RS232(PB_11, PB_10);

If I remove this line, the code works great (but I can't use this port)

I changed the pin definitions in PeripheralPins.c so PB10 and PB11 will function as the LPUART TX and RX pins. (I added the lines)

but it still doesn't work. Any ideas?

Here is the complete PeripheralPins.c section relating to uart_tx and rx: (I erased all other instances of PB_11 and PB_10 on PeripheralPins.c):

const PinMap PinMap_UART_TX[] = { {PA_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, Warning: UART_2 already used by STDIO

{PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PB_11, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, Warning: Already used by UART_RX

{PD_8, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {PC_10, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PC_12, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, {PD_5, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, STDIO_TX {NC, NC, 0} };

const PinMap PinMap_UART_RX[] = { {PA_1, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PA_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, Warning: UART_2 already used by STDIO

{PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PB_10, LPUART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)}, Warning: Already used by UART_TX

{PD_9, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {PC_11, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PD_2, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, {PD_6, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, STDIO_RX {NC, NC, 0}

Question relating to:

The 32L476GDISCOVERY helps users to develop and share applications with the STM32L4 ultra-low-power microcontrollers.
Comment on this question

1 Answer

1 year, 5 months ago.

Hi You should have a look on the current github issue: https://github.com/ARMmbed/mbed-os/issues/5389 Regards,


To post an answer, please log in.