cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX USART[BUG]: setting GPIO to an open drain mode

Eugene S.
Associate III

Hi,

I'd like to use USART for multiprocessor communication. For this I have to configure the TX pin to an open drain mode. But this option is not available:

0690X000006DrVbQAK.jpg

MCU: STM32F446ZEH6

STM32CubeMX: 5.1.0

Best regards,

Eugene

4 REPLIES 4
S.Ma
Principal

Go beyond cubeMx and search in the source code GPIO_MODE_AF_OD

Just hack at C HAL level .

Eugene S.
Associate III

Thanks, I know about this. But manual changes will be lost every time when I generate code with CubeMX. Is there any other option?

S.Ma
Principal

Use user code area in source to override cubemx initialization or wait for cubemx fix?

Eugene S.
Associate III

Yes, but that will cause an unwanted voltage glitch on the pin, because it will be configured 2 times.

Is there a way to modify any CubeMX configuration file to get this option? If not, then, would be good that this bug will be fixed in future release.