2018-08-13 01:14 PM
Hi,
I'm using a UART for "printf" debugging so it's only transmitting, it never receive, so i'm not using the RX pin for anything so i would like to know if:
Regards :beaming_face_with_smiling_eyes:
2018-08-13 02:50 PM
In CubeMX, check the options of the UART, whether it supports TX only mode. If so, you can reuse the pin. Obviously, do not attempt to call RX related HAL or LL functions then.
-- pa
2018-08-13 03:07 PM
Unfortunately not specifying which STM32 is being used, but lets assume it is not an F1 series.
On any of the recent designs the USART_RX doesn't get to an external pin unless you select it on a pin mux, and the pin will remain free for any of the other mux options for that pin, including as a GPIO.
The smart design would perhaps provide some option to get an input for debugging (ie normally an LED, with an accessible test point), but it is up to you. Consider also the ability to use the System Loader, and USART1 or USART3 for low cost factory programming, or field recovery, absent a JTAG/SWD pod.
2018-08-14 07:13 AM
Hi,
@Pavel A. , no, it does not support TX only mode, i will check other UARTs to see if any support it, thanks for the help.
@Community member , sorry, i thought i specified the MCU which in fact is a STM32F103Rx, when i enable the UART peripheral on the left panel both RX and TX pins get green, when i want to configure the RX pin as any other function the UART peripheral gets disabled, so i guess based on your comment that you're referring to newer MCUs. Thanks for the suggestion about the bootloader,i almost forgot about it.
Regards.
2018-08-14 07:31 AM
The F1 parts move/remap pins in blocks. You're unlikely to be able to use the pin for a peripheral, but could use is as a GPIO input or output for your own purposes, ie button or LED. You can disable receive at the USART level to the pin is ignored.
2018-08-15 10:19 AM
Hi @Community member , i will try it on a toy project and report back when i got something useful.
Regards.
2024-05-15 11:23 PM
Old thread, I know - has anyone come up with a workable solution here?
I am porting code for a STM32F030C8T6 from another compiler. The Rx pin of USART 1 was used for a pin interrupt input. So the chip is not the limitation here. However I can't seem to disconnect the Rx pin in the STM32CubeMX, even though the USART is set to transmit only. I can't change the hardware setup here, so I need to find a way to make this work.
Any help greatly appreciated!