xQueueSendBackFromISR fails after many hours

richard_damon wrote on Saturday, February 02, 2013:

A couple of issues that might cause this sort of error.

1) Stack corruption, this ISR uses a LOT of stack for an ISR, since it allocates an 80 byte array. Many ports use the current tasks stack for the ISR, so in this case you need this much extra room in every task’s stack. If one doesn’t have enough, then when you get “lucky” enough to interrupt while that task is active, problems arise.

2) Make very sure that you have interrupt priorities set properly. Most ports only allow ISRs of certain priorities to call FreeRTOS APIs, and an interrupt at a higher level than this can cause corruption that could cause this.