Home > Back-end >  For help
For help

Time:01-20


The PWM is calculated for the first time I has been unchanged... 330, 330 behind of new help

CodePudding user response:

C10ms=0; The later has been skipped the biggest if,
Unless otherwise code modify it,

CodePudding user response:

If (TIM_GetITStatus (TIM4, TIM_IT_Update)==SET)

{
The static u8 tsec.
C10ms + +;
If (tsec++ & gt;=10)
{
Tsec=0;
Encoder_TIM=ABS (32768 - TIM3 - & gt; CNT);

Printf (" % d ", Encoder_TIM/30);
Printf (" % 3.1 f ", PWM);


TIM3 - & gt; CNT=32768;




} TIM_ClearITPendingBit (TIM4, TIM_IT_Update);


}

} it?
  • Related