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

RTX51-Tiny and os_wait1 problem

Hello,
My target board is based on RTX51-Tiny V2.02 and 89C51RD2 micro. I'm facing a strange problem that I hope you will be able to solve.
I have a task (X) that inside of him he creates another task (Y). After task X creates task Y he waits (os_wait1(K_SIG)) for signal from task Y, and after receiving it he continue with his code.
In theoretic and also in reality, the software suppose to "stack" on os_wait1 forever until he receive signal. What really happen is that the code creates the Y task and immediately continues like he received the Y signal. I run the code with emulator and set break points where ever a os_send_signal(X) occur, but the code never break on them. I also sow that os_create_task(Y) returns OK (0) value and os_wait1(K_SIG) returns SIG_EVENT (4) value, meaning he received signal, but from where?
Note that the code also include interrupt task. Maybe the interrupts interfere and the bug in earlier OS version still exist (see paragraph 1 in http://www.keil.com/support/man/docs/tr51/tr51_problems.asp)
Also, the Round-Robin task switching is disabled.
The code looks something like that:

void task_x(void) _task_ X
{
  while(1) {
    //some code
    os_create_task(Y);
    os_wait1(K_SIG);
    //some code
  }
}
Thanks a lot in advance,
Ruven

0