Hi
I face Receive interrupt problem. I use without CSL. my Program post here.
#include<stdio.h>
#include "usbstk5515.h"
#include "usbstk5515_uart.h"
char message[]="Embedded System with DSP \n \r";
int i,j,l,k;
char receiver[255];
void main()
{
USBSTK5515_init( );
/*----------UART Inialized at 9600--------------*/
SYS_EXBUSSEL &= ~0xF000; //
SYS_EXBUSSEL |= 0x1000; // Set parallel port to mode 1 (SPI, GPIO, UART, and I2S2)
SYS_PRCNTRLR &= ~0x0080; // Make sure UART is out of reset
SYS_PCGCR1 &=(~(1<<2)); // Enable UART clock
UART_PWREMU_MGMT = 0X7FFF; // Place the UART transmitter and receiver in reset
UART_DLL = 0X008b; // 9600-Set baud rate
UART_DLH = 0X0002;
printf("\nSet baud rate 9600\n");
// Clear UART TX & RX FIFOs
UART_FCR = 0x000F; // Non-FIFO mode
UART_IER = 0X0003; // Enable interrupts
UART_LCR = 0X0003; // 8-bit words,
// 1 STOP bit generated,
// No Parity, No Stick paritiy,
// No Break control
for(j=0;message[j]!='\0';j++)
{
while((UART_LSR & 0x60)==0); // Wait for TX ready
EVM5515_UART_putChar(message[j]); // Write 1 byte
}
while(1)
{
if(i>3)
{
for(i=0;i<3;i++) printf("%c",receiver[i]);
i=0;
}
}
}
interrupt void UART_intrDispatch(void)
{
receiver[i]=UART_RBR;
i++;
}
please help me.
Regards
Ramanathan.S