Hi, I'm trying to set up the UART module of my TM4C1294XL board but I can't answer a question: "If I want to setup the UART module did I must call the UARTClockSourceSet() function?"
In order to illustrate my problem, that's how I'm trying to configure the UART module
/*Initialize GPIOC for UART*/ SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC); /*Enabling UART7*/ SysCtlPeripheralEnable(SYSCTL_PERIPH_UART7); /*Configuring GPIO pins for port C*/ GPIOPinConfigure(GPIO_PC4_U7RX); GPIOPinConfigure(GPIO_PC5_U7TX); /*Setting up GPIOC pins for UART function */ GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_4 | GPIO_PIN_5); /*Setting UART7 clock source*/ /*Setting UART7 configurations*/ UARTConfigSetExpClk(UART7_BASE,UART_CLOCK_PIOSC,9600, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_EVEN))
I'm using UART_CLOCK_PIOSC in the second parameter of the configuration function because I want to have 16MHz for UART7 clock and I don't know if I have to call UARTClockSourceSet(UART7_BASE, UART_CLOCK_PIOSC) before doing it.