Run count in embOSView seams wrong

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Run count in embOSView seams wrong

    Hello Segger Team,

    I have an application where 3 Task starts in cooperative multitasking after an interrupt. Every task starts just one time per interrupt. In embOSView the run count of the first task increase faster then the other ones, but if I count the runs with a normal variable and view this over the debugger all 3 task a called in equal frequency. It seams to be an error in embOSView. I use embOSView v3.82p is there a known mistake with the run count?

    Greetings
    Martin
  • Hello Til,

    the project is copyright protected and to big to post it here. But I will explain my task handling:


    At startup the 3 tasks are suspended by calling "OS_Suspend(&Name); " (called for every task) before "OS_Start();".
    Now after initialization the Interrupt occurs natural with calling "OS_EnterInterrupt();" at the beginning of the IRQ-Handler and "OS_Leaventerrupt();" at the end. The IRQ makes some checks an if everything is ok, it is called "OS_Resume(&Task1);".
    When task1 is started he blocks re-resume from IRQ (by setting a global variable) until all 3 tasks are ready. At end of task1 it is called "OS_Resume(&Task2);". At start of Task2 (which have a higher priority then task1) it is called "OS_Suspend(&Task1);". End of task 2 resume task3 which have a higher priority then task2. And similarly task3 suspends task2 and at the end of task3 the blockvariable is reset to allow the start of the next handling by IRQ and task3 calls "OS_Suspend(NULL);" to suspend himself.

    The IRQ is called every 5 ms by an external time event. Runtime of all three tasks together (including task-switch) is round 750 µs.

    Perhaps can I write you an Email for additional support?

    Greetings
    Martin