TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools

Similar documents
TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

HVP-KV10Z32 User s Guide

Quick Start Guide for FRDM-KL05Z

Quick Start Guide for the Freescale Freedom Development Platform FRDM-KL43Z

Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil

Quick Start Guide. TWR-KV10Z32 Development Kit for Kinetis KV1x Family TOWER SYSTEM

Quick Start Guide for FRDM-KL46Z Rev 1

Getting Started with Freescale MQX RTOS for Kinetis SDK and Kinetis Design Studio IDE

HVP-KV31F120M User s Guide

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Quick Start Guide for FRDM-KL46Z Rev 1

Freedom FRDM-KV31F Development Platform User s Guide

OpenSDA on TWR-KW2x. User s Guide Rev 1.1

Adding a run control interface into an existing CodeWarrior for MCU v10.x project

FRDM-KL03Z User s Guide

FRDM-KE02Z User s Manual

MQX RTOS Release Notes for Kinetis SDK FRDM- KV10Z Freescale Freedom Development Platform

Freescale MKW40Z IEEE Software Quick Start Guide

Load Position-Independent Code (PIC) on a Kinetis Platform Using the IAR EWARM Compiler

Getting Started with Freescale MQX RTOS for Kinetis SDK and ARM GCC

Kinetis Bootloader v1.2.0 Release Notes

TWR-LS1021A Getting Started

MQX RTOS Release Notes for Kinetis SDK v1.2.0 for KL33Z64 for FRDM-KL43Z Freescale Freedom Development Platform

Freedom FRDM-MC-LVBLDC Development Platform User s Guide

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Emulating Dual SPI Using FlexIO

Kinetis SDK Release Notes for the TWR-K24F120M Tower System Module

Kinetis SDK v Release Notes for KV5x Derivatives

Quick Start Guide for FRDM-FXS-MULTI-B

FRDM-K64F Board Errata

Freescale MQX USB Stack for TWR-K24F120M GA User s Guide

Kinetis USB-KW41Z Wireless Protocol Sniffer Quick Start Guide

Freescale MQX RTOS TWR-K64F120M Release Notes

Three-Phase Power Meter Hardware Design Reference Manual

Kinetis Updater User's Guide

HVP-56F82748 Quick Start Guide

Offline Flash Programmer for Kinetis K- and L-series MCUs

TWR-LS1021A Getting Started

FRDM-KL26Z User s Guide

HVP-MC56F82748 User s Guide

PMSM Field-Oriented Control Using MC56F84789 DSC With Encoders Demo Guide

Kinetis SDK v Release Notes for the MK21DA5 and MKW24D5 Devices

Integrate TWR-EPD Software with MQX RTOS Based on the TWR-K21F120M Platform

Freescale Kinetis Software Development Kit Release Notes

Quick Start Guide for TWR-S08MM128-KIT TOWER SYSTEM MC9S08MM128. The industry s most complete solution for portable medical applications

Watt Saver Software Component (WSC)

Reference Design KL25-AGMP01 User Guide 10-Axis Data Logger Tool Kit

Getting Started with the MCU Flashloader

DDR Validation Tool Getting Started Guide

Collecting Linux Trace without using CodeWarrior

Emulating I2C Bus Master by using FlexIO

General C Functions for the etpu Covers the MCF523x, MPC5500, MPC5600, MPC5700, MPX40 and all etpu-equipped Devices

Quick Start Guide for TWR-MC56F8257 TOWER SYSTEM MC56F8257. For power conversion and motor control applications

TWR-KM34Z50MV3 Quick Start Guide

Quick Start Guide TRK-KEA. Kinetis EA Series MCUs for Automotive Electronics Applications. StarterTRAK

FRDM-KE04Z User s Guide User Guide

How to setup pre-build steps in CodeWarrior for Microcontrollers v10.x

Kinetis Bootloader Demo Application User's Guide

TWR-KV11Z75M Tower System Module User s Guide

