Skip to content

Interrupts on UART2 (Serial console) on Nucleo-F401 #2119

Closed
@hesolium

Description

@hesolium

I have old program running on Nucleo-F401 and Nucleo-L152. All communication with the computer is performed through the serial (UART2) using interrupts. For transmit I use simple ISR:

void Console::writeService() {
    while(console.writeable()) {
        short c = consoleOut.char2send();
        if(c < 0)
            break;
        console.putc(c);
    }
}

I have a problem with the latest (MBED-DEV) library on Nucleo-F401 (on L152 is OK).
After execution command: console.attach(this, &Console::writeService, Serial::TxIrq);
the application runs very slowly (100x). I took advantage of gdb and I noticed that the interrupt handler (uart_irq in module serial_api.c) is executed very often. Neither the application nor the computer does not send any characters. It seems that this low level ISR takes 99% CPU power for no reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions