Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 5 months ago. This question has been closed. Reason: Off Topic
How to get rid of ISR Queue Overflow error?
I am receiving messages from serial com, and them storing them in a queue.
My queue is defined global like so:
Queue<char, 400> comQ;
And then in my main I attach that serial com like this:
com12.attach(&newMessage);
And then the idea is that I put those characters coming in inside the comQ, and fetch them when I need to read them, which may be a considerable amount of time later for a real-time system, especially when taking into account that ISR will work constantly if messages are coming in fast...
void newMessage() { static char inputBuff; while (com12.readable()) { inputBuff = com12.getc(); comQ.put(&inputBuff); //store the char in queue for later use } }
And then I got the following error from doing that:
+ MbedOS Error Info ++
Error Status: 0x80020126 Code: 294 Module: 2
Error Message: CMSIS-RTOS error: ISR Queue overflow
Location: 0xC0F3
Error Value: 0x2
Current Thread: rtx_idle Id: 0x1000037C Entry: 0xCDF7 StackSize: 0x200 StackMem: 0x10000408 SP: 0x10007F60
For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80020126
MbedOS Error Info
What exactly can I do, other than to possibly separate/slow down the messages...? And is the error with comQ or with the ISR itself? Is there simply too many messages coming through com12, or is there a way to get rid of this error?
I've tried to add the following line to help the problem: #define OS_ISR_FIFO_QUEUE 30 but it hasn't solved anything. I've also tried to put 'com12.attach(NULL)' at beginning of newMessage function, and then com12.attach(&newMessage); at the end. No methods worked so far for me.
I'm working on LPC1768, on the online compiler.