I am porting an application from the K20DN512ZM10 to the MK64FN1M0VLQ12 and am having problems with running the UARTs at high baud rates.
The K20 application has a clock speed of 96MHz and receives data from the UART and places it on a FreeRTOS queue and has no problem communicating with a RS485 transceiver at 460800 baud.
The MK64 application has a clock speed of 120MHz and manages the UART through the KSDK 2.4.2 (fsl_uart_freertos) and frequently receives kStatus_UART_RxHardwareOverrun when trying to read bytes. I have increased the priority of the interrupt (UART1_RX_TX in this case) but this does not help.
When configuring the UART through the SDK, the desired baud rate (461538) is within 3% of the actual rate (the difference is 738 and the tolerance is 13824, so I don't think there is a clock issue.
I also had this problem with another UART receiving data from a uBlox GPS module and in that case I had to reduce the baud rate to 115200 to get the number of hardware overruns down to an acceptable level. Note these are definitely hardware overruns, not ring buffer overruns.
I was expecting better performance from the MK64 over the K20, but instead it is worse. Why are there so many hardware overruns?