timer lag
This commit is contained in:
parent
052e7b5a4b
commit
38e7b72b95
@ -45,9 +45,9 @@ static void* tim_handler(void* arg){
|
|||||||
|
|
||||||
unsigned int nb_exec = time * 1000 / delay_ps;
|
unsigned int nb_exec = time * 1000 / delay_ps;
|
||||||
int backlog = nb_exec - exec_counter;
|
int backlog = nb_exec - exec_counter;
|
||||||
|
if(backlog > 10)
|
||||||
|
printf("timer simulation lagging behind (%d ticks)\n", backlog);
|
||||||
while(backlog > 0){
|
while(backlog > 0){
|
||||||
if(backlog > 10)
|
|
||||||
printf("timer simulation lagging behind (%d ticks)\n", backlog);
|
|
||||||
HAL_TIM_PeriodElapsedCallback(htim);
|
HAL_TIM_PeriodElapsedCallback(htim);
|
||||||
exec_counter++;
|
exec_counter++;
|
||||||
backlog = nb_exec - exec_counter;
|
backlog = nb_exec - exec_counter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user