AnsweredAssumed Answered

Problem in duty cycle

Question asked by chikane.deepak on Jul 11, 2014
Latest reply on Jul 12, 2014 by Clive One
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
               
     
                    
          }
               

Outcomes