Mutex->TasksWaitingToRecieve->NumberOfItems is -1

Hi all,
I have a problem i haven’t been able to solve over the last few days.
The platform is a STM32H7 (single core).

Somehow after a random run time, my firmware fails due to a mutex TasksWaitingToRecieve->NumberOfItems property becoming -1 (i assume its a value of 0 being decremented).

It’s not a stack issue, it’s not a buffer overrrun issue, it’s not a mem corruption issue.
The ListIntegrityValues that FreeRTOS puts in the same List_t structure are intact.

Ive tried debugging and pausing/breaking all over the place trying to find out why it happening, but i haven’t been able to find it.

Has anyone seen this happen before? Any ideas how/why it could happen?

Thanks in advance!

Also a wrong interrupt priority (logically higher than covered by FreeRTOSConfig.h) could also cause a data corruption.
Which FreeRTOS version do you use ? I think, recent versions come with configASSERTs for interrupt priorities. Do you have configASSERT defined ?

1 Like

Are you able to share some code that reproduces this issue?