2023-02-26 11:29 AM
I have a situation where I use all I/O on an STM32L476RG. One of the units only sends UART data, so I want to configure the LPUART for Rx Only to keep the Tx pin free as GPO.
Cube has "Advanced Setting"; I've selected "Receive Only". But unless I enable the transmitter pin, Cube reports an error and refuses to generate code -> so it seems Cube ignores my Advanced Settling? How to get this fixed?
STM32CubeIDE
Version: 1.11.2
Build: 14494_20230119_0724 (UTC)
FW Package = STM32CubeFW_L4_V1.17.2
Solved! Go to Solution.
2023-02-27 07:43 AM
Single Wire (HalfDuplex mode) uses the Tx PIN. Rx PIN remains available, but not Tx.
So, if possible, when using HalfDuplex mode, you could the LPUART1 Rx pin available.
2023-02-26 04:20 PM
For LPUART mode, you can select "Single Wire (half-duplex)". This mode uses only 1 GPIO.
Then in Advanced settings, you select "Receive Only".
2023-02-27 07:19 AM
I select Mode Single Wire
This enables receiver + transmitter in Cube (the pins PB10 and PB11 turn green as expected)..
Data direction is changed to Receive Only.
Change the UART Tx PB11 Back to reset state (or anything else).
As a result, Cube disables the UART completely.
2023-02-27 07:43 AM
Single Wire (HalfDuplex mode) uses the Tx PIN. Rx PIN remains available, but not Tx.
So, if possible, when using HalfDuplex mode, you could the LPUART1 Rx pin available.
2023-03-05 05:14 PM
Or use the SWAP bit and then the Rx pin is used for communication and Tx pin is released.