Need help: periodic timer semaphore block

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help: periodic timer semaphore block

550 Views
OldPeculier
Contributor II

Hi team.  I setup _timer_start_periodic_every(), but it only executes twice and then TAD reports the timer status as lw_semaphore_block.  The timer has the highest priority and all other tasks are time slice.  This is part of a larger program I inherited and I don't know how to track it down.  Thanks!

0 Kudos
3 Replies

308 Views
c0170
Senior Contributor III

Hello OldPeculier,

I propose to check files in folder \source\timer.

Probably good start is _timer_test function which might unveil an error what has gone wrong or at least debug/check ti_task.c file where is the task and also timer ISR.

Regards,

MartinK

0 Kudos

308 Views
OldPeculier
Contributor II

Thanks Kojto,

I think I solved it:  When a task "creates" a task, the parent can terminate ant the child is active.  I assumed this was true for creating a timer as well, but it seems the timer must be in an active task.  In this case I moved the "timer_start..." to an active, low-priority time slice task and now it works.  Can anyone confirm this?

0 Kudos

308 Views
c0170
Senior Contributor III

Hello,

timer component creates new task with a priority set to TIMER_DEFAULT_TASK_PRIORITY by default. If you have more active tasks, your application has to assure timer task gets time to run.It must be active in order to be functional.

Regards,

MartinK

0 Kudos