I've been working on some RTOS MicroC project and whenever I've implemented some function it works just fine outside the task, but whenever I put in the task it just wouldn't do anything. I know I might not get answer to this, but any tips where to start looking would be a big help, thanks in advance.
a_sem = OSSemCreate(1);
static void AppTask1(void *p_arg)
{
(void) p_arg;
INT8U perr;
while (1)
{
OSSemPend(a_sem, 0, &perr);
planeAngles();// Functon that works outside the task
OSSemPost(a_sem);
OSTimeDly(OS_TICKS_PER_SEC/20);
}
}
static void AppTask2(void *p_arg)
{
(void) p_arg;
INT8U perr;
while (1)
{
OSSemPend(a_sem, 0, &perr);
servoTurns(); // Functon that works outside the task
OSSemPost(a_sem);
OSTimeDly(OS_TICKS_PER_SEC/20);
}
}