Other Parts Discussed in Thread: EK-TM4C1294XL
HI, i'm a newbie, it will much appreciated if u could help me with these :)
1. After configuring the PB1 and PB0 as UART1 pins, how do I write something on the UART1?
2. If i use UARTprintf ("Hello"), will it be written on UART0 or UART1?
The code i'm going to use to initialise UART1 is:
SysCtlPeripheralReset(SYSCTL_PERIPH_UART1);
SysCtlPeripheralReset(SYSCTL_PERIPH_GPIOB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
GPIOPinConfigure(GPIO_PB0_U1RX);
GPIOPinConfigure(GPIO_PB1_U1TX);
GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);
UARTConfigSetExpClk(UART1_BASE, SysCtlClockGet(), 115200,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));
3. If i want to change the baud rate to 9600, can i just change the value 115200--->9600? Or is there additional steps?
Thanks in advance