cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 4.15.0 Bug Report

megaboy2k
Associate II
Posted on May 29, 2016 at 20:02

When some output configured as an alternative function, the only option available is ''Alternative Function Push Pull'' but according to Ref manual (e.g. for stm32f405) the Open Drain for alternative function is also possible and was required in my application.

11 REPLIES 11
Walid FTITI_O
Senior II
Posted on May 30, 2016 at 13:21

Hi klymenko.sergii,

I have made a test and everything is fine : I configured PA1 as TIM5_CH2 and picked GPIO mode as ''Alternate function Open Drain'' ( as you see in Figure bellow; mcu target STM32F405/407)

0690X00000602bXQAQ.jpg

-Hannibal-

megaboy2k
Associate II
Posted on May 30, 2016 at 15:30

Hi Hannibal,

Could you please check the same on USART1. May be only there the bug is reproduced

megaboy2k
Associate II
Posted on May 30, 2016 at 18:01

My screenshot itself

0690X00000604ulQAA.png 

Walid FTITI_O
Senior II
Posted on May 31, 2016 at 15:16

Hi  ymenko.sergii,

UART does not operate in an open drain mode, but rather in a push pull. The same with other COM peripherals like SPI. For I2C it is operating on open drain .

Maybe there is solution with external components to allow USART I/O operate/emulated  as open drain ; you should make you search.

-Hannibal-

Radosław
Senior II
Posted on May 31, 2016 at 19:48

No way, next ...

According to RM and GPIO section, alternate fuction can be configured both oped drain and push pull.

Programist can chose which is wright choise for....

megaboy2k
Associate II
Posted on May 31, 2016 at 23:24

USART1 really works with open drain at TX line. Take a look at GPIO_MODE_AF_OD define in HAL driver. I've also checked this in hardware and yes, it really works.

So the bug in CubeMX is still open.

Rosiney Silva
Associate II
Posted on June 01, 2016 at 18:05

Setting uart/usart as ''single wire (half-dupex)'', tx pin is configured as ''open drain''

0690X00000604uqQAA.png

0690X00000604rnQAA.png

megaboy2k
Associate II
Posted on June 02, 2016 at 00:02

silva.rosiney, unfortunately I need full-duplex use case.

Walid FTITI_O
Senior II
Posted on June 02, 2016 at 16:01

Hi klymenko.sergii

As Silva mentionned the open drain is allowed for USART pin only in the case of half duplex to switch between transmit/receive. In case of full duplex, the Push pull is doing the work.

-Hannibal-