2006-06-29 07:37 AM
2006-06-26 01:25 PM
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, -Shishir2006-06-27 09:37 PM
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, Madis2006-06-29 07:37 AM
Madis,
Thank you for the information. That was very helpful. We had missed the FIFO information in the reference manual. -Shishir