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
Hello,
You can refer to the demo "usart_interrupt_rb_transfer" under SDK.
BR
Alice
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
> 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.
Maybe the OP is talking about the Errata for the device?:
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