S32K144 UART receive status keeps STATUS_BUSY

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

S32K144 UART receive status keeps STATUS_BUSY

1,090 Views
547416104
Contributor III

Hello EveryOne,

I developed on S32K144 board by SDK, I want to send data and receive data by uart, now I find MCU can receive the data through uart port, and I want to check the receiving status through the interface "LPUART_DRV_GetReceiveStatus", the return status is always STATUS_BUSY.

547416104_0-1660879179073.png

 

0 Kudos
5 Replies

1,080 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Where did LPUART_DRV_GetReceiveStatus return STATUS_BUSY?
Did you mean the LPUART_DRV_GetReceiveStatus  in UART_EVENT_RX_FULL event?

UART_EVENT_RX_FULL.png

Or call LPUART_DRV_GetReceiveStatus in uart_rx_end_check_task?

uart_rx_end_check_task.png

I'm not sure what uart_rx_end_check_task is trying to achieve, maybe it's possible to add other event like UART_EVENT_END_TRANSFER or UART_EVENT_ERROR in lpuart0_RX_ISR.

16.83 LPUART Driver.png

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,075 Views
547416104
Contributor III

Hello  Robin_Shen,

Add question:

How can I make sure the datas arereceived end through UART?

when the LPUART_DRV_GetReceiveStatus() function returns value is STATUS_SUCCESS? now the return value keep STATUS_BUSY.

0 Kudos

1,003 Views
ocean2
Contributor I

I meet the same issue,do you solve it ?   can you get the currect status?

0 Kudos

1,076 Views
547416104
Contributor III

Hello Robin_Shen,

Sorry, I not descript the peoblem clearly.

The problem is as below information:

1. MCU can entry the RX IRQ normally.

2. MCU receive the data OK.

 

My question:

The system cannot enter the marked code block, LPUART_DRV_GetReceiveStatus() return value keeps STATUS_BUSY, I can not to check whther the datas received end.

547416104_0-1660963968295.png

 

0 Kudos

1,033 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Have you tried to add: else if(event == UART_EVENT_END_TRANSFER) {} in lpuart0_RX_ISR? When there is no more date need to be received(you don't call LPUART_DRV_SetRxBuffer anymore), it will enter this event.

Tags (1)
0 Kudos