We have been trying for a while to track down a particularly nasty problem. At some point during execution one of our tasks fails to ever return from a call to xQueueReceive() in spite of the fact that data has been added to the queue.
Specifically, the task executes at priority 10, and spends most of it’s time just waiting to receive data from the queue. An interrupt occurs periodically and calls xQueueSendFromISR() to push data into the queue. At this point the task should resume and process the data, but at some point it just never wakes up.
It is important to note that we changed the critical section code to mask ALL interrupts during critical sections (not just the OS tick). We are using the Pic24 port. We changed the following lines:
In portasm_PIC24.S line 56:
` MOV #224, W0 /* changed from 32 to 224 to*/`
In portmacro.h line 90:
`#define portINTERRUPT_BITS ( ( unsigned portSHORT ) 7 << ( unsigned portSHORT ) 5 )`
Any suggestions/thoughts/help would be greatly appreciated!