cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear interrupt pending bit of UART?

hl5bmo
Associate II
Posted on August 06, 2009 at 03:19

How to clear interrupt pending bit of UART?

5 REPLIES 5
hl5bmo
Associate II
Posted on July 31, 2009 at 00:23

Hello~

I knew to clear FIQ interrupt pending bits.

But, I don't know....

How to clear interrupt pending bit of UART?

It's clear when goto interrupt subroutine..?

Anyone help me? 🙂

kleshov
Associate II
Posted on August 01, 2009 at 13:37

'Interrupt pending bit of UART' is not specific enough. I can think of 10 different bits in different registers that fit the description. Can you be more specific?

hl5bmo
Associate II
Posted on August 05, 2009 at 05:01

hi~

My program check on pending bits of Uart.

The pending bits are UART_RxHalfFull,UART_RxBufFull,UART_TxFull.

The 'UART_RxHalfFull' and the 'UART_RxBufFull' are checked in the IRQ interrupt routine.

And the 'UART_TxFull' is check in the main routine.

When checking status flag of Uart, comes to clear?

Do you understanding me?

My English is poor.

Thank you reply.

:D

kleshov
Associate II
Posted on August 05, 2009 at 08:11

Well, this is easy. The UART_RxHalfFull bit will be cleared when the UART receive FIFO is not half full anymore, that is when it contains 8 or less characters. So you can clear this bit by reading from the receive FIFO, maybe more than once if necessary. Or you can mask this bit to prevent the UART interrupt from triggering on this condition.

hl5bmo
Associate II
Posted on August 06, 2009 at 03:19

hi~

Thank you for helping me.

Now I understand the mechanism of the flag has the status of UART.

I read datasheet(STR71x) in detail for all day.

And, I repeat the programming and the checking. Again and again....

My machine has 4 Uart(3 of half duplex communication, 1 of full duplex communication).

Each channel is transmitting and receiving per 50msec.

Now good working...

Maybe I clear the problem of my system.

Best regards :D