In OEMInterruptHandler(), I add some code to see Uart FIFO count.
I set my uart Rx-interrupt trigger level : 4 bytes.
In my expectation, the debug msg is:
Check Uart1 FIFO Count 4
Check Uart1 FIFO Count 4
Check Uart1 FIFO Count 4
....
But sometime, the debug msg is:
Check Uart1 FIFO Count 15
.....
It means the Overrun error, the FIFO is full.
Why?
The CPU miss Uart1 Interrupt?
or
OS call OEMInterruptHandler() too slowly?
Please give me a hand, thx for your suggestion.
[OEMInterruptHandler]
/////////////////////////////////////////////////////
else if(IntPendVal == INTSRC_UART1) // SERIAL
{
RETAILMSG(0, (TEXT("INT:SYSINTR_SERIAL INT\r\n")));
SubIntPendVal = s2410INT->rSUBSRCPND;
if(SubIntPendVal & INTSUB_ERR1)
{
s2410INT->rINTSUBMSK |= INTSUB_ERR1;
}
else if(SubIntPendVal & INTSUB_RXD1)
{
s2410INT->rINTSUBMSK |= INTSUB_RXD1;
//*****************************************************************
RETAILMSG(1, "Check Uart1 FIFO Count %d", (pUart1->rUFSTAT & 0xf) );
}
else if(SubIntPendVal & INTSUB_TXD1)
{
s2410INT->rINTSUBMSK |= INTSUB_TXD1;
}
else
return SYSINTR_NOP;
///////////////////////////////////////////////////////////