Hi,
I am using custom board using MK22FX512AVLQ12. I want to use FIFO buffer in UART communication to reduce the number of interrupts I get.
I want to get an interrupt of (UART1) only after 8 packets of data are received. If there are less than 8 packets received I don't want to have an interrupt, instead I'll read that data after a specific time has elapsed (implementing timer using FTM).
I noticed that irrespective of the RX FIFO WaterMark, I always get the interrupt no. of packets received are equal to size of the receiver buffer whose pointer I pass as *xfer in following function:
status_t UART_TransferReceiveNonBlocking(UART_Type *base, uart_handle_t *handle, uart_transfer_t *xfer, size_t *receivedBytes)
Moreover, if I set the size of receiver buffer as 8 bytes and in case the data received is more than 8 packets I get an interrupt and read 8 packets of data. But I don't know how to read the remaining data packets once the my timer has elapsed. Please find the source code attached.
There are no example codes for the controller I am using in MCUXpresso. So I tried finding example codes of similar controller only using FIFO buffer triggering. But did not found an example code that will help me in understanding the issue.
Please help in resolving the issue. An example code that uses FIFO buffer based interrupts in K22 series would be of great help.
Thanks & Regards,
Vaibhavi P