Use of UART FIFO in LPC54608J512BD208

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use of UART FIFO in LPC54608J512BD208

899 Views
prasannanaik
Contributor III

Hi,

I am using LPC54608J512BD208 microcontroller in a Protection Relay. I want to use FIFO of UART for both TX and RX but I can't dind any example code in MCUXpresso SDK.

Can you please share example code of UART  FIFO?

 

Thanks and best regards,

Prasanna

 

0 Kudos
5 Replies

878 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

You can refer to the demo "usart_interrupt_rb_transfer" under SDK.

 

BR

Alice

0 Kudos

874 Views
prasannanaik
Contributor III

Hello Alice_Yang,

While going through the example code and datasheet, i have following doubts,

1) Receive timeout information is not there in datasheet as well as example code. How do i implement this receive timeout in FIFO mode. Example, if Rx FIFO size is 8 and i have received only 1 byte then that byte will remain in the FIFO since FIFO level of 8 characters hasn't been crossed so no interrupt will be raised. In such cases, receive timeout interrupt is provided by Microcontroller

2) The followign code snippet indicates that FIFO configuration is linked to sendXfer.dataSize & receiveXfer.dataSize for Tx & Rx Fifo respectively. It doesn't configure the watermark level of Tx &Rx FIFO

sendXfer.data = g_txBuffer;
sendXfer.dataSize = ECHO_BUFFER_SIZE;
receiveXfer.data = g_rxBuffer;
receiveXfer.dataSize = ECHO_BUFFER_SIZE;

 

Thanks & best regards,

Prasanna

 

0 Kudos

855 Views
frank_m
Senior Contributor III

> 1) Receive timeout information is not there in datasheet as well as example code.

What protocol you are talking about ?

There are very few UART-based protocols (like Modbus RTU) which really use timeouts, so almost no UART peripheral unit has hardware support for such a feature. You can always use timers and software.

> 2) The followign code snippet indicates that FIFO configuration is linked to sendXfer.dataSize & receiveXfer.dataSize for Tx & Rx Fifo respectively. It doesn't configure the watermark level of Tx &Rx FIFO

The SDK a good source to get started (and free), but by no means a comprehensive collection for each possible use case.

You might need to study the MCU's user manual.

0 Kudos

848 Views
carstengroen
Senior Contributor II

Maybe the OP is talking about the Errata for the device?:

 

carstengroen_0-1618927444449.png

 

0 Kudos

859 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello prasannanaik,

The FIFO data will be received into RXDATA of FIFO read data register.

And about the demo, recommend you download to board to do some test.

 

BR

Alice

0 Kudos