MCF5282 Uart interrupts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF5282 Uart interrupts

2,092 Views
TTA
Contributor I
Hi,

we are using the MCF5282 on a custom designed board. We are using UART0 in interrupt driven mode. We face a problem where after some time of operation, no interrupts are generated for data in the receive buffer.

We are checking for the error status bits, and reinitializing in case of an error, but we find that the UART times out quite often, and has Overrun Errors / Stops generating interrupts as well..

Has anyone faced this issue.

Also, There was a statement about the Eval board for the MCF5282 from Freescale , the M5282EVB. Something about UART0 being disabled after some time ( something like a power save mode.. ) Can anyone throw some light on this ?

Regards,
TTA
Labels (1)
0 Kudos
2 Replies

537 Views
TTA
Contributor I
An update on this:

When usign the UART, i find that the OE/PE/FE/RB error conditions can occur. I have handled this in the ISR, by clearing the error bits using the UCRn[MISC] , RESET_ERROR_STATUS.

For OE, we read and discard 3 bytes from the Rx buffer ,and reset the Error bit.
The interrupt is set to trigger on RxRDY ( not FIFOFULL ) .
The ISR flow :

ISR()
{

..Mask Interrupt

if ( RxRDY )
{
While RxRDY
{
Read all chars from RxB
Check for Overrun errors
Reset Error Bit
}

Check for delta break ( This is not an interrupt source )
Check for OE/PE/FB/RB
Clear errors
}
else
{

Tx all chars in buffer

}
..unmask Int

}


I find that after an OE / a DB error occurs, interrupts are no longer generated, even though the Int is unmasked ( I read the value from INTC0 ) and UISR reads 0x02 / 0x06. However, the ISR is not triggered when date is read...

Any inputs on this matter are welcome..
0 Kudos

537 Views
FWFan
Contributor III

Hi TTA,

 

I don't know the answer to your problem.  But I am curious how you read all the bytes from the RxB buffer.  I am trying to transfer 40 bytes from labview to MCF52259, but I already have overrun error.  Actually, I already have OE at 8 bytes.  In the future, I need to pass hundreds even thousand of bytes.  Could you show me how you manage to capture all your bytes?  I am attaching my ISR as to how I am doing it now.

 

Thank you for your input.

FWFan

 

main.c

Message Edited by t.dowe on 2009-09-04 12:12 PM
0 Kudos