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.

CCS/TMS320F28377D: Semaphore_pend returns always true

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

Hello,

I have some trouble setting Semaphore. Here is my configuration code:

var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');

var semaphoreParams = new Semaphore.Params();
semaphoreParams.instance.name = "sem";
semaphoreParams.mode = Semaphore.Mode_BINARY;
Program.global.sem= Semaphore.create(0, semaphoreParams);

In my application code, I was trying to call Semaphore_pend:

bool sem_return = Semaphore_pend(sem, BIOS_WAIT_FOREVER);

Because I never post semaphore in other places, I am assuming the semaphore pend will be pending forever. However, the semaphore pend returns quickly and the return value is true. Any ideas?

Thanks

Fei