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.

TM4C123GH6PM: When to call IntPrioritySet() in the configuration process?

Part Number: TM4C123GH6PM

At what stage in the peripheral configuration process is it appropriate to set that peripheral's priority via IntPrioritySet()? 

Specifically right now I am only needing to set the priorities of UART and GPIO ISR's, however, It would be nice to have my question generally answered as I may add more later on.

My thinking is that it would be best to call IntPrioritySet() after the peripheral is configured, but before the peripheral's interrupt is configured and enabled. Is this a safe bet for all peripherals?

Example:

SysCtlPeripheralEnable(SYSCTL_PERIPH_UART5); // UART5: Master/GPS Bus Line
SysCtlDelay(80);

GPIOPinConfigure(GPIO_PE5_U5TX);
GPIOPinTypeUART(GPIO_PORTE_BASE, GPIO_PIN_5); //Enable alternate functionality
GPIOPinConfigure(GPIO_PE4_U5RX);
GPIOPinTypeUART(GPIO_PORTE_BASE, GPIO_PIN_4); //Enable alternate functionality

//Set the baud rate, number of data bits, turn off
// parity, number of stop bits, and stick mode.
UARTConfigSetExpClk(UART5_BASE, CLOCKRATE, UART5_BAUDRATE, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));

IntPrioritySet(INT_UART5, 0x20); // <-- Is this a good place??

IntEnable(INT_UART5);

UARTIntEnable(UART5_BASE, UART_INT_RX | UART_INT_RT); // Enable the UART interrupt.

Thank you!

Marshall