P1010RDB-PB Quick Start Guide

Emulating I2S bus on KE06

Processor Expert Software for i.mx Processors Version 1.0

Working around ERR7026 according to application needs

Quick Start Guide. TWR-K60D100M Low-Power MCU with USB, Ethernet and Encryption TOWER SYSTEM

Generating a Quick and Controlled Waveform With the DAC

Kinetis KE1xF512 MCUs

Component Development Environment Getting Started Guide

TWR-KE18F User's Guide

Building U-Boot in CodeWarrior ARMv8

TWR-KL43Z48M Quick Start Guide

WPR1500-LDO MP Receiver V2.1 Reference Design User s Guide

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network

i.mx 6Solo/6DualLite Product Lifetime Usage Estimates

Getting Started with MCUXpresso SDK CMSIS Packs

TWR-KL28Z User s Guide

Smart Plug Software Design Reference Manual

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

TWR-KV58F220M Tower Module User's Guide

MMA845x Driver: Quick Start Guide

Quick Start Guide. TWR-VF65GS10 For Vybrid Controller Solutions Based on ARM Cortex -A5 and Cortex-M4 Processors with the DS-5 Toolchain TOWER SYSTEM

TWR-KE18F. Quick Start Guide. 32-bit Kinetis MCU based on ARM Cortex -M4 provides up to 168 MHz CPU performance, up to 512 KB flash with 64 KB SRAM

MCU Bootloader Release Notes

TWR-K21F120MA Quick Start Guide

NXP Semiconductors MCU Bootloader Demo Applications User's Guide

Lab Tutorial for TWR-S08MM128-KIT TOWER SYSTEM LAB MC9S08MM128. Electrocardiogram (EKG) with Freescale USB stack

Understanding S08P Internal Clock Source

for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start

TWR-K60F120M Quick Start Guide

CodeWarrior Development Studio for StarCore 3900FP DSP v SP3 Release Notes

Quick Start Guide TWR-S08PT60. 5-Volt S08P Family of 8-bit MCUs for Industrial and Appliance Applications TOWER SYSTEM

CodeWarrior Development Studio Processor Expert RTOS Adapter User Guide

The process also requires the use of the following files found in the Micriµm Quick Start Package for the FRDM-KL46Z:

µc/probe on the Freescale FRDM-KL05Z without an RTOS

Getting Started with FreeRTOS BSP for i.mx 7Dual

MCUXpresso SDK USB Power Delivery

Kinetis KV5x Real-Time Control MCUs with Ethernet Up to 1 MB Flash and 256 KB SRAM

Getting Started with MQX RTOS for Kinetis SDK

Quick Start Guide for TWR-S08LL64 TOWER SYSTEM MC9S08LL64. S08 ultra-low-power LCD segment MCU

i.mx 6 Android JB 4.3_1.1.1 Patch Release Notes

Model Based Development Toolbox MagniV for S12ZVC Family of Processors

Transcription:

Freescale Semiconductor User s Guide Doc Number: TWRKV10Z32CWUG Rev. 0.1, 01/2014 TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools by Freescale Semiconductor, Inc. 1 Purpose This Sample Code Guide will familiarize you with TWR-KV10Z32 board and development tools. You will learn the features of the TWR-KV10Z32 board, the features of the OpenSDA standard, and how to access the source code examples using CodeWarrior version 10.5 or newer. In addition, instructions are provided to download a precompiled binary file to your board. Contents 1. Purpose.................................... 1 2. Getting to know the board..................... 1 3. OpenSDA Overview.......................... 2 4. Download and Install Software and Tools......... 3 5. Freescale Sample Code........................ 4 6. Configure Hardware.......................... 7 7. Setting up a TOC entry for a long section title that wraps to the next line............................... 7 8. Loading and Running the Demos into CodeWarrior 10.5 7 9. Flashing the Pre-compiled Binary onto your Board.. 8 2 Getting to know the board The tower board (TWR-KV10Z32) features the Kinetis MKV10Z32VLF7 microcontroller and comes with the following features (which are highlighted in the figure below): 48-LQFP MKV10Z32 MCU (75MHz ARM Cortex-M0+ CPU, 32KB Flash, 8KB RAM, 3 Flextimers, 2x16-bit ADCs (conversion time > 800nS), PDB, 12-bit DAC, ACMP with 6-bit DAC, etc.) On board OpenSDA with USB connection used to debug code without external debug interface 2014 Freescale Semiconductor, Inc. All rights reserved.

