cancel
Showing results for 
Search instead for 
Did you mean: 

Question on UART Fifo function?

scmadhugiri
Associate II
Posted on June 29, 2006 at 16:37

Question on UART Fifo function?

3 REPLIES 3
scmadhugiri
Associate II
Posted on June 26, 2006 at 22:25

Hello,

We are working on a project using STR710FZ2 and are trying to use STR71x software library. In this regard, I had a couple of questions on UART related functions in the library..specifically involving Fifo functions.

I am not able to figure out from the software libary definitions as to what we are supposed to do with regard to FIFO's? The library has functions UART_FifoConfig() and UART_FifoReset () but am I supposed to define the FIFO? Or is this pre-defined? And if so, what size is this FIFO? And where is the definition for the FIFO? I checked all related .c and .h files but was not able to find any information.

In previous projects, we have defined our own FIFO's depending on our requirements...this software library manual has me confused. Could anyone let me know the FIFO characteristics as it pertains to the software library functions, the FIFO size, it's usage etc.

Any help in this matter is much appreciated.

Thanks,

-Shishir

planeetmaa
Associate II
Posted on June 28, 2006 at 06:37

Hi!

Check the STR71x reference manual UART section. This processor has fifos built in (16-deep, as stated in the manual).

You just have to enable the fifos for tx and rx and reset them just in case.

If you check the library function ''UART_ByteSend'' for example, it checks whether there is room for another byte to save. If you have fifos enabled, uP transfers byte written to tx buffer (UARTx->TxBUFR = *Data;) to fifo.

I.e. you can save 16 bytes of data to UART tx buffer (in case of fifo was empty) with no delay. In case of bigger amount of data you have to wait until the first saved bytes are transmitted to the line. In case you have to write large amount of data at once, I recommend writing something based on interrupts (there is interrupt flag for fifo emty, half empty) as otherwise the library functions just start waiting for fifo to empty.

BR, Madis

scmadhugiri
Associate II
Posted on June 29, 2006 at 16:37

Madis,

Thank you for the information. That was very helpful. We had missed the FIFO information in the reference manual.

-Shishir