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
  • 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?

Reply
  • 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?

Children
No data