OpenSDA Overview Header for standard mini Cortex SWD connector used to debug code on either OpenSDA or KV10Z32 with external debug interface Power indication LED 10MHz crystal on board for the microcontroller MMA8451Q Accelerometer connected to I2C channel 8 LEDs connected with buffers to PWM channels for dimming. 2 Push buttons for user input or interrupts to the microcontroller 4 Thermistors for single ended or differential analog inputs Reset push button for MKV10 Elevator signal supporting TWR-MCLV3PH Header to connect to APMOTOR56F800E motor board and TWR-MCLV3PH motor tower board 3 OpenSDA Overview OpenSDA is an open-standard serial and debug adapter. It bridges serial and debug communications between a USB host and an embedded target processor. OpenSDA features a mass storage device bootloader that offers a quick and easy mechanism for loading applications such as flash programmers, 2 Freescale Semiconductor

Download and Install Software and Tools run-control debug interfaces, serial-to-usb converters, and more, on to your Tower or Freedom board. Currently, P&E Micro offers both an MSD and a debug application. 3.1 MSD Application This OpenSDA application was developed by P&E Micro and allows the Tower or Freedom board to instantiate as a mass storage device on your computer. Once this application properly enumerates, you may program the KV10Z32 on your tower board with a binary or SREC file by dragging and dropping one of these files into the TWR-KV10Z32 drive which is installed when your Tower board enumerates. In addition, you will have serial communication with the KV10Z32. 3.2 Debug Application This OpenSDA application (also developed by P&E Micro) allows you to program and debug your KV10Z32 on your Tower board just as any other debugger module would allow. With this application loaded onto your Tower board, you will also have serial communication with the KV10Z32 available. 4 Download and Install Software and Tools 4.1 Downloading and Installing OpenSDA Drivers Before you begin, you will need the latest OpenSDA serial drivers installed on your development computer and on your TWR-KV10Z32. The latest OpenSDA drivers should already be installed, and your computer system should be able to automatically find the latest Windows CDC drivers (as they should be pre-installed on the TWR-KV10Z32 board). If they are not, navigate to www.pemicro.com/opensda/index.cfm and follow the directions on this page to download the correct OpenSDA files. You may also refer to the OpenSDA user s guide which can be found in your Quick Start Package. 4.2 Downloading and Installing CodeWarrior 10.5 To download Code Warrior 10.4, follow these instructions: 1. Navigate to the Code Warrior download page at www.freescale.com/codewarrior. Freescale Semiconductor 3

Freescale Sample Code 2. Click the link in the red line coming into the download page. 3. Download the CodeWarrior for Microcontrollers 10.5 (Eclipse, Offline). 4. Install CodeWarrior 10.5. 4.3 Installing KV10 Service Pack for CodeWarrior 10.5 Install KV10 service pack com.freescale.mcu10_5.kinetis_kv10_75mhz.win.pex.sp.v1.0.2.zip or the latest version. 5 Freescale Sample Code The Freescale sample code provided for KV10Z32 is a baremetal code with most key peripheral drivers. 4 Freescale Semiconductor

Freescale Sample Code 5.1 Baremetal Sample Code (kvxx_drv_lib) 5.1.1 Baremetal Sample Code Folder Structure The Baremetal sample code folder contains three folders at the top level: a build folder, an src (source) folder and a CMSIS library folder. The build folder is structured as follows: Freescale Semiconductor 5

