2007-12-03 04:37 AM
How does the UART with FIFO really work?
2007-11-14 09:39 PM
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 RINGis RRRRRRRRRRRRIIIIIIIIIIIIINNNNNNNNNNNGGGGGGGGGGGGWhy 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, Steffen2007-12-03 04:37 AM
Dear Bummibaer,
New examples of UART FIFO were provided with STR71xFWLib V4.0. and the RxBufFull flag name is modified as well to RxBufNotEmpty. Thehttp://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 ;)