Hi, we are trying to find a cause of a HardFault in a STM32F427 application. The FreeRTOS is version 10.4.3 and we are using mixed POSIX and non-POSIX tasks/libraries.
We have tried a number of approaches, but we could not find the cause yet.
There is one thing that could lead to the cause: there is a task that use pthread_cond_timedwait with a timeout of 10 ticks, normally the function exits with ETIMEDOUT or a task giving the pthread_cond_signal and thats fine.
But sometimes the function exits with zero error, like if some task has given the cond_signal, but no other task did it, as far as I could check. I did this by checking in xQueueGenericSend if the semaphore in the conditional variable was accessed just before the problem occur.
I don’t know yet if this is directly related to the cause of the HardFault, but it seems like something is corrupting the memory somewhere, and this could lead to the cause.
Is this a good approach? Or there would be a better way to find why the pthread_cond_timedwait is exiting with zero without other task intentionally giving the cond_signal?
Thank you in advance.