Freescale Sample Code The source folder is structured as follows: 5.1.2 Using the Freescale Baremetal Sample Code to Jumpstart your Design The KV10Z32 sample code is provided as a jump start for your design, and includes code examples. We have provided a script that will copy our platinum project and rename it to your desired project name. This script is a single executable, make_new_project_kv10.exe which resides in the \build\cw\kv10 folder. 6 Freescale Semiconductor

Configure Hardware Double-click this file and a pop-up window will prompt you for a project name. Copy the platinum project and rename all of the necessary files for your new project to function correctly. 6 Configure Hardware 1. Using a Mini-B to A USB cable, connect the TWR-KV10Z32 board to your computer. Be sure to plug the Mini-B connection into the OpenSDA port of the TWR-KV10Z32 board. 2. No special hardware configuration is necessary to run the demo applications in the code examples unless otherwise specified by the readme.txt file located in the project source folder. 7 Terminal Program Configuration The OpenSDA serial port is designed to enumerate just as any other USB to serial converter. Therefore, you will need to open a serial terminal utility (Tera Term, Hyperterm, etc.) and configure your terminal as follows: 115200 baud 8 data bits 1 stop bit no parity no flow control 8 Loading and Running the Demos into CodeWarrior 10.5 The following instructions describe how to build and debug the platinum demo using CodeWarrior 10.5. This document is targeted for users who choose to use the OpenSDA programming and debugging capabilities and it is assumed that you have loaded the P&E Micro Debug application onto your TWR-KV10Z32. If you need assistance in loading this application onto your tower board, see the OpenSDA user s guide provided in your Quick Start Package. 1. Open CodeWarrior 10.5. Freescale Semiconductor 7

Flashing the Pre-compiled Binary onto your Board 2. Drag.project file into CodeWarrior 10.5 and it will open. 3. Clean the project and then build it. 4. Download the code to the board and start the debugger by pressing the Debug As button. 5. The code will download, and the debugger screen will come up and pause at the first instruction. 6. Hit the Run button to start running. 7. On the terminal you should see the following message: 8. Enter any character which will be echoed to the terminal. 9 Flashing the Pre-compiled Binary onto your Board Your TWR-KV10Z32 board should come with the OpenSDA MSD application preprogrammed onto the K20 device. If this is the case, you should see the board enumerated as a USB mass storage device and the following icon should be present in your My Computer window as shown. If the TWR-KV10Z32 icon is not available, see the OpenSDA User s Guide to program the MSD application onto your board. Otherwise, follow these steps to load a pre-compiled binary onto your KV10Z32: 1. Navigate to the TWR-KV10Z32 drive in your file system (or you may double-click the TWR-KV10Z32 icon in the screen displayed above). 2. You should see the following files: 8 Freescale Semiconductor

Flashing the Pre-compiled Binary onto your Board 3. If you do not, reprogram your board with the MSD application. Otherwise, open a second explorer window and navigate to the location where your pre-compiled binary application is stored ( \build\binaries). Drag and drop the one of.srec file into the TWR-KV10Z32 drive and the KV10Z32 will be automatically programmed with the pre-compiled binary. Freescale Semiconductor 9

How to Reach Us: Home Page: freescale.com Web Support: freescale.com/support Information in this document is provided solely to enable system and software implementers to use Freescale products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document. Freescale reserves the right to make changes without further notice to any products herein. Freescale makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters that may be provided in Freescale data sheets and/or specifications can and do vary in different applications, and actual performance may vary over time. All operating parameters, including typicals, must be validated for each customer application by customer s technical experts. Freescale does not convey any license under its patent rights nor the rights of others. Freescale sells products pursuant to standard terms and conditions of sale, which can be found at the following address: freescale.com/salestermsandconditions. Freescale, the Freescale logo, CodeWarrior, and Kinetis are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Tower is a trademark of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2014 Freescale Semiconductor, Inc. Document Number: TWRKV10Z32CWUG Rev. 0.1 01/2014