cancel
Showing results for 
Search instead for 
Did you mean: 

How does the UART with FIFO really work?

netz
Associate II
Posted on December 03, 2007 at 13:37

How does the UART with FIFO really work?

2 REPLIES 2
netz
Associate II
Posted on November 15, 2007 at 06:39

Hello,

I miss some guide from the documentation.

I want to use the FIFO. My Setup:

Code:

UART_Init(UART1);

UART_FifoConfig(UART1,ENABLE);

UART_Config(UART1,115200,UART_NO_PARITY,UART_1_StopBits,UARTM_8D);

UART_TimeOutPeriodConfig(UART1,0xFF);

UART_OnOffConfig(UART1,ENABLE);

Code:

UART_RxConfig(UART1 ,ENABLE);

UART_ItConfig(UART1,0xFF, DISABLE);

UART_ItConfig(UART1,UART_RxBufFull, ENABLE);

My ISR is:

Code:

if ( int_flags & UART_RxBufFull) { // Data received

UART_ItConfig(UART1,(UART_RxBufFull), DISABLE);

OSSignalBinSem(BINSEM_BT_RX); // Calls Task GetRX

}

Code:

void GetRX(void){

for(;;) {

OS_WaitBinSem(BINSEM_BT_RX,OSNO_TIMEOUT);

while( UART1->SR | UART_RxBufFull) {

g_rxbuf = UART1->RxBUFR & 0xFF;

...

}

UART_ItConfig(UART1,(UART_RxBufFull), ENABLE);

}

}

What I get, instead of

RING

is

RRRRRRRRRRRRIIIIIIIIIIIIINNNNNNNNNNNGGGGGGGGGGGG

Why that?

Sometimes 11,12,13 chars?

Will the FIFO-Pointer set through reading or have I to

Reset the FIFO. Only when?

When will the RXBufNotEmpty reset, and why is it in the

STR71-Softlib named RxBufFull?

Questions over questions.

Has one a document, where the UART is described in detail?

Or can you help me :o

Thanks,

Steffen

kaouther
Associate II
Posted on December 03, 2007 at 13:37

Dear Bummibaer,

New examples of UART FIFO were provided with STR71xFWLib V4.0. and the RxBufFull flag name is modified as well to RxBufNotEmpty. The

http://www.st.com/mcu/download2.php?file=str71xfwlib.zip&info=STR7 Software STR71x&url=http://www.st.com/stonline/products/support/micro/files/str71xfwlib.zip

is available on the web site. Enjoy 😉