I am trying to get the UART0 interrupt to trigger on my device with nortos. I am trying to configure it to trigger on RX and RT and my code is as follows.
// Enable the UART peripheral PRCMPeripheralRunEnable(PRCM_PERIPH_UART0); PRCMPeripheralSleepEnable(PRCM_PERIPH_UART0); PRCMPeripheralDeepSleepEnable(PRCM_PERIPH_UART0); PRCMLoadSet(); while (!PRCMLoadGet()); // Enable UART pins for Rx\Tx IOCPinTypeUart(UART0_BASE, IOID_19, IOID_18, IOID_UNUSED, IOID_UNUSED);
In another function I do the following.
//Disable UART before changing configuration UARTDisable(UART0_BASE); // Set the configuration of the UART. // Clock rate 48 MHz // 8 Data bits per byte // 1 Stop Bits // 0 Parity UARTConfigSetExpClk(UART0_BASE, GET_MCU_CLOCK, 115200, UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE); // Enables the transmit and receive FIFOs. UARTFIFOEnable(UART0_BASE); // Disable hardware flow control for both CTS and RTS UARTHwFlowControlDisable(UART0_BASE); // Set interrupt levels for TX FIFO and RX FIFO UARTFIFOLevelSet(UART0_BASE, UART_FIFO_TX1_8, UART_FIFO_RX1_8); // Enables the interrupt for UART0 for RX UARTIntEnable(UART0_BASE, UART_INT_RT | UART_INT_RX); // Registers the INTRX_DEBUG_IRQHandler function to be called after interrupt UARTIntRegister(UART0_BASE, INTRX_DEBUG_IRQHandler); // Enable the UART UARTEnable(UART0_BASE);
IntMasterEnable();
So the RX and TX of the UART work correctly and I am able to communicate through it, but the interrupt handler INTRX_DEBUG_IRQHandler never triggers. I tried calling IntPendGet(INT_UART0_COMB) and it returns true.