cancel
Showing results for 
Search instead for 
Did you mean: 

Problems configuring a UART

Maria-e-Elisa
Associate

IMG_0193.jpeg

I'm using the STM32F405RGT6 board in a controller project.

I wanted to use PA0 as PWM and PA1 as RX. For some reason, when configuring the .ioc, even though I configure UART4 as receiver only, it doesn't allow me to use PA0 as PWM.

Is there any other way to configure this in the code?

2 REPLIES 2
STTwo-32
ST Employee

Hello @Maria-e-Elisa and welcome to the ST Community.

This option is not possible throw CubeMX. So, if you want to configure the TX pin for another function, you can create your project on your own (without CubeMX code generation). Or create a basic code that Keeps the TX pin active. And on the generated code, made the modifications you need to change the TX pin functionality. Also, you can set the USART to use only one pin (the TX pin for TX and RX) by setting the mode to single wire half duplex mode. 

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Andrew Neil
Super User

@Maria-e-Elisa wrote:

 the STM32F405RGT6 board 


What STM32F405RGT6  board, exactly?

See: How to write your question to maximize your chances to find a solution.

STM32F405RGT6 is just a chip part number - it doesn't identify a board.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.