This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123AE6PM: UART Interrupt not firing.

Part Number: TM4C123AE6PM

Tool/software:

After replacing the MPU's from a prior over-current, the system tick interrupt now works.  Now I'm trying to get a UART interrupt to work.  I set a breakpoint on the ISR and it never traps.  Code:

void UartInterrupt(void) {

 

    const int Error_Mask = 0x00000F00;

    const int Data_Mask  = 0x000000FF;

 

    int IntStatus = UARTIntStatus(UART4_BASE, true);    // Clear interrupt.

    UARTIntClear(UART4_BASE, IntStatus);

    while( ! (UART4_FR_R & UART_FR_RXFE)) {     // Until the FIFO is empty, receive characters.

       int Data_And_Errors = UART4_DR_R;

       int Errors = Data_And_Errors & Error_Mask;

       u8  Char   = Data_And_Errors & Data_Mask;

       if(! Errors) { UARTCharPut(UART4_BASE, Char); }

}

 

int main(void) {

 

    SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_XTAL_20MHZ | SYSCTL_USE_PLL);     // Should be 80MHz

    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);

    while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOC)) {}

    SysCtlPeripheralEnable(SYSCTL_PERIPH_UART4);                // Enable UART4 Debug Port.

    while(!SysCtlPeripheralReady(SYSCTL_PERIPH_UART4)) {}

    GPIOPinTypeUART(GPIO_PORTC_BASE, PC_DebugRx_BIT | PC_DebugTx_BIT);

    GPIOPinConfigure(GPIO_PC4_U4RX);

    GPIOPinConfigure(GPIO_PC5_U4TX);

 

    UARTConfigSetExpClk(UART4_BASE, 80000000, 9600,

             ( UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE ));

    UARTFIFOEnable(UART4_BASE);

    UARTIntRegister(UART4_BASE, UartInterrupt);            // Register Interrupt Handler.

    UARTIntEnable(UART4_BASE, UART_INT_RX | UART_INT_TX | UART_INT_OE | UART_INT_FE | UART_INT_RT );

    IntEnable(INT_UART4);

 

    while(true) {}

}

Thanks, Doug