Hi,
I'm trying to convert "uart echo sample" to work with uart1 PORTC6 and PORTC7, with no success.
I'm using IAR compiler with board EK-LM3S9B92-B. The ports are connected to RS232 Transciever to my PC.
The same following code is working OK on uart0 PORTA_0 PORTA_1.
int
main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
IntMasterEnable();
GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_6 | GPIO_PIN_7);
UARTConfigSetExpClk(UART1_BASE, ROM_SysCtlClockGet(), 9600,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
UART_CONFIG_PAR_NONE));
UARTSend((unsigned char *)" 33[2JEnter text: ", 16);
while(1)
{
while(ROM_UARTCharsAvail(UART1_BASE))
{
//
// Read the next character from the UART and write it back to the UART.
//
UARTCharPutNonBlocking(UART1_BASE, UARTCharGetNonBlocking(UART1_BASE));
}
}
}
Thanks in advance.