LPUART Cannot receive data

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

LPUART Cannot receive data

Jump to solution
1,132 Views
DouDou1
Contributor III

I use the LPUART of S32K311 to send and receive data. It is normal to send data, but the chip cannot receive the data sent by the computer. What is the reason?Thank you.

0 Kudos
Reply
1 Solution
1,029 Views
DouDou1
Contributor III
Hi,@Julián_AragónM,
Thank you for your reply. I have solved the problem, but there is something wrong with my connection. After re-connecting, we can communicate normally。

View solution in original post

0 Kudos
Reply
4 Replies
1,105 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DouDou1,

You mention data sent by computer. Are you using any serial to USB converter? Looking at your code, it may be a timing issue regarding how you are sending messages to the S32K311.

You can look at the following UART examples for the S32K312:

They both configure the UART module, one by interrupt and another by DMA. Please test them on your side to see if this issue persists.

Best regards,
Julián

0 Kudos
Reply
1,094 Views
DouDou1
Contributor III

Hi.@Julian-AragonM,
Thank you for your reply. I used a serial to USB converter, and then modified the code according to the example you gave me, but my chip still can't receive data. Could you please help me find out what the problem is?

0 Kudos
Reply
1,081 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DouDou1,

I've modified the S32K312 UART interrupt project I've shared in the previous reply, by merging the lpuart echo example, so the MCU echoes whichever character it receives to the terminal:

2.png

Please test it on your board.

Best regards,
Julián

0 Kudos
Reply
1,030 Views
DouDou1
Contributor III
Hi,@Julián_AragónM,
Thank you for your reply. I have solved the problem, but there is something wrong with my connection. After re-connecting, we can communicate normally。
0 Kudos
Reply