MKMxxZxxACxx5 Bare Metal Software Drivers  R4.1.6
Reference Manual
UART Polling Mode

This example shows typical use of the Universal Asynchronous Receiver/Transmitter (UART) module in polling mode.

Source code:
/******************************************************************************
* (c) Copyright 2010-2015, Freescale Semiconductor Inc.
* ALL RIGHTS RESERVED.
******************************************************************************
* uart_test.c
******************************************************************************/
#include "drivers.h"
void main (void)
{
char c;
/* route core clock to PTF7 */
/* clock mode 1:1:1, 24MHz */
/* UART1 init 9600bd */
UART_PutStr (UART1,"\n\rCharacters will be echoed on the screen:\n");
while(1)
{
/* read and echo character */
while (!UART_RxFull(UART1));
c = UART_GetChar (UART1);
while (!UART_TxIdle(UART1));
UART_PutChar (UART1,c);
}
}
Toolchain support:
IAR EWARM 7.40.7CodeWarrior 10.6KEIL uVision 5.15CrossWorks 3.6ATOLLIC TrueStudio 5.3.0Kinetis Design Studio 3.0.0