uart_pal_s32k144w status = STATUS_UART_RX_OVERRUN

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

uart_pal_s32k144w status = STATUS_UART_RX_OVERRUN

1,565 Views
juliencs
Contributor II

Hello,

I am trying to run the uart_pal_s32k144w example on the s32k144w evaluation board but when I run the code, it only prints the first letter of the welcome message. I tried to fix this by replacing the function UART_SendDataBlocking with UART_SendData and now the welcome message prints but the while loop errors out because the status of the UART is STATUS_UART_RX_OVERRUN. I tried to use a while loop to wait for the whole message to print before the code moves on but that didn't work either. What does this status mean and what can I do to fix it?

I am using a serial connection to PuTTY with a baud rate of 9600 to see the printed output.

Any help would be appreciated.

Thanks,

Julie

Labels (1)
0 Kudos
5 Replies

1,551 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Julie,

I can't reproduce the issue with

S32DS 3.4

SDK RTM v4.0.2

uart_pal_s32k144w

 

It works as expected:

danielmartynek_0-1646918950611.png

 

Which SDK version do you use?

 

BR, Daniel

0 Kudos

1,548 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Anyway, if you use the non-blocking function, you can use the below function to get the status of the ongoing transfer

UART_GetTransmitStatus()

Once the transfer is complete, a new one can be started.

STATUS_UART_RX_OVERRUN should be returned only of the driver fails to read all the RX data (from the PuTTY terminal) in time.

danielmartynek_0-1646919377144.png

 

Regadrs,

Daniel

0 Kudos

1,544 Views
juliencs
Contributor II

Hello Daniel,

Thank you for replying!

I am using S32DS 3.4 and SDK RTM 4.0.2.

The UART_GetTransmitStatus() helped, now the program has no problems printing.

When I step through debugging the program, it is able to get to the UART_ReceiveData() function and will wait for me to type and hit enter in the putty terminal, but as soon as it checks the receive status, it still says STATUS_UART_RX_OVERRUN and the program sends the error message and breaks the loop. If I simply let the program run it will let my type and hit enter in the putty terminal but does not send the error message. 

RX_OVERRUN.PNG

Why would the driver be failing to read the RX data? Do I need to clear the OR flag?

Thanks,

Julie

0 Kudos

1,530 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Julie,

Do you have a logic analyzer or an oscilloscope?

Can you scope the TX RX pins?

 

Thanks,

Daniel

0 Kudos

1,526 Views
juliencs
Contributor II

Hello Daniel,

Thanks for the reply. 

I ended up just transferring one byte at a time and moving the SendData function into the rxCallback function, which seems to work.

Best Regards,

Julie