Other Parts Discussed in Thread: CCSTUDIO
Dear Sir,
I use a semaphore to sync 2 tasks on 6437 EVM.
Please refer to the following for my code:
In task1: (Higher task priority:5)
SEM_Handle semYBufRdy;
semYBufRdy = SEM_create(0, NULL);
SEM_pend(semYBufRdy , SYS_FOREVER);
In task2:(Lower task priority:1)
extern SEM_Handle semYBufRdy;
if ( SEM_count(semYBufRdy) == 0 )
{
EDMA3_Copy( (signed char *)y_buffer, (signed char *)net_y_bufferA, FRAMESIZE );
SEM_post(semYBufRdy);// Signal Y buf ready
}
Task1 will be stuck in "SEM_pend(semYBufRdy , SYS_FOREVER)" after running my program for 1 or 2 minutes.
Then I check the count of the semaphore, the count is "1"!!
Why does my program get stuck in SEM_pend() while the semaphore count is "1"??
Please help me out. Thank you!!
Best Regards,
Eric Fang