Need help: periodic timer semaphore block

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Need help: periodic timer semaphore block

1,176件の閲覧回数
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 件の賞賛
返信
3 返答(返信)

934件の閲覧回数
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 件の賞賛
返信

934件の閲覧回数
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 件の賞賛
返信

934件の閲覧回数
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 件の賞賛
返信