Hi all,
I try to use the UART1(RS232) in interrupt mode,the board is seed-dec6437.my programm can run to the interrupt handler function but only once,eitherFIFO or nonFIFO.
I use dsp/bios v5.41 for this. My configuration is as follows:
In the .tcf file,choose "EXT5",set the function name "_HWI_uart1",the interrupt number "85",use "dispatcher"
in main()
{
C64_enableIER(1<<5) ;
.....
uart1_IER=0x1; //enable rx interrupt
}
and the interrut hadler function like this
void HWI_uart1
{
uart1_IER=0x0; //disable rx interrupt
C64_clearIFR(1<<5) ;
read(uart1_IIR);
read(uart1_RBR);
............
uart1_IER=0x1; //enable rx interrupt
}
void task_uart()
{
while(1)
{
printf(IIR); //once the interrupt Trigger, the value always "0x04"------it means the interrupt always be exist
printf(LSR); //the value always be "0x61",it means a "overrun error" interrupt,even I only send one byte
TSK_sleep(500);
}
}
now I think because the interrupt not be cleared,so it can run only once.but Idon't know how to claer it
Any idea? thanks a lot