Hi all,
Basics: the IC is TM4C1294NCPDT, (same one used on the EK) the board is custom. Using CCSv6.
Our board uses 8 uarts. To test the hardware, we wrote a basic test program that sends bytes via UART in one port and expects to receive them in another. Everything works, except transmitting via PA5_U3TX. I am probably blind to something with so much cut and paste... but maybe there's a special requirement to configure pin #38 that I failed to read.
UART configurations are:
void InitCN5A(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); // Pins UART1 GPS_TX e GPS_RX
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1); // Enable GPS Uart1
GPIOPinConfigure(GPIO_PB0_U1RX);
GPIOPinConfigure(GPIO_PB1_U1TX);
ROM_GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);
ROM_UARTConfigSetExpClk(UART1_BASE, g_ui32SysClock, 912600,(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |UART_CONFIG_PAR_NONE));
}
void InitCN7(void)
{
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); // Pinos RX5 (U3RX/PA4/37) e TX5(U3TX/PA5/38)
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART3); // Enable Uart3
GPIOPinConfigure(GPIO_PA4_U3RX);
GPIOPinConfigure(GPIO_PA5_U3TX);
ROM_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_4 | GPIO_PIN_5);
ROM_UARTConfigSetExpClk(UART3_BASE, g_ui32SysClock, 912600,(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |UART_CONFIG_PAR_NONE));
}
And the loop where the things should get tested is:
case 25: // Send some char
sent_char = 99;
ROM_UARTCharPutNonBlocking(UART1_BASE,sent_char);
char_count++;
systick_task = 26;
break;
case 26: // Wait for received character on U3RX
// Test without interrupt
while(ROM_UARTCharsAvail(UART3_BASE))
{
received_char = ROM_UARTCharGetNonBlocking(UART3_BASE);
}
// End of debug test
if (received_char)
{
if (received_char == sent_char)
{
char_matches++;
}
received_char = 0;
systick_task = 25;
}
if (systick_counter == systick_next_count) // End of test time
{
systick_task = 27;
}
break;
case 29: // Send some char
sent_char = 88;
ROM_UARTCharPutNonBlocking(UART3_BASE,sent_char);
char_count++;
systick_task = 30;
break;
case 30: // Wait for received character on U1RX
// Test without interrupt
while(ROM_UARTCharsAvail(UART1_BASE))
{
received_char = ROM_UARTCharGetNonBlocking(UART1_BASE);
}
// End of debug test
if (received_char)
{
if (received_char == sent_char)
{
char_matches++;
}
received_char = 0;
systick_task = 29;
}
if (systick_counter == systick_next_count) // End of test time
{
systick_task = 31;
}
break;
This piece of code is just the relevant part for a complete loop back test. If you'd need the rest of the case statements I'll be happy to post, but I suspect that I am really forgetting something basic... The same thing is working for other uarts, but I can't get U3 to transmit anything!!!
To make sure it is not a hardware problem, I configured the same pin as GPIO, send a high signal via PA5, which was properly received on the other end of the circuit.
Help appreciated!!!