8 years, 8 months ago.

Handling F746 UART Rx Interrupts

How do I disable/enable UART receive interrupts in a F746NG? In the ISR example below for the K64F (LPC1768 version commented out) I do the following:

1. Disable the UART interrupt

2. Process RX characters

3. Enable the UART interrupt again

4. Exit ISR

void PcRxIRQ(void)
{
    NVIC_DisableIRQ(UART0_RX_TX_IRQn);  //n=0, 1 or 2  Disable Rx interrupt on k64f
    //LPC_UART0->IER = 0;                 //Disable Rx interrupt on mbed1768

    while (pc.readable()) {
        inchar = pc.getc();            //get a character
        PcRxChar(inchar);              //go process char

    }

    NVIC_EnableIRQ(UART0_RX_TX_IRQn);  //n=0, 1 or 2  Re-enable Rx interrupt on k64f
    //LPC_UART0->IER = 1;                //RE-enable Rx interrupt on mbed1768
}

Question relating to:

The STM32F746G-DISCO discovery board (32F746GDISCOVERY) is a complete demonstration and development platform for STMicroelectronics ARM® Cortex®-M7 core-based STM32F746NGH6 microcontroller.

1 Answer

8 years, 8 months ago.

There is no reason why you would need to disable the interrupt while processing the current interrupt. It simply is not capable of interrupting its own interrupt handler.

Accepted Answer