Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL,
Tool/software: Code Composer Studio
I am using sim800l to interface with tm4c1294xl but i don't know how to deal with UART1 .
please tell me how to send data to the sim800l module using UART1 and how can i enable UART1
below is my code and it print nothing on console .
void
ConfigureUART(void)
{
//
// Enable the GPIO Peripheral used by the UART.
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
//
// Enable UART1
//
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
//
// Configure GPIO Pins for UART mode.
//
ROM_GPIOPinConfigure(GPIO_PB0_U1RX);
ROM_GPIOPinConfigure(GPIO_PB1_U1TX);
ROM_GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);
//
// Initialize the UART for console I/O.
//
UARTStdioConfig(1, 9600, g_ui32SysClock);
}
//*****************************************************************************
//
// Print "Hello World!" to the UART on the Intelligent UART Module.
//
//*****************************************************************************
int
main(void)
{
//
// Run from the PLL at 120 MHz.
//
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
//
// Configure the device pins.
//
PinoutSet(false, false);
//
// Enable the GPIO pins for the LED D1 (PN1).
//
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_1);
//
// Initialize the UART.
//
ConfigureUART();
//
// Hello!
//
UARTprintf("Hello, world!\n");
UARTCharPut(UART0_BASE, '@');