The S32K314 uart fails to receive data

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

The S32K314 uart fails to receive data

229 Views
shunyizhang
Contributor IV

shunyizhang_0-1702522353101.png

Hi,

I am using S32K314, because I am not very familiar with the software architecture of RTD. When debugging the uart module, I found that if the two interfaces receiving data in the above figure are not placed in a dead loop or periodic commission, the interrupt of uart will not be triggered. What is the principle? At present, freertos used in my project is inconvenient to provide a dead-loop interface, which is also conducive to software architecture management. Will receiving data be lost if periodic commission receiving interface is used?

Is there a better way to deal with appeals? My previous experience is to interrupt the service function received data directly into the buffer, this way the probability of losing data is very small.

0 Kudos
Reply
1 Reply

208 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

receive interrupt is enabled only using AsyncReceive function. It enables reception and immediately leaves function. The application has to get the receive status to know when the receive is complete. You can either repeatedly call GetReceiveStatus or use interrupt callback function and use callback events in it. After receive is complete (defined number of bytes received), you need to call AsyncReceive again to start new reception.

SyncReceive function do not enable interrupt. Function use SW polling to test receive flags. It does not leave function until defined number of bytes are received or timeout expires. You are missing timeout parameter in function calling. After defined number of bytes received, you need to call SyncReceive again to start new reception.   

BR, Petr

0 Kudos
Reply