2010-09-12 06:13 AM
Can TIM3 PWM outputs be set to Open Drain?
2011-05-17 05:06 AM
Wouldn't you just program the GPIO pins into the Alternate Function, Open Drain mode? instead of the normal Push-Pull (GPIO_Mode_AF_PP)
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOC, &GPIO_InitStructure); Presumably you've checked the pins are in the 5V tolerant group?2011-05-17 05:06 AM
clive1 - thank you for responding.
I apologise for my tardiness, I've been stressfully busy this week.
Yes the pins are in the 5V tolerant group.
Have you ever tried configuring the combination of PWM & Open Drain?
2011-05-17 05:06 AM
clive1 - Thanks for the confirmations, that helps a lot.
I'll test the pins as you suggest. I'll do that when I'm near an oscilloscope (hopefully tomorrow).
2011-05-17 05:06 AM
Have you ever tried configuring the combination of PWM & Open Drain?
No, and motors aren't my deal. But I have modulated a tri-colour LED from TIM3/PWM on PC.06/07/08, and I have used OD on other pins. So I'm pretty sure the pin-drivers work as described, and they are the same whether they are driven by a GPIO or a peripheral (AF). You might want to verify the function of these pins, and perhaps others, in regular GPIO_Mode_Out_OD, in the absence of other circuitry, and confirm they behave in the manner you expect.2011-05-17 05:06 AM
clive1 - sorry I forgot to pop back and acknowledge that you were correct.
It works! Thanks for your help.