element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Getting Started with FRDM-KL28Z NXP Freedom Development Platform [Running a Bubble demo application using Kinetis Development Studio IDE and its tool chain]
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 19 Sep 2016 12:53 PM Date Created
  • Views 1039 views
  • Likes 0 likes
  • Comments 0 comments
  • ksdk2.0
  • frdm-kl28z
  • kds3.2.0
  • bubble_demo
Related
Recommended

Getting Started with FRDM-KL28Z NXP Freedom Development Platform [Running a Bubble demo application using Kinetis Development Studio IDE and its tool chain]

bheemarao
bheemarao
19 Sep 2016

This document introduces new freedom development board FRDM-KL28Z and demonstrates the bubble application And how to import the existing project of Kinetis SDK V2.0(for FRDM-KL28 using the kinetis Design Studio version 3.2.0 implemented using  FRDM-KW40ZFRDM-KW40Z

 

It demonstrates basic usage of the on-board accelerometer to implement a bubble level. A bubble level utilizes two axes to visually show deviation from a level plane (0 degrees) on a given access. This demo uses the FTM/TPM to modulate the duty cycle of two onboard LEDs to gradually increase LED intensity as the board deviates from a level state.

 

FRDM-KL28Z Description:

The KL28Z is a sub-family of 32-bit Kinetis microcontrollers based on the ARM CortexR-M0+ processor. It is an extension of the existing L series MCU family, with additional memory. The KL28Z sub-family provides up to 96 MHz (HSRUN mode) CPU performance. It supports ultra low power, up to 512 KB Flash with 128 KB SRAM and integrates functions such as USB with crystal-less recovery.

 

image

The FRDM-KL28Z hardware is a Freedom development board assembled with the following features:

  • MKL28Z512VLL7 MCU (96 MHz, 512 KB Flash, 128 KB RAM, 32 KB ROM,100 LQFP package)
  • 3-Axis Digital Angular Rate Gyroscope, FXAS21002CQ (U2)
  • Accelerometer and magnetometer, FXOS8700CQ (U10)
  • OpenSDA: On-board serial and debug adapter (U7)
  • I/O headers for easy access to MCU I/O pins
  • Ambient light sensor (Q1)
  • Flexible power supply options: USB, coin cell battery, external source
  • Capacitive touch slider
  • Reset push button (SW1)
  • NMI and LLWU buttons (SW2, SW3)
  • RGB LED (D2)

 

The FRDM-KL28Z hardware is form-factor compatible with the ArduinoTm R3 pin layout, providing a broad range of expansion board options. The on-board interfaces include an RGB LED, a 6-axis digital sensor (combining a 3D accelerometer and 3D magnetometer), a 3-axis digital angular rate gyroscope, an ambient light sensor, and a capacitive touch slider.

 

Prerequisite:

1. KDS3.2.0 installed on your computer

(You can download latest version of KDS from Here or direct download from below link:)

https://nxp.flexnetoperations.com/control/frse/product?entitlementId=123663777&lineNum=1&authContactId=73533311&authPartyId=61860331

 

2. Install the boot loader driver with OpenSDA_V2_1.bin from below segger link:

https://www.segger.com/downloads/jlinkopensda

 

3. The freedom hardware board i.e FRDM-KL28Z

 

Below are the steps involved in this demo activity:

 

Step-1: Install the boot loader driver with OpenSDA_V2_1.bin to freedom board

Step-2 Kinetis SDK V2.0 configuration generation for FRDM-KL28Z

Step-3 Import the example project from the downloaded SDK

Step-4 Build your project and execute it

 

We will proceed to our demo

 

Step-1 Install the boot loader driver with OpenSDA_V2_1.bin to freedom board:

 

The FRDM-KL28Z board comes loaded with the mbed/CMSIS-DAP debug interface from the factory. However, this interface is not supported with the KL28 family in the current version of KDS. In order to use the KDS IDE to download and debug, you need to install the J-Link OpenSDA v2.1 application.

 

To install the JLink OpenSDA v2.1 application on the FRDM-KL28Z board:

1. Download JLink OpenSDA v2.1 from below SEGGER website [https://www.segger.com/downloads/jlinkopensda/OpenSDA_V2_1.bin]

2. With the board unpowered, hold down the Reset button on the FRDM-KL28Z and plug in a mini-B USB cable into the “SDA USB” USB port on the board.

3. Release the Reset button.

4. The board will enumerate as a “DAPLINKBOOT” drive.

5. Drag and drop the application .bin file you just downloaded into this drive.

6. Do a power cycle, and now the board will be running the JLink OpenSDA application.

 

After loading the boot loader to your hardware board you can check the same at your computer’s device manager as shown below:

image

Step-2 Kinetis SDK V2.0 configuration generation for FRDM-KL28Z

 

Refer to my earlier blog on getting SDK V2.0 for FRDM-KL28Z

Kinetis SDK V2.0 configuration generation for FRDM-KL28Z

 

SDK has been stored at location “C:\Users\brao\Downloads\SDK_2.0_FRDM-KL28Z”

  SDK_2.0_FRDM-KL28Z is the sdk package

 

image

Step-3 Import the example project from the downloaded SDK

 

These steps show how to open and build a demo project in KDS IDE for FRDM-KL28Z.

Open KDS 3.2.0 from default workspace

 

image

Select File->Import from the KDS IDE menu. In the window that appears, expand the "Project of Projects" folder and select "Existing Project Sets". Then, click the "Next" button.

 

image

Click the "Browse" button next to the "Import from file:" option.

 

Now direct the path of SDK V2.0 as shown in step-2

“C:\Users\brao\Downloads\SDK_2.0_FRDM-KL28Z\boards\frdmkl28z”

 

  You will find “demo_apps” folder in which few application demos can be found

image

Click on finish and proceed further

You can browse the application code in bubble.c file in workspace as shown

image

 

Step-4 Build your project and execute it

 

Connect your board and follow below steps:

To build the project click on hammer button as shown:

image

Open debug configuration from below shown window

image

image

Now proceed by clicking Debug button

You will see the debug window as shown below:

image

Press Resume button to start executing the project

image

Open hyperterminal window of your choice, i have putty terminal:

As shown earlier the port number can be detected from device manager

image

Open a serial terminal on PC for OpenSDA serial device with these settings:

- 115200 baud rate

- 8 data bits

- No parity

- One stop bit

- No flow control

image

The bubble application demonstrates basic usage of the on-board accelerometer to implement a bubble level. A bubble level utilizes two axes to visually show deviation from a level plane (0 degrees) on a given access. This demo uses the FTM/TPM to modulate the duty cycle of two onboard LEDs to gradually increase LED intensity as the board deviates from a level state.

 

When the board is programmed, simply tilt the board to see the LED illuminate. One LED color indicates X-axis angle while another indicates Y-axis angle. When the example runs successfully, you can see the similar information from the terminal as below.

 

You can see the project execution on the terminal as shown below:

image

You will see the change of LED brightness when change angles of board

 

Happy working with KL28Z  image image image

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube