FRDM-KL27Z MMA8451Q - How to build and run an ISSDK based example project

cancel
Showing results for 
Search instead for 
Did you mean: 

FRDM-KL27Z MMA8451Q - How to build and run an ISSDK based example project

FRDM-KL27Z MMA8451Q - How to build and run an ISSDK based example project

Hi Everyone,

This tutorial is a detailed guide on how to import an ISSDK based example project (e.g. mma845x_interrupt) into MCUXpresso IDE, build and run it on the Freedom board (e.g. FRDM-KL27Z). If you intend to use another ISSDK example project/board, you can always follow this guide. A complete list of MCU boards, sensor kits and sensors supported by ISSDK is available in the ISSDK Release notes.

1. Download the FRDM-KL27Z SDK

Open a web browser, navigate to the MCUXpresso homepage and select “Login to view configurations” to start a new configuration.

MCUXpresso_1.png

You will be redirected to login to nxp.com. Enter your account information or register for a new account.

Login.png

Back on the MCUXpresso homepage, select the drop-down box to create a New Configuration.

New configuration.png

Select the board (FRDM-KL27Z) from the list and provide a name for the configuration. Select “Specify Additional Configuration Settings” to choose the Host OS, Toolchain (MCUXpresso IDE) and Middleware (ISSDK).

Create a new configuration.png

Select Configuration Settings:

  • Host OS (example: Windows)
  • Toolchain/IDE (MCUXpresso IDE)
  • Middleware (ISSDK)

Once the configurations are set, select “Go to SDK Builder”.

Configuration settings.png

 

Select “Request Build” to download the SDK.

Request build.png

Once the build request is completed, download the SDK.

Build completed.png

Download.png

Agree to Software Terms and Conditions.

Agree.png

Unzip SDK to a folder (e.g. SDK_2.2.1_FRDM-KL27Z).

Unzip.png

2. Import the SDK_2.1.1_FRDM-KL27Z into MCUXpresso IDE

Open MCUXpresso IDE.

MCUXpresso IDE.png

Set the workspace directory of your choice and click on OK.

Directory.png

Switch to the Installed SDKs view within the MCUXpresso IDE window.

Installed SDK.png

Open Windows Explorer, and drag and drop the SDK_2.2.1_FRDM-KL27Z (unzipped) file into the installed SDKs view. You will get the following pop-up so click on OK to continue the import.

Confirm.png

 

The installed SDK will appear in the Installed SDKs view.

Installed SDKs.png

3. Import and build the ISSDK based mma845x_interrupt example project

Find the Quickstart Panel in the lower left hand corner and select Import SDK example(s)

Import Installed Examples.png

Click on the FRDM-KL27Z board and then click on Next.

Import_2.png

Use the arrow button to expand the issdk_examples category, and then click the checkbox next to mma845x_interrupt to select that project. Then, click on Next.

mma845x_interrupt.png

On the next screen, click the checkbox to Redirect printf/scanf to UART so that the terminal output gets sent out the UART instead of using semi-hosting through the debugger. Then click on Finish.

Redirect.png

Now build the project by clicking on the project name in the Project Explorer view and then click on the Build icon in the Quickstart Panel.

Build.png

You can see the status of the build in the Console view.

Console.png

4. Run the mma845x_interrupt example project

 

Now that the project has been compiled, we can flash it to the board and run it.

Make sure the FRDM-KL27Z board is plugged in, and click on Debug ‘frdmkl27z_issdk_examples_sensors_mma8451q_mma845x_interrupt’ [Debug]

Debug.png

MCUXpresso will probe for connected boards and should find the OpenSDA debug probe that is part of the integrated OpenSDA circuit on the FRDM-KL27Z board. Click on OK to continue.

Debug Probe.png

The firmware will be downloaded to the board and the debugger started.

Firmware downloaded.png

Open a Terminal program (e.g. Tera Term) and connect to the FRDM-KL27Z COM port that it enumerated as. Use 115200 baud, 8 data, 1 stop, no parity.

COM Port.png

COM Port Settings.png

Start the application in the MCUXpresso IDE by clicking the "Resume" button.

Resume.png

The application is now running and signed 14-bit accelerometer output values are displayed on the terminal.

Output in Terminal Window.png

To modify the initial register settings of the MMA8451 accelerometer, find the mma845x_Config_Isr[] structure and change it according to your needs.

Initial config.png

Well done if you managed to follow along and get it all working. If there are any questions, do not hesitate to ask below. Your feedback or suggestions are also welcome.

Regards,

Tomas

Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎07-28-2017 06:32 AM
Updated by: