anonymous wrote on Friday, August 10, 2012:
Is portMAX_DELAY required to be 0xFFFFFFFF for a 32-bit tick? What happens if this timeout is actually reached for an xQueueReceive() call?
Here’s the background:
I have several tasks that call xQueueRecieve on a queue with a timeout of portMAX_DELAY. One task (a console processor) is expected to routinely reach the 32-bit timeout, others are expected to never reach it. I was testing that the one that is routinely supposed to reach the portMAX_DELAY timeout work correctly. A portMAX_DELAY of 0xFFFFFFFF is 49.7 days for me. I didn’t want to wait that long for my test, so I set it to 10 minutes (600000 ticks). When I ran my app, ALL of my tasks that call xQueueReceive() with portMAX_DELAY locked up, even the ones that were successfully receiving from the queue for the entire 10 minutes. The one task that I was testing (the one that was blocked for the entire 10 minutes) is stuck in vListInsert() in the iteration loop. I’m guessing that’s why the other tasks stopped working, and I’m also assuming all my other tasks have stopped working too. The only thing I can see running are raw console messages from within ISRs saying that none of my ISTs are running… I have a lot of experience with causing tasks to get stuck in vListInsert(), but not like this.
Thanks,
Andy