Question
Problem in duty cycle
Posted on July 11, 2014 at 16:14
Dear sir,
i have following conditions.the problem is that, my actual value & compiler value are not matching.in debug options.1) i am getting duty cycle on o.scope less than 2% the actual calculations.look forward to hearing you soon. { Duty_cycle_buck=90-(80*Buck_Ref_mv/3000); TIM_OCInitStructure.TIM_Pulse = (uint16_t) (((uint32_t) Duty_cycle_buck*(TimerPeriod - 1)) / 100);// duty cycle formula TIM_OC1Init(TIM1, &TIM_OCInitStructure);//OC1 selects PA8 }