AnsweredAssumed Answered

Problem running a periodic timer and one shot timer

Question asked by Larry DeMuth on Nov 7, 2018
Latest reply on Nov 7, 2018 by Larry DeMuth

I'm using a K64 and my code needs to run 2 types of timers in 2 different tasks.

One timer is a periodic timer and is set up with a call to _timer_start_periodic_every function, and the period is 100mS. The timer works fine.

 

The other timer is a one shot timer and is set up with a call to _timer_start_oneshot_after function, and the time is between 1 and 1000 seconds. The will be very infrequent, but when I invoke the code, the _timer_start_oneshot_after function stops at the _lwsem_wait, in the _timer_start_oneshot_after_internal function, and never returns.

 

If I remove the periodic timer and invoke the code for the one shot timer, the one shot works fine, so I verified both timers work by themselves.

 

Is it not possible to run 2 timers? Or a combination of timers? I have tried adjusting the timer priority (1, 2, 10)  and stack size (10k for verifying this isn't the problem), but it doesn't seem to help.

 

Larry

Outcomes