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.

SYS/BIOS based firmware locked up with "assertion failure: A_overflow"

Expert 1960 points
Other Parts Discussed in Thread: SYSBIOS

Dear Folks,

We have developed a Sys/BIOS-based project running in F28377D MCU. But after running for a while it would stop. To debug, I ran it with CCS connected via JTAG emulator. Then I found that stopped with an error message shown in the CCS Console window, as shown below:

ti.sysbios.knl.Semaphore: line 332: assertion failure: A_overflow: Count has exceeded 65535 and rolled over.
xdc.runtime.Error.raise: terminating execution

I brought up ROV (RTOS Object View) and inspect the tasks, but found nothing abnormal. All tasks seem to run fine within the allocated stack space.  Wondering what else it could go wrong? Any advice is appreciated!

  • Hi Shef,

    Semaphores have an internal count field to keep track of how many times said semaphore has been posted. For F28x devices the count is a 16-bit unsigned integer. This error gets raised when a counting semaphore is continuously posted and the semaphore count exceeds max value the data type can represent (in this case 65535). This means that your application is calling Semaphore_post() more than it is actually calling Semaphore_pend().

    You need to examine your application & determine where exactly Semaphore_post() is being called & why it is being done so frequently. You might also want to consider using a binary semaphore (these do not overflow) if your code is using the semaphore to block/protect a single resource.

    Hope this helps,
    -- Emmanuel