hello,
In my project i want to use UART 2 to communicate with zigbee. I have written code to activate UART2 but i didn't seen my data in that UART2_BASE register using putty terminal.but it works for UART0 so,what the problem with other UARTs
my code is
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/uart.h"
#define GPIO_PC4_U4RX 0x00021001
#define GPIO_PC5_U4TX 0x00021401
#define GPIO_PD6_U2RX 0x00031801
#define GPIO_PD7_U2TX 0x00031C01
int main(void) {
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART2);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
GPIOPinConfigure(GPIO_PD6_U2RX);
GPIOPinConfigure(GPIO_PD7_U2TX);
GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_6| GPIO_PIN_7);
UARTConfigSetExpClk(UART2_BASE, SysCtlClockGet(), 115200,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
UARTCharPut(UART2_BASE, 'E');
UARTCharPut(UART2_BASE, 'n');
UARTCharPut(UART2_BASE, 't');
UARTCharPut(UART2_BASE, 'e');
UARTCharPut(UART2_BASE, 'r');
UARTCharPut(UART2_BASE, ' ');
UARTCharPut(UART2_BASE, 'T');
UARTCharPut(UART2_BASE, 'e');
UARTCharPut(UART2_BASE, 'x');
UARTCharPut(UART2_BASE, 't');
UARTCharPut(UART2_BASE, ':');
UARTCharPut(UART2_BASE, ' ');
while (1)
{
if (UARTCharsAvail(UART2_BASE)) UARTCharPut(UART2_BASE, UARTCharGet(UART2_BASE));
}
}
so please suggest me how can i overcome this problem