2022-03-15 04:28 AM
I am trying to configure the UART5 on PD2 and PC12 for my STM32L152RE as open drain but the Mx GUI only offers pull ups. I searched manual and Errata but nothing indicates a special pin here.
is this a bug in the Mx config or a real thing does anybody know? It just makes me nervous for my pin mapping..
Thanks.
2022-03-15 05:42 AM
The RX line isn't driven, so the push-pull setting there is irrelevant.
The TX line seems to be forced to push-pull in CubeMX. You can change it in user code if you wish. Seems like CubeMX lets you change the mode for USARTs but not for UARTs on this chip. The hardware allows it to be set to open drain.
Probable a CubeMX bug.
2022-03-21 05:14 AM
Thanks
I can confirm it isa CubeMX configuration bug for STM32L151/152 and not a real thing, the UART works fine with overwritten GPIO config.