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.

UART in EVM5515

Hello,

I have configured UART module in that way:

void Init_UART(void)

{

UART_PWREMU_MGMT = 0x0001; //Place UART Tx and RX in Reset + Free

UART_DLH = 0;

UART_DLL = 0x0017; //Baud Rate = 115200 bps

UART_FCR = 0x0001; //FIFOEN=1;

UART_FCR = 0x0007; //Clear FIFO Rx and Tx

UART_IER = 0x0007; //Enable Interrupts

UART_LCR = 0x0003; //No Parity, 1 STOP bit, 8 data bits

UART_MCR = 0x0000; //No break control, RTS&CTS disabled, Loopback mode disabled, Autoflow disabled

UART_PWREMU_MGMT = 0x7FFF; //Enable Tx & Rx, Free mode

}

void Init_Clock(void)

{

//Enable clocks to all peripherals

PCGCR1 = 0x0000;

PCGCR2 = 0x0000;

CCR2 = 0x0000; //Bypass Mode RTC
 

CGCR1 = 0x84FC; //1280*32768=41,943,040 Hz

CGCR2 = 0x8000; //Bypass reference divider

CGCR3 = 0x0806; //Testing Purposes

CGCR4 = 0x0000; //Bypass divider

while((CGCR3 & 0x0008) == 0);

CCR2 = 0x0001; // PLL Mode

}

void Init_Peripherals(void)

{

unsigned short i;

PCGCR1 = 0;

PCGCR2 = 0x0004; //Reset all peripherals

PSRCR = 0x02;

PRCR = 0x00BF;

for(i=0; i<200; i++);

EBSR = 0x1500; // parallel port: mode 1, serial port: mode 1 

}

After that, I send this message:

strcpy((char *)data,"@,1\r");

while((UART_LSR & 0x60)==0);

UART_THR = data;

 

However, I think that th message is not sent as I opened hyperterminal and i can't see anything sent through UART.

I hope you can help me!

Thank you!