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

ARM RTOS Problem... Help

Hi friends
I wrote the code for the ARM RTOS(no warnings and no errors)

and NO OUTPUT.. so please suggest me where i am going wrong

i am doing 2 task
task1:buzzer_operation();//turning ON and OFF the buzzer
task2:ADC_operation(); //reading continuously the Analog input and displaying on the LCD

i had checked these two programs individually , they ARE working

could you please tell me where i am going wrong in this code
my code is here

#include<lpc214x.h>
#include"adc.h"
#include"buzzer.h"
/* Include type and function declarations for RTX */
#include <RTL.h>
#include <RTX_Config.h>
/* id1, id2 will contain task identifications at run-time */
OS_TID id1, id2;

/* Forward reference. */
__task void tsk1 (void);
__task void tsk2 (void);

__task void tsk1 (void) { /* Obtain own system task identification number */ id1 = os_tsk_self (); /* Assign system identification number of task2 to id2 */ id2 = os_tsk_create (tsk2, 0); for (;;) { /* do-this */ buzzer(); /* Indicate to task2 completion of do-this */ os_evt_set (0x0004, id2); /* Wait for completion of do-that (0xffff means no time-out)*/ os_evt_wait_or (0x0004, 0xffff); /* Wait now for 50 ms */ os_dly_wait (5); }
}

__task void tsk2 (void)
{ for (;;) { ADC(); /* Wait for completion of do-this (0xffff means no time-out) */ os_evt_wait_or (0x0004, 0xffff); /* do-that */ /* Pause for 20 ms until signaling event to task1 */ os_dly_wait (2); /* Indicate to task1 completion of do-that */ os_evt_set (0x0004, id1); }
}

int main (void)
{ os_sys_init (tsk1); return 0;
}

Parents Reply Children
  • Dear Andrew Neil
    i am the new comer for this forum...
    i am busy with some other task, i dont have much for discusig something else ...
    please undestand my problem, i thought to delete/edit that post but no options, if it is possible with you means please delete that post.....

    Urget sollution is required for ARM RTOS code
    if you know the solution for this problem please post it here

  • Most people reading this forum are busy with other tasks.

    So you - the one with a problem - have to invest of your time to make it quicker for us to read your code. At least if you are interested in getting free help from others.

    Urgent needs should mean urgent time spent making the bests post you can possibly make. It most definitely isn't urget for anyone else to look at your problems unless you pay premium consultancy fees to a consultant.

    Or didn't you notice that this is an end-user forum? Oops! And you didn't notice the comments on how to post source code? Oops? What other things didn't you notice? Maybe something from the manual or usage examples?

  • All the more reason to take care to read the instructions before posting, then!

    "if you know the solution for this problem"

    What have you done so far in an attempt to resovle the problem?

    Have you studied the RTOS documentation carefully to ensure that you understand how to use it?

    Have you reviewd your code carefully to ensure that it follows the requirements stated in the documentation?