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

To check flow of RTOS Tiny execution.

Hi All

On test board:Leds(2 nos) --> P1.1,P1.2
Buzzer --> P1.3

In Task0:Task1 and Task2 are created.
In Task1:
led1 = On,led2 = off --> delay() --> led1 = Off,led2=On.
In Task2:
buzzer = On --> delay() --> buzzer = off.

Serial port,Timers,Interrupts not initialised.
No external RAM connected(only one int var used in code).

After running this program on 89C51RD2 nothing was working.
what might be the problem ?
Do i have to initialise Timer,interrupts ?
is this problem related to delay routines ?
can any body suggest how can i check flow of RTOS program execution
by using above on board resources ?

Thanks
regards
Naresh

  • Hi Naresh,

    I am not familar with the 8-bit hardware, but there are good examples in C166 environment, so I guess there are some examples too in C51 toolchain.
    In C166 environment you will find it under EXAMPLE subfolder, but have look at the additionally files, since as I will mention below the printf's are excluded.

    There will be used a USER DEBUG function which give the states of the tasks and in which task you are currently. Since µVision has a build in function of printf in debugger/simulator I would suggest you to use this to output some usefull text for debugging purposes.
    (I use it,since I am beginner in RTOS programming and for me this give some usefull hints.)

    Sorry for may not be more helpfully in this case.

    Stefan

  • Hi Naresh ,

    sorry I have forgotten some points.
    An eval-version of C166, if no examples available you can download ( as known ) at KEIL for free of charge.

    The Timerinterrupt depends from what timer interrupt you want to use.
    In common the OS will enable the global interrupt flag as I know, but may be differences between RTX Tiny and RTX full.
    So the full version works with preemptive multi tasking , the Tiny with Round-Robin, limited to 32 tasks and so on.

  • Thanks stefan,

    i had tried example in which
    Task0 --> initialises serial
    port,Task1,Task2

    Task1 --> putchar('1');
    Task2 --> putchar('2');

    again o/p was same as o/p of previously posted message.

  • Hi Naresh,

    was a little bit shamed to be not able to help you.
    But I have now written a very short
    programm using the RTX Tiny you can use for you own code.

    It initializes the ASC interface to printf a text in the Tasks and IO's where my code only toggle a pin for LED using a delay.
    (But task2 is prepared for a buffer on/off
    code sequence.)
    I tested in simulator/debugger and in hardware - it is working.

    So I recognized the delays are not the problem.
    This seems to be the init of your ASC.
    ( I will write short commends to my code. )

    If you leave your e-mail I send it to you.
    (OK it is written for XC16x but you can it easy adapt.)

    Stefan

  • Hi Stefan

    Thanks for taking out time for RTX tiny.
    mail at:nareshr@zicomsecure.com

    regards
    Naresh

  • Hi Naresh,

    I sent it to you by e-mail.
    Please check your account.

    Stefan

  • Hi stefan

    I have received ur mail.
    Thanks for that.
    I will go through codes.

    Regards
    naresh

  • Ok Naresh,

    if any questions about my code, please wrote it to my e-mail.
    So we can discuss some other possibilities too and/or simulator/debugger purposes.

    Stefan (sorry for delayed answer)