Understanding LPUART_UART_IP_EVENT_END_TRANSFER event and how to stop it

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Understanding LPUART_UART_IP_EVENT_END_TRANSFER event and how to stop it

ソリューションへジャンプ
760件の閲覧回数
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 件の賞賛
返信
1 解決策
721件の閲覧回数
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 件の賞賛
返信
1 返信
722件の閲覧回数
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 件の賞賛
返信