Hello Johan,
In K64's reference manual http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf , there is a section called Clock distribution (chapter 5), in which, it specifies different clock sources for all available modules in K64. In section 5.7.10 UART clocking section, it expresses:
" UART0 and UART1 modules operate from the core/system clock, which provides higher performance level for these modules. All other UART modules operate from the bus clock."
And as MCU is operating in PEE modue, System clock is configured to 120MHz while Bus clock is set to 60MHz. So, source clock value is the problem you are facing.
You can substitute the definition:
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetCoreSysClkFreq()
by:
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetBusClkFreq()
Then recompile the project and it should be working well.
I hope this can help you!
Regards,
Isaac