S32K144 UART recieve data problem

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

S32K144 UART recieve data problem

2,573件の閲覧回数
玉敏111田
Contributor III

I have came up with one problem.I wanted to write the drive of Uart.Now the drive of Uart sending  data has been completed.But the drive of Uart recieveing data could not complete.My method is that When S32K144 MCU recieve data from upper computer ,the MCU will send teh data has recieved. But upper computer could not recieve data .It could go into Recieve  interrupt.So plz help.

0 件の賞賛
返信
3 返答(返信)

1,893件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

At first, I recommend you to look at the LPUART example for the S32K144 available in the S32 Design Studio.

File -> New -> S32DS Project from Example -> S32K144 -> LPUART

LPUART demo example with added RX interrupt can be found in the community thread on the link below:

https://community.nxp.com/message/957747?commentID=957747#comment-957747 

I hope the example codes help you. If the examples not help I will need to look at your code.

Best regards,

Diana

0 件の賞賛
返信

1,893件の閲覧回数
玉敏111田
Contributor III

I write Uart driver with SDK.My code is follow.Upper computer send data to S32k144.S32k144 send the data recieved from Upper computer.

pastedImage_1.png

0 件の賞賛
返信

1,893件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

Let me apologize for the late response.

The second parameter of the below function expects the address of the bytesRemaining variable. 

Also, you can check the status.

      /* Check the status */

      status = LPUART_DRV_GetReceiveStatus(INST_LPUART2, &bytesRemaining);

 

      if (status != STATUS_SUCCESS)

      {

         //do something

      }

Do you have still some issue? Can you share your project? If you cannot share it on the community you can send it directly to my email address.

I can try to look at it.

Thanks.

Best regards,

Diana

0 件の賞賛
返信