This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC3220MODA: MultiTask

Part Number: CC3220MODA


Tool/software: TI-RTOS

hi,

i have 3 TASKs in my code. The code looks like this :

.......

.......

void* Task_1(void* pvParameters){

/* Task_1 priority = 4*/

sleep(20);

while(1){

GPIO_write(x,1);

sleep(3);

GPIO_write(x,0);

sleep(500);

}

}

void* Task_2(void* pvParameters){

/* Task_2 priority = 3*/

while(1){

sleep(30);

htpp_post();

}

}

void* Task_3(void* pvParameters){

/* Task_3  priority = 2*/

init_RF(); /* RF module. connection type SPI */

while(1){

if(m == 1){ /*Updating m value in gpioReadCallbackFxn0() function */

buf = get_nrf_payload()

uart_write(buf);

......

......

m=0;

}

}

}

my question:  All Task start to work. But after  3 or 4 hours, task_3 has not work. The other two Task continue to work .there is no synchronization between Tasks (semaphore or mail_box).Why does task_3 not work after hours? 

  • Hello,

    Have you tried timing each task to make sure they are all schedulable? Also, try using our ROV tool to see if maybe the task is running out stack space. Since you are not using semaphores or mailbox I'm assuming the tasks are not sharing any memory or communicating to each other.

    Jesu 

  • hello,
    I've used ROV tools doesn't look any overflow .There are several common used global variables between TASKs.No i haven't tried timing . I'll investigate this(timing) and i will be back . thank you
  • Hello,

    I would also like to add if your tasks are sharing memory (global variables) you're not implementing any form of mutual exclusion you leave yourself vulnerable to race conditions which could lead to all sorts of weird behavior.

    Jesu