This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX Timer Problem

Hi,

We are enabling the system main task at every 10ms interval.

but now we are facing the problem with enabling of the system task @10ms interval ..

could you please any one help us How we can verify the time set by Os_itv_set(1) and Os_itv_wait funciton

our main task is as shown below
void task1(void)
{

os_itv_set(1);

for(;;)
{ os_itv_wait();

}

}

Parents Reply Children
  • The advantages with LEDs is that they consume very little CPU time so you can use this type of debugging almost everywhere.

    The serial port is way too slow to handle printouts. And the CPU load from creating the trace strings is too high for critical sections. In many situations, you will not be able to have serial output from ISR because of reentrancy issues.

    A debugger may be fun, but only for looking at a single-threaded algorithm. Life is no fun anymore when trying to use a debugger with an embedded system with RTOS - the peripherials will not stop just because you reach a breakpoint. You may look at the current snapshot, but when stepping the next instruction, all interrupt sources will fight for the attention. And when the ISR gets called, it is already too late because the ISR didn't get serviced in time because of the breakpoint.

    One thing I have done when debugging an RTOS-based application is to have one diode for each task, and let the task turn on the LED when exiting the wait function, and turn off the LED before starting the next wait.

    The LED for the most prioritized thread will directly show how much CPU time it consumes, and a good scope can help with jitter, longest execution time etc.

    The LED for the second-most prioritized thread will light when this thread runs, or when this thread gots preempted by the most prioritized thread. So longest lit time for LEDB shows longest time to do one action. And (LEDB && !LEDA) informs about CPU load from thread B.

    (LEDC && !(LEDA || LEDB)) informs about the CPU load from the third-most prioritized thread.

    Most of the time, you don't need a scope. The flicker or intensity of the individual diodes is enough.