1
Plug It In2
Get Software3
Build, RunLet's take your FRDM-MC-LVPMSM for a test drive! You have the choice of watching the sequence in a short video or following the detailed actions list below.
For these instructions, we will consider the FRDM-KV10Z board as the Freedom microcontroller board, but there are other compatible options like the FRDM-KV31F. Check the FRDM-MC-LVPMSM product page for more information about compatible Freedom microcontroller boards.
Something went wrong! Please try again.
Plug the 3-Phase wires of the FRDM-MC-LVMTR motor, or your own motor that meets the driver specification, to the screw connector.
Something went wrong! Please try again.
Take the micro-B USB cable included in the FRDM-KV10Z package and plug one end into your computer USB port, and the other end into the micro-B port labeled "SDA USB". This USB port provides power to the FRDM-KV10Z board, and via the onboard OpenSDA circuit, it also provides debugging, drag-and-drop flashing and virtual serial port capabilities.
Something went wrong! Please try again.
Download the 3-Phase Permanent Magnet Synchronous Motor (PMSM) Motor Control package.
Something went wrong! Please try again.
Follow the Getting Started instructions for your Freedom microcontroller, to download the required driver and the available IDE toolchain for your board. Then, open the corresponding project for your Freedom microcontroller board and IDE toolchain, build it and debug it.
Before using KDS IDE with KSDK, it is recommended that you make sure that your tools are up to date. The steps discussed below are shown using the Windows version of KDS, but are identical for Mac and Linux users.
com.freescale.xxx
or com.nxp.xxx
. There may also be updates for things such as toolchain
or debug interfaces. While these additional updates are typically OK to install, sometimes they may cause issues since they aren't released as part of the KDS toolchainThe following steps will guide you through opening the hello_world application. These steps may change slightly for other example applications as some of these applications may have additional layers of folders in their path.
Note: The steps required for Linux and Mac OS are identical to those for Windows.
Point to the example application project, which can be found using this path:
<install_dir>/boards/<board_name>/<example_type>/<application_name>/kds
For this guide, choose the specific location:
<install_dir>/boards/KV10Z32/demo_apps/hello_world/kds
The FRDM-KV10Z board comes loaded with the PEmicro debug interface from the factory. If you have changed the debug OpenSDA application on your board, visit OpenSDA for information on updating or restoring your board to the factory state.
Note: Mac users must install the J-Link OpenSDA application in order to use the KDS IDE to download and debug their board.
For Linux OS users only, run the following commands in your terminal. These install "libudev" onto your system, which is required by KDS IDE to launch the debugger
user@ubuntu:~$ sudo apt-get install libudev-dev libudev1
user@ubuntu:~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libudev.so /usr/lib/x86_64-linux-gnu/libudev.so.0
The following steps will guide you through opening the hello_world application. These steps may change slightly for other example applications as some of these applications may have additional layers of folders in their path.
If not already done, open the desired example application workspace. Most example application workspace files can be located using the following path:
<install_dir>/boards/<sdk_board_name>/<example_type>/<application_name>/iar
Using the hello_world demo as an example, the path is:
The FRDM-KV10Z board comes loaded with the PEmicro debug interface from the factory. If you have changed the debug OpenSDA application on your board, visit OpenSDA for information on updating or restoring your board to the factory state.
After the MDK tools are installed, Cortex® Microcontroller Software Interface Standard (CMSIS) device packs must be installed to fully support the device from a debug perspective. These packs include things such as memory map information, register definitions and flash programming algorithms. Follow these steps to install the appropriate CMSIS pack.
The following steps will guide you through opening the hello_world application. These steps may change slightly for other example applications as some of these applications may have additional layers of folders in their path.
If not already done, open the desired demo application workspace in:
<install_dir>/boards/<sdk_board_name>/<example_type>/<application_name>/mdk
The workspace file is named <application_name>.uvmpw, so for this specific example, the actual path is:
<install_dir>/boards/frdmkv10z/demo_apps/hello_world/iar/hello_world.uvmpw
The FRDM-KV10Z board comes loaded with the PEmicro debug interface from the factory. If you have changed the debug OpenSDA application on your board, visit OpenSDA for information on updating or restoring your board to the factory state.
This section contains the steps to install the necessary components required to build and run a KSDK demo application with the Arm GCC Toolchain, as supported by the Kinetis SDK.
There are many ways to use Arm GCC tools, but this example focuses on a Windows environment. Though not discussed here, GCC tools can also be used with both Linux OS and Mac OSX.
Download and run the installer from GNU Arm Embedded Toolchain . This is the actual toolchain (i.e., compiler, linker, etc.). The GCC toolchain should correspond to the latest supported version, as described in the Kinetis SDK Release Notes.
The Minimalist GNU for Windows (MinGW) development tools provide a set of tools that are not dependent on third party C-Runtime DLLs (such as Cygwin). The build environment used by the KSDK does not utilize the MinGW build tools, but does leverage the base install of both MinGW and MSYS. MSYS provides a basic shell with a Unix-like interface and tools.
C:\MinGW
, however, you may install to any location
Note: The installation path cannot contain any spaces.
Add the appropriate item to the Windows operating system Path environment variable. It can be found under "Control Panel → System and Security → System → Advanced System Settings" in the "Environment Variables..." section. The path is:
<mingw_install_dir>\bin
Assuming the default installation path, C:\MinGW
, an example is shown below. If the path is not set correctly, the toolchain will not work
Note: If you have C:\MinGW\msys\x.x\bin
in your PATH variable (as required by KSDK 1.0.0), remove it to ensure that the new GCC build system works correctly.
Create a new system environment variable and name it ARMGCC_DIR. The value of this variable should point to the Arm GCC Embedded Toolchain installation path, which, for this example, is:
C:\Program Files (x86)\GNU Tools Arm Embedded\4.9 2015q3
Reference the installation folder of the GNU Arm GCC Embedded tools for the exact path name of your installation.
To build an example application, follow these steps.
Change the directory to the example application project directory, which has a path like this:
<install_dir>/boards/<board_name>/<example_type>/<application_name>/armgcc
For this guide, the exact path is:
<install_dir>/boards/frdmkv10z/demo_apps/hello_world/armgcc
The GCC tools require a J-Link debug interface. To update the OpenSDA firmware on your board to the latest J-Link app, visit OpenSDA. After installing the J-Link OpenSDA application, download the J-Link driver and software package from SEGGER Downloads .
Change to the directory that contains the example application output. The output can be found in using one of these paths, depending on the build target selected:
<install_dir>/<example_type>/<application_name>/armgcc/debug
<install_dir>/<example_type>/<application_name>/armgcc/release
For this guide, the path is:
<install_dir>/boards/frdmkv10z/demo_apps/hello_world/armgcc/debug
Something went wrong! Please try again.
Plug a 24 V/5 A power-supply to the power barrel connector of the FRDM-MC-LVPMSM board.
Something went wrong! Please try again.
Motor will start spinning when pressing user button SW2
of the Freedom microcontroller board.
Something went wrong! Please try again.
Connect with other engineers and get expert advice on designing with the FRDM-MC-LVPMSM on our community site.