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.

CC2642R: Alternate of sleep() function in SDK

Part Number: CC2642R

Hi,

i want to give some delay/sleep a process/thread  for 3 to 5 sec's. but the problem am facing is , when i called the sleep(3) from a thread it's working fine but when i called the sleep(3) from any function (called from any thread) it's not working fine. can you please tell me any alternative to overcome this issue.


Iam usng CCS IDE with Simplelink SDK version 5.20.00.2


let me explain bit clear for my issue


void* main_thread(void arg0)

{

sleep(2); // it's working fine and it's waiting fine.

func();

while(1);

printf("end of thread\n");

void func(void)

{

sleep(2); //it's not working

}

the sleep from func function going to block for ever, that means iam not even getting that print statement.


I hope you got my problem. if not please b clear about your doubt. i will try to explain it again bit more clearly.