Tool/software: Code Composer Studio
I dont transmit data to terminal .I use UART3 in library tiva C.Can you help me?
/*
* main.c
*
* Created on: Oct 29, 2017
* Author: huong
*/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>
#include "inc/tm4c123gh6pm.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/interrupt.h"
#include "driverlib/gpio.h"
#include "driverlib/timer.h"
#include "driverlib/adc.h"
#include "driverlib/uart.h"
#include "inc/hw_ints.h"
int main()
{
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART3);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
GPIOPinConfigure(GPIO_PC6_U3RX);
GPIOPinConfigure(GPIO_PC7_U3TX);
GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_6| GPIO_PIN_7);
UARTConfigSetExpClk(UART3_BASE, SysCtlClockGet(), 115200,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
UARTFIFOEnable(UART3_BASE);
UARTEnable(UART3_BASE);
IntMasterEnable(); //enable processor interrupts
IntEnable(INT_UART3); //enable the UART interrupt
UARTIntEnable(UART3_BASE, UART_INT_RX); //only enable RX
UARTFIFOLevelSet(UART3_BASE,UART_FIFO_TX1_8,UART_FIFO_RX1_8);
IntPrioritySet(INT_UART3,1);
while(1)
{
UARTCharPut(UART3_BASE,'x');
SysCtlDelay(SysCtlClockGet()/1000);
}
}