cancel
Showing results for 
Search instead for 
Did you mean: 

Break function in TIM1 -> Pin configure automatically as output? It should be input

DKuro.1
Associate III

Hi,

I am using STM32G474 th STM32CubeIDE and I want to implement the break function for TIM1.

When I configure the pin PA6 in the pinout view as TIM1_BKIN I expect that the port will be automatically configured as input, but after I checked in the GPIO configuration of the TIM1 I see that the pin was configured as Alternate Function Open Drain.

Why is that happening?

And if I try to configure it manually in the MX_GPIO_Init() function, my code is, obviously removed.

What should I do?

Thanks!!

Daniel

1 ACCEPTED SOLUTION

Accepted Solutions

> I see that the pin was configured as Alternate Function Open Drain.

Alternate Function means, that the pin's direction is controlled by the connected peripheral.

Open Drain in that context means, that should the peripheral decide to turn the given pin to output (which in your particular case it won't as BKIN is always input), it would be open drain rather than push-pull.

JW

View solution in original post

3 REPLIES 3

> I see that the pin was configured as Alternate Function Open Drain.

Alternate Function means, that the pin's direction is controlled by the connected peripheral.

Open Drain in that context means, that should the peripheral decide to turn the given pin to output (which in your particular case it won't as BKIN is always input), it would be open drain rather than push-pull.

JW

Great JW, thanks for your answer.

Before I make a short circuit and just to be 100% sure.

TIM1_BKIN in my configuration, is an INPUT, right?

Yes.

JW