Hi guys,

I wonder if one of you can help me.  I've been using the DSP/BIOS binary semaphores with a C5504 and I've found that when I look at the semaphore count in the code composer ROV window there is often a count that isn't 0 or 1.  Sometimes the count can be really huge or even negative.  I would expect this with a counting semaphore (unfortunately it seems that the DSP/BIOS counting semaphores don't use saturation logic) but I am DEFINITELY using a binary semaphore.  Please see the code fragment below:

Tx interrupt handler:

        /* Post the semaphore so that the serial Tx task can run. */
        SEM_postBinary(transmitCompleteSemaphore);

Tx task:

/* Wait until there is a free transmit slot. */
    (void)SEM_pendBinary(transmitCompleteSemaphore, SYS_FOREVER);

Has anyone seen this problem before?  Also, has anyone dealt with the counting semaphores issue where there seems to be wraparound?  Any help would be greatly appreciated.

Regards,

Oliver