2020-05-27 10:36 PM
when used timer1 for motor control some time need active low side signal in program with hand not follow pwm out put how to do this
any one know faster easy way
Solved! Go to Solution.
2020-05-27 10:56 PM
You don't need to stop the timer before changing the pin mode to output in GPIOx_MODER.
You can also use some of the FORCED output compare mode, see description of TIM_CCMRx register - but this will maintain the complementary channel in opposite state.
JW
2020-05-27 10:56 PM
You don't need to stop the timer before changing the pin mode to output in GPIOx_MODER.
You can also use some of the FORCED output compare mode, see description of TIM_CCMRx register - but this will maintain the complementary channel in opposite state.
JW
2020-05-30 08:30 PM
HI
THANKS YOUR MEANS THIS WAY
LL_TIM_ClearFlag_UPDATE( PWMTIMER );
while ( LL_TIM_IsActiveFlag_UPDATE( PWMTIMER ) == RESET ) ;
LL_TIM_OC_SetMode( PWMTIMER, LL_TIM_CHANNEL_CH1 ,LL_TIM_OCMODE_FORCED_INACTIVE);
LL_TIM_OC_SetMode( PWMTIMER, LL_TIM_CHANNEL_CH2 ,LL_TIM_OCMODE_FORCED_INACTIVE);
LL_TIM_OC_SetMode( PWMTIMER, LL_TIM_CHANNEL_CH3 ,LL_TIM_OCMODE_FORCED_INACTIVE);
FOR ACTIVE LOW SIDE AND AGAIN RETURN MODE PWM
2020-05-31 02:14 AM
If I understand correctly (I don't use Cube/LL), yes, but as I've said, this maintains the complementary channel (CHxN) in opposite state. You may or may not want that, that's upon you.
JW