5 years, 6 months ago.

error : "ISR Queue overflow" when interrupt occurs

I created the following code in consideration of a class that generates an interrupt and responds to received data, but I confirmed the following error message when an interrupt occurred.

Error Message: CMSIS-RTOS error: ISR Queue overflow

What is the cause of the error? How should I write correctly? I hope that you can tell.

code :

main.cpp

#include "mbed.h"
#include "mbed_memory_status.h"

class UartTest{
public:
    UartTest(PinName tx, PinName rx) : uart(tx, rx)
    {
        printf("in class\r\n");
    }
    ~UartTest(){}
    
    void run(){
        uart.attach(callback(this, &UartTest::rx_isr_), Serial::RxIrq);
        thread_.start(callback(&uart_event_, &EventQueue::dispatch_forever));
    }

private:
    EventQueue uart_event_;
    Thread thread_;
    Serial uart;

    void rx_isr_(){
        print_all_thread_info();
        print_heap_and_isr_stack_info();
        uart_event_.call(callback(this, &UartTest::isr_task_handler));
    }

    void isr_task_handler()
    {
        uart.printf("isr_task_called\r\n");
        wait_ms(10);
    }
};

UartTest pc(USBTX, USBRX);

int main() {
    printf("in main()\n\n");
    pc.run();
    while(1){
        wait(0.2);
    }
}
  • This is translated by google translation.
Be the first to answer this question.