Understanding LPUART_UART_IP_EVENT_END_TRANSFER event and how to stop it

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

Understanding LPUART_UART_IP_EVENT_END_TRANSFER event and how to stop it

Jump to solution
758 Views
aadyaa
Contributor II

I am currently working on UART communication, I have successfully managed to receive data over UART using DMA,
but I have encountered a query related to the events I'm receiving in the UART callback function.

During the UART Receiption and Transmission process, I am noticing that I receive two events.
The first event is LPUART_UART_IP_EVENT_RX_FULL which implies data has been received.

Immediately following this, I receive a second event labelled LPUART_UART_IP_EVENT_END_TRANSFER.

I'm writing to seek clarification regarding the purpose and signnificance of the
LPUART_UART_IP_EVENT_END_TRANSFER and Is their any way to stop the second event
from occurring as we already know from the first event that already data received.

0 Kudos
Reply
1 Solution
719 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, driver is written this way. If you look over ISR routine at the end of transfer two callbacks will be called with events you mentioned.

PetrS_0-1692860806225.png

The LPUART_UART_IP_EVENT_RX_FULL which is called first allows you e.g. to update buffer (using SetRxBuffer) and so continuous reception can be done.
For a LPUART_UART_IP_EVENT_END_TRANSFER reception is finished and user will need to call receive function again to start new reception.
If you need to omit second callback the only option I think is to comment line that invokes a callback.

BR, Petr

View solution in original post

0 Kudos
Reply
1 Reply
720 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, driver is written this way. If you look over ISR routine at the end of transfer two callbacks will be called with events you mentioned.

PetrS_0-1692860806225.png

The LPUART_UART_IP_EVENT_RX_FULL which is called first allows you e.g. to update buffer (using SetRxBuffer) and so continuous reception can be done.
For a LPUART_UART_IP_EVENT_END_TRANSFER reception is finished and user will need to call receive function again to start new reception.
If you need to omit second callback the only option I think is to comment line that invokes a callback.

BR, Petr

0 Kudos
Reply