This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

hello sir, I did both TX and RX operation in UART0. and viewed the transmitted result in puTTy. But in CCS terminal i couldn't see..... And at the same time if i use any UART except UART0, i couldnt get the result.i dont know that where i did mistak

Other Parts Discussed in Thread: TM4C123GH6PM

#include <stdint.h>
#include <stdbool.h>
#include <hw_memmap.h>
#include <gpio.h>
#include <sysctl.h>
#include <uart.h>
#include <interrupt.h>
#include <tm4c123gh6pm.h>
unsigned char a;
void dly(unsigned int ms)
{
ms=(SysCtlClockGet()/3.0)*ms/1000;
SysCtlDelay(ms);
}

void UARTIntHandler()
{
UARTIntClear(UART4_BASE,UART_INT_RX);
UARTCharPut(UART4_BASE,UARTCharGet(UART4_BASE));
}

int main(void)
{

SysCtlClockSet(SYSCTL_SYSDIV_5| SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

SysCtlPeripheralEnable(SYSCTL_PERIPH_UART4);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);

GPIOPinConfigure(0x00021001);
GPIOPinConfigure(0x00021401);
GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_4|GPIO_PIN_5);

UARTConfigSetExpClk(UART4_BASE, SysCtlClockGet(), 115200, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
//UARTFIFOLevelSet(UART4_BASE,UART_FIFO_TX4_8,UART_FIFO_RX4_8);
UARTEnable(UART4_BASE);
UARTCharPut(UART4_BASE, 'E');
UARTCharPut(UART4_BASE, 'n');
UARTCharPut(UART4_BASE, 't');
UARTCharPut(UART4_BASE, 'e');
UARTCharPut(UART4_BASE, 'r');
UARTCharPut(UART4_BASE, ' ');
UARTCharPut(UART4_BASE, 'T');
UARTCharPut(UART4_BASE, 'e');
UARTCharPut(UART4_BASE, 'x');
UARTCharPut(UART4_BASE, 't');
UARTCharPut(UART4_BASE, ':');
UARTCharPut(UART4_BASE, ' ');


while (1)
{
//if(UARTCharsAvail(UART4_BASE)){a=UARTCharGet(UART4_BASE); UARTCharPut(UART4_BASE, a);}
}

}

  • Hello Rukmani,

    Let me first comment on the subject. The subject should be a one liner not the entire post. Details come in the message body.

    Secondly, there is no mention of what the connection is done between the device and the PC for the other UARTs.

    Regards
    Amit