Overview
This LPSCI example application demonstrates the SDK Peripheral drivers working with different methods. The LPSCI example shows transmit/receive LPSCI’s driver with other efficiency methods:
- Using blocking method
- Using non-blocking method
- Using Dma blocking method
- Using Dma non-blocking method
- Using polling method
The board transfers and receives characters through the LPSCI interface. Type characters on the keyboard and the board receives and echoes them on the terminal screen. Look for instructions output to the terminal.
Supported Platforms
These Freescale Freedom development platforms and Tower System modules are supported by the LPSCI example.
- FRDM-KL02Z (*) (DMA not supported)
- FRDM-KL25Z (*) (DMA not supported)
- FRDM-KL26Z
- FRDM-KL46Z
- MRB-KW01
- TWR-KL25Z48M (*) (DMA not supported)
System Requirement
Hardware requirements
- J-Link ARM
- P&E Micro Multi-link universal
- Mini/micro USB cable
- USB A to micro AB cable
- Hardware (tower/base board, ...) for specific device
- Personal Computer
Toolchain requirements
- IAR embedded Workbench version 7.30.4
- ARM GCC 4.8.3 2014q3
- Keil MDK 5.13
- Kinetis Design Studio IDE v.2.5.0
- Atollic TrueSTUDIO for ARM win32 v5.2.1
Software requirements
- The project files are in: <SDK_Install>/examples/<board>/driver_examples/lpsci/<use_case>/<toolchain>.
- Library dependencies: ksdk_platform_lib
Getting Started
Hardware settings
The LPSCI Example project does not call for any special hardware configurations. Although not required, the recommendation is to leave the development board's jumper settings and configurations in default state when running this example.
Prepare the example
- Connect a USB cable between the PC host and the OpenSDA USB port on the board.
- Open a serial terminal with these settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
- Download the program to the target board.
- Either press the reset button on your board or launch the debugger in your IDE to begin running the example.
Run the example
LPSCI blocking
These instructions are displayed/shown on the terminal window:
++++++++++++++++ LPSCI Send/Receive Blocking Example +++++++++++++++++
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
LPSCI non-blocking
These instructions are displayed/shown on the terminal window:
++++++++++++++++ LPSCI Send/Receive Non Blocking Example +++++++++++++++++
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
LPSCI DMA blocking
These instructions are displayed/shown on the terminal window:
++++++++++++++++ LPSCI-DMA Blocking Example +++++++++++++++++
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
LPSCI DMA non-blocking
These instructions are displayed/shown on the terminal window:
++++++++++++++++ LPSCI-DMA Non Blocking Example +++++++++++++++++
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
LPSCI polling
These instructions are displayed/shown on the terminal window:
++++++++++++++++ LPSCI Polling Example +++++++++++++++++
Type characters on the keyboard and the board receives and echoes them to the terminal screen.
Type characters on the keyboard and the board receives and echoes them to the terminal screen.