UART RX interrupt ussye

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

UART RX interrupt ussye

Jump to solution
1,600 Views
547416104
Contributor III

Hello EveryOne,

 

I just use the UART module on the MCU:S32K144 100pin, I find the UART interrupt is occured, and read the data, I find the data is same with the uart TX data,as normal design, it is not My wanted data. How can I to config the SDK, and fix the issue.

547416104_0-1667628338920.png

547416104_1-1667628387331.png

 

 

0 Kudos
Reply
1 Solution
1,586 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please refer to the lpuart_echo_s32k144 example in SDK:

Call LPUART_DRV_ReceiveData start receive 1 byte UART data, the 1 byte data is already received into buffer[] after enter UART_EVENT_RX_FULL rxCallback.

lpuart_echo_s32k144 LPUART_DRV_ReceiveData.png

Don't know why you call LPUART_DRV_ReceiveData(INST_LPUART0, &uart_Rx_Date, 1u) at line 52, the data should already in in BD18333_Read.RxData[] when enter UART_EVENT_RX_FULL event.


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.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
6 Replies
1,587 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please refer to the lpuart_echo_s32k144 example in SDK:

Call LPUART_DRV_ReceiveData start receive 1 byte UART data, the 1 byte data is already received into buffer[] after enter UART_EVENT_RX_FULL rxCallback.

lpuart_echo_s32k144 LPUART_DRV_ReceiveData.png

Don't know why you call LPUART_DRV_ReceiveData(INST_LPUART0, &uart_Rx_Date, 1u) at line 52, the data should already in in BD18333_Read.RxData[] when enter UART_EVENT_RX_FULL event.


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
Reply
1,583 Views
547416104
Contributor III

Hello Robin,

 

I just follow your suggest to reconfig the uart module, I find the issue is also occured.

547416104_0-1667798901612.png547416104_1-1667798922426.png

547416104_2-1667799239339.png

 

when I sent data through UART, then the RX ISR is callback, debug and find the BD18333_Read.RxData value is same with the TX data.

The hope result is the RX ISR is callback only when UART receive the new data, it should not same with the UART TX data.

0 Kudos
Reply
1,576 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please tell me how to reproduce this issue.(Maybe you can send a test project to me)
I tried test uart_pal_echo_s32k144 based on your screenshot and couldn't find the issue.
After call UART_SendData(&uart_instance, txbuffer, 1U); send data output, then call UART_ReceiveData(&uart_instance, buffer, 1U); I didn't see the value in buffer equal to txbuffer.

0 Kudos
Reply
1,564 Views
547416104
Contributor III

hello Robin, The issue is fixed yesterday, thanks. but I have a new issue now, I can not receive the response data, I wii upload the project files later.

0 Kudos
Reply
1,558 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

You are welcome!
I am glad to hear that it works now. 

For new issue, it is recommended to recreate a new question in community.
Thank you for your understanding.

0 Kudos
Reply
1,553 Views
547416104
Contributor III

Hello Robin,

I just pass a problem "S32K144 UART can not receive data", and attach the uart_pal configure and uart driver code. could you help to check, thanks 

0 Kudos
Reply