Hello, when using UART communication on the S32K312, if the baud rate exceeds 19200, the received data has a high error rate or even fails entirely. At baud rates below 19200, there are no issues. What could be causing this, and how can I optimize it? Below are my receive code and clock configuration?
Hi,
most probably it will be due to callback processing. Remove below code and rely just on callback events.
Try to keep RXFULL event as short as possible as this is called for each byte received if Receive function was called with 1 byte to be received.
BR, Petr
"This is not the issue. If I increase the baud rate, the serial bus seems to crash, and the MCU stops receiving data. If I enable error recovery, there are instant data errors but it doesn't stop receiving. Have you encountered this problem before?"
Hi,
The received byte processing code should be as short as possible, to have short execution time. This callback event must be called for each byte received. Otherwise you will get overruns etc.