MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
LPUART Polling Mode

This example shows typical use of the Low-Power Universal Asynchronous Receiver/Transmitter (LPUART) module in polling mode.

Source code:
/******************************************************************************
* (c) Copyright 2010-2015, Freescale Semiconductor Inc.
* ALL RIGHTS RESERVED.
******************************************************************************
* lpuart_test.c
******************************************************************************/
#include "drivers.h"
void main (void)
{
char c;
/* route core clock to PTF7 */
/* clock mode 1:1:1, 24MHz */
/* BUS clock selected as the LPUART clock source */
/* LPUART init 9600bd */
LPUART_PutStr (LPUART0,"\n\rCharacters will be echoed on the screen:\n");
while(1)
{
/* read and echo character */
while (!LPUART_RxFull(LPUART0));
c = LPUART_GetChar (LPUART0);
while (!LPUART_TxIdle(LPUART0));
LPUART_PutChar (LPUART0,c);
}
}
Toolchain support:
IAR EWARM 7.40.7KEIL uVision 5.15CrossWorks 3.6ATOLLIC TrueStudio 5.3.0Kinetis Design Studio 3.0.0