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.
解決済! 解決策の投稿を見る。
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.
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
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.
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