Hello,
I made a test board for TM4C123GH6PM .
I want TRY use UART port. But just UART0 working without problem.
UART1-7 not working.
My code is there,i just changed port and uart value when trying other uart:
where is the problem?
///////////////////////////////////////////////////////////////////////////
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
static char send[100];
int i;
int deviceAddress;
int
main(void)
{
SysCtlClockSet(SYSCTL_SYSDIV_1|SYSCTL_USE_OSC|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 9600,(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |UART_CONFIG_PAR_NONE));
UARTEnable(UART0_BASE);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
while(1)
{
SysCtlDelay(4000000);
sprintf(send,"hi man this is tiva\r\n");
i = 0;
while(send[i]!='\0')
{
UARTCharPut(UART0_BASE, send[i]);
i++;
}
}
////////////////////////////////////////////}