cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L432KC - lpuart work only in transmit mode

Nikeware
Associate II

LPUART (over usb connection) work only in transmit mode. I have CubeMX generated project with "receive and transmit" settings for lpuart in interrupt mode, but can only send data from the mController to PC.

With another evalboard (Nucleo L496ZG) my send/receive source code work without problems. The reconfiguration of L432KC from lpuart to usart1 or usart2 also work fine.

Thanks!

5 REPLIES 5
T J
Lead

I had to enable the interrupts for both DMA and UartRx, then the DMA worked correctly.

What pins are involved, care to provide a minimally complete example?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nikeware
Associate II

Yes, of course.

In attachment one ioc-file for CubeMX and main.c file with source code for lpuart and usart1.

Nikeware
Associate II

Note. The callback function HAL_UART_RxCpltCallback() for lpuart called only once, direct after start of mC.

Nikeware
Associate II

Solved!

In datasheet for STM32 L432KC the ST-Link microController pins connections (STLK_TX and STLK_RX) connected to PA2 and PA15 pins on mC respectively. But CubeMX generate by default the source code for LPUART connection over PA2 and PA3 pins.

Reconfiguration of USART2 for PA2 and PA15 solve this problem!

Thanks!