cancel
Showing results for 
Search instead for 
Did you mean: 

PWM: drive output low in disabled mode

stinguely
Associate II
Posted on April 15, 2014 at 17:57

I'm using TIM1 for a 6-step motor control on a STM32F2xx. According of the table 4 in DM0004234 application note, I update OCxE and OCxNE at each commutation, to select a new step. When OCxE = 0 and OCxNE = 0, the output is disabled. In this case, the output seems to be in high impedance. I would rather have it in OFF-state (low Z). Is there a way to get this result?

Thanks for your help.

Simon
1 REPLY 1
Gigi
Senior
Posted on May 05, 2014 at 11:23

Ciao Simon,

For what I know you have to configure the GPIO in output mode and set the proper state (according your polarity) before to set again the same pin for AF. When OCxE = OCxNE = 0 the control of the pin is done back to the GPIO controller.

Ciao

Gigi