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

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

HVP-KV10Z32 User s Guide

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

Quick Start Guide for FRDM-KL05Z

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

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

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

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Quick Start Guide for FRDM-KL46Z Rev 1

HVP-KV31F120M User s Guide

OpenSDA on TWR-KW2x. User s Guide Rev 1.1

Quick Start Guide for FRDM-KL46Z Rev 1

Freescale MKW40Z IEEE Software Quick Start Guide

FRDM-KL03Z User s Guide

Freedom FRDM-KV31F Development Platform User s Guide

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

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

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

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

Kinetis Bootloader v1.2.0 Release Notes

FRDM-KE02Z User s Manual

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

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

Emulating Dual SPI Using FlexIO

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

Kinetis SDK v Release Notes for KV5x Derivatives

Freedom FRDM-MC-LVBLDC Development Platform User s Guide

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Freescale MQX RTOS TWR-K64F120M Release Notes

Three-Phase Power Meter Hardware Design Reference Manual

FRDM-K64F Board Errata

Quick Start Guide for FRDM-FXS-MULTI-B

TWR-LS1021A Getting Started

Kinetis USB-KW41Z Wireless Protocol Sniffer Quick Start Guide

Kinetis Updater User's Guide

Getting Started with MCUXpresso SDK CMSIS Packs

Kinetis SDK v Release Notes for the MK21DA5 and MKW24D5 Devices

Emulating I2C Bus Master by using FlexIO

Freescale Kinetis Software Development Kit Release Notes

Emulating I2S bus on KE06

FRDM-KL26Z User s Guide

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

Getting Started with the MCU Flashloader

DDR Validation Tool Getting Started Guide

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

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

TWR-LS1021A Getting Started

Watt Saver Software Component (WSC)

TWR-KE18F User's Guide

Kinetis KE1xF512 MCUs

FRDM-KE04Z User s Guide User Guide

Kinetis Bootloader Demo Application User's Guide

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

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

TWR-KV11Z75M Tower System Module User s Guide

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

TWR-KM34Z50MV3 Quick Start Guide

HVP-MC56F82748 User s Guide

TWR-KL43Z48M Quick Start Guide

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

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

TWR-KL28Z User s Guide

Collecting Linux Trace without using CodeWarrior

HVP-56F82748 Quick Start Guide

Smart Plug Software Design Reference Manual

Getting Started with MQX RTOS for Kinetis SDK

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

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

Getting Started with FreeRTOS BSP for i.mx 7Dual

Component Development Environment Getting Started Guide

P1010RDB-PB Quick Start Guide

MCU Bootloader Release Notes

Generating a Quick and Controlled Waveform With the DAC

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

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network

NXP Semiconductors MCU Bootloader Demo Applications User's Guide

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

TWR-KV58F220M Tower Module User's Guide

Working around ERR7026 according to application needs

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

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

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

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

Kinetis Flash Tool User's Guide

Building U-Boot in CodeWarrior ARMv8

Understanding S08P Internal Clock Source

Processor Expert Software for i.mx Processors Version 1.0

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

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

Kinetis Motor Suite v1.2.0 Release Notes

MMA845x Driver: Quick Start Guide

MCUXpresso SDK USB Power Delivery

TWR-K60F120M Quick Start Guide

for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start

TWR-K21F120MA Quick Start Guide

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

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

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

Quick Start Guide. USB Packet Sniffer/Dongle for Kinetis MKW22D and MKW24D Wireless MCUs USB-KW24D512

Transcription:

Freescale Semiconductor User s Guide Doc Number: TWRKV10Z32IARUG Rev. 0.1, 01/2014 TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools by Freescale Semiconductor, Inc. 1 Purpose This Sample Code Guide will familiarize you with the 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 IAR version 6.70.2 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.......................... 3 4. Download and Install Software and Tools......... 3 5. Freescale Sample Code........................ 4 6. Configure Hardware.......................... 6 7. Terminal Program Configuration................ 6 8. Loading and Running the Demos into IAR 6.70.2... 6 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.

Getting to know the board 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 2 Freescale Semiconductor

OpenSDA Overview 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, run-control debug interfaces, serial-to-usb converters, and more, onto your Tower or Freedom board. Currently, P&E Micro offers two different applications: an MSD application and a debug application. 3.1 MSD Application This OpenSDA application (developed by P&E Micro) allows the Tower or Freedom board to instantiate 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 simply dragging and dropping one of these files into the TWR-KV10Z32 drive installed when your Tower board is enumerated. 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 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 IAR 6.70.2 To download the IAR 6.70.2 (or newest), follow these instructions: 1. Open an internet browser and navigate to IAR s website at www.iar.com/freescale. 2. Next, select IAR Embedded Workbench for ARM under the Kinetis ARM Cortex-M4 Microcontrollers.You can also click http://www.iar.com/en/products/iar-embedded-workbench/arm/ 3. Click on the Download button. 4. Follow IAR s downloading and licensing instructions. 5. To install software tools, follow the installer package instructions. Freescale Semiconductor 3

Freescale Sample Code 5 Freescale Sample Code The Freescale sample code provided for KV10Z32 is a baremetal code with most key peripheral drivers. 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, a src (source) folder and CMSIS library folder. The source folder structure is as follows: 4 Freescale Semiconductor

Freescale Sample Code 5.1.2 Using the Freescale Baremetal Sample Code to Jumpstart your Design The KV10Z32 sample code is provides a jump start for your design, and contains 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 that resides in the \build\iar\kv10 folder. Freescale Semiconductor 5

Configure Hardware Double-click this file and a command prompt 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 work correctly. 6 Configure Hardware 1. Using a Mini-B to A USB cable, connect your 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 IAR 6.70.2 The following instructions describe how to build and debug the platinum demo using IAR 6.70.2. 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 on to your TWR-KV10Z32. If you need assistance in loading this application onto your board, see the OpenSDA user s guide provided in your Quick Start Package. 1. Open IAR Embedded Workbench for ARM 6.70 (Start->All Programs->IAR Systems->IAR Embedded Workbench for ARM 6.70->IAR Embedded Workbench). 2. Open the workspace at \build\iar\platinum\platinum.eww. You can either double click the *.eww icon into the IAR Workspace or by selecting File->Open->Workspace, and point IAR to the workspace path through the dialog box that pops up. 3. Compile the project by clicking the Make icon (or right click on the project and select Make). 4. After compilation completes, ensure that you have the OpenSDA debugger selected. You may check this by following these instructions: a) Right click on the patinum project in the Workspace window pane and select Options. b) In the pop-up dialog box, select Debugger from the Category section on the left hand side of the box. c) In the Setup tab, select PE micro for the Driver. d) Now select PE micro from the Category list on the left hand side of the box. 6 Freescale Semiconductor

Flashing the Pre-compiled Binary onto your Board e) In the Setup tab, select OpenSDA as the P&E Hardware interface type. 5. After compilation completes, download the code to the board and start the debugger by pressing the Download and Debug button 6. The code will download, and the debugger screen will come up and pause at the first instruction. Hit the Go 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 on 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. Freescale Semiconductor 7

Flashing the Pre-compiled Binary onto your Board 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: 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). 4. 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. 8 Freescale Semiconductor

Flashing the Pre-compiled Binary onto your Board 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, 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: TWRKV10Z32IARUG Rev. 0.1 01/2014