Skip to main content
Eugene S.
Associate III
February 26, 2019
Question

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

  • February 26, 2019
  • 4 replies
  • 2082 views

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

    This topic has been closed for replies.

    4 replies

    S.Ma
    Principal
    February 26, 2019

    Go beyond cubeMx and search in the source code GPIO_MODE_AF_OD

    Just hack at C HAL level .

    Eugene S.
    Eugene S.Author
    Associate III
    February 26, 2019

    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
    February 26, 2019

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

    Eugene S.
    Eugene S.Author
    Associate III
    February 26, 2019

    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.