I have created one OS Task to monitor the ADC values. To scan the channels I’m using a hardware timer of 1ms. Every 1ms I’m initiating ADC scan. For synchronization I have used Binary Semaphore. From ADC ISR as soon as ‘n’ samples are acquired I’m releasing semaphore using xSemaphoreGiveFromISR. In OS Task I’m using xSemaphoreTake to acquire semaphore. It is working smoothly for some duration for e.g. 7-8seconds or even 10-15minutes. But later I’m getting an Hard Fault at
configASSERT( pxQueue->uxItemSize == 0 )
pxQueue->uxItemSize is holding an non-zero value and getting hardfault.
Thanks in advance.