2016-12-29 03:28 PM
Hello,
i am working on a BLDC motor control, based on hall sensors for rotor position.
I am starting to write some code, and came across a example on google
the function i am refering is this : TIM_SelectOCxM(TIM1, TIM_Channel_1, TIM_ForcedAction_Active);
From what i understand so far, is that this function disables the timer channel1 before changing the OC mode, but the forced action parameter? It forces the output in high level state ( logic 1) ?
Thanks
2016-12-30 02:11 AM
Hello
Anton.Bogdan
,The function 'TIM_SelectOCxM'disables the selected channel before changing the Output Compare Mode.
If you're using a logic high (polarity bit CCxP=0), then YES, the 'TIM_OCMode_Active' parameter forces the OCx to high level state.
If this answers your question, please click on correct
:)
.Regards,
Khouloud.