2020-04-21 02:56 AM
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
Solved! Go to Solution.
2020-04-21 03:20 AM
> 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
2020-04-21 03:20 AM
> 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
2020-04-21 03:35 AM
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?
2020-04-21 12:15 PM
Yes.
JW