Iowa State University Electrical and Computer Engineering. E E 452. Electric Machines and Power Electronic Drives

Similar documents
DRV8312-C2-KIT How to Run Guide

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

Experiment 2 Introduction to TI C2000 Microcontroller, Code Composer Studio (CCS) and Matlab Graphic User Interface (GUI)

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Capacitive Touch Lab. Renesas Capacitive Touch Lab R8C/36T-A Family

Practice Fusion API Client Installation Guide for Windows

Work with Arduino Hardware

Lab 1 Course Guideline and Review

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

Guide to Installing BBL Crystal MIND on Windows 7

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

This manual provides information and instructions for Mac SharePoint Users at Fermilab. Using Sharepoint from a Mac: Terminal Server Instructions

ERIKA Enterprise pre-built Virtual Machine

Using Microsoft Visual Studio API Reference

Sitecore Ecommerce Enterprise Edition Installation Guide Installation guide for administrators and developers

Getting Started with Kinetis SDK (KSDK)

An Introduction to MPLAB Integrated Development Environment

Setup for PWM Tests of BLDC Motor

First Time On-Campus VLab Setup Windows XP Edition

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Installing S500 Power Monitor Software and LabVIEW Run-time Engine

Setting up a Local Interconnect Network (LIN) using dspace MicroAutoBox 1401/1501 Simulink Blocks

How to Install and use Windows XP Mode and Windows Virtual PC in Windows 7 for older 32 bit only Applications

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

SYSTEM REQUIREMENTS...

Using DAVE with MDK Version 5

BioWin Network Installation

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board


Laptop Backup - User Guide (Windows)

Centran Version 4 Getting Started Guide KABA MAS. Table Of Contents

SQL Server 2008 R2 Express Edition Installation Guide

Lab Experiment 1: The LPC 2148 Education Board

Eclipse installation, configuration and operation

Quick Start Guide for High Voltage Solar Inverter DC-AC Board EVM. Version 1.3

TAMUS Terminal Server Setup BPP SQL/Alva

Lab 1: Introduction to Xilinx ISE Tutorial

Allworx Installation Course

VMware/Hyper-V Backup Plug-in User Guide

QSG105 GETTING STARTED WITH SILICON LABS WIRELESS NETWORKING SOFTWARE

Setting Up ALERE with Client/Server Data

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Analog Devices Welcomes Hittite Microwave Corporation NO CONTENT ON THE ATTACHED DOCUMENT HAS CHANGED

IIS, FTP Server and Windows

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

VMware Horizon FLEX User Guide

Application Note: AN00141 xcore-xa - Application Development

How to Install Applications (APK Files) on Your Android Phone

To begin, visit this URL:

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

Chief Architect X6. Download & Installation Instructions. Chief Architect, Inc N. Mineral Dr. Coeur d Alene, Idaho

POOSL IDE Installation Manual

Addendum Advanced POS Printer Drivers

Lab Creating a Logical Network Diagram

Nexio Connectus with Nexio G-Scribe

WAVES. MultiRack SETUP GUIDE V9.80

Installation Guide for Pulse on Windows Server 2012

Wavecrest Certificate

FlexSim LAN License Server

User Manual. Thermo Scientific Orion

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

BASLER ACE QUICK INSTALLATION GUIDE

SA-9600 Surface Area Software Manual

STIM202 Evaluation Kit

Windows 7 Hula POS Server Installation Guide

Table of Contents. ARM Evaluation Board (AEB-1) Welcome Guide ARM DGI 0005D. Proprietary Notice

Phaser 3635MFP Software Upgrade Process

Network/Floating License Installation Instructions

EMBEDDED C USING CODEWARRIOR Getting Started Manual

Maintaining the Content Server

Installation Guide for Pulse on Windows Server 2008R2

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

Moving the TRITON Reporting Databases

Create!form Folder Monitor. Technical Note April 1, 2008

WA2262 Applied Data Science and Big Data Analytics Boot Camp for Business Analysts. Classroom Setup Guide. Web Age Solutions Inc.

BSDI Advanced Fitness & Wellness Software

Kepware Technologies KEPServerEX Client Connectivity Guide for GE's Proficy ifix

Working with SQL Server Integration Services

Table of Contents. 1. Overview Materials Required System Requirements User Mode Installation Instructions..

UP L18 Enhanced MDM and Updated Protection Hands-On Lab

Parallels Desktop for Mac

Xythos on Demand Quick Start Guide For Xythos Drive

How to Connect to Berkeley College Virtual Lab Using Windows

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Unified Messaging. User Guide

ScanShell.Net Install Guide

SSL VPN Setup for Windows

The FlexiSchools Online Order Management System Installation Guide

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

Hitchhiker's Guide to CodeWarrior EE371, EE475 Fall 2005

Job Scheduler User Guide IGSS Version 11.0

Installation Instruction STATISTICA Enterprise Small Business

Team Foundation Server 2012 Installation Guide

Altaro Hyper-V Backup - Getting Started

Transcription:

Electrical and Computer Engineering E E 452. Electric Machines and Power Electronic Drives Laboratory #2 Introduction to the TI F28035 Microcontroller Summary This lab provides an introduction to the F28035 Experimenter Kit, Code Composer Studio, and MATLAB/Simulink Embedded Coder, by executing a simple program to blink an LED. The TI F28035 Experimenter Kit will be used (later on) to control the power electronic devices in the lab. The Code Composer Studio IDE is used to generate an executable file and program the micro-controller unit (MCU). Embedded Coder is a toolbox in MATLAB/Simulink, which provides a graphical method of generating C code for the MCU. Learning objectives Learn general features and capabilities of the F28035 MCU. Generate, build, and debug a project in Code Composer Studio (CCS). Use Embedded Coder to generate a program for the F28035 MCU. Background material (Read before coming to the lab) Piccolo Experimenter Kit Quick Start Guide (QSG-ExperimentersKit.pdf) TMS320F28035 Datasheet (tms320f28035.pdf) Identify main sections of this document and be able to navigate it. No need to read everything in detail. Code Composer Studio Quick Start Guide: http://processors.wiki.ti.com/index.php/c2000_getting_started_with_code_com poser_studio_v5; mainly study Section 6. Embedded Coder User s Guide (Embedded Coder_User Guides.pdf) Study section 36, Working with Texas Instruments Code Composer Studio 4 IDE. Exercises and Questions Instructions: every student should deliver his/her own report at the end of the lab session, even though the experiments are conducted in groups. You may want to answer the questions as you go along the exercises. Time yourselves according to the recommendations below. Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-1

1. Pre-lab assignment Study the material provided with this lab to familiarize yourself with the hardware configuration, and answer the following questions: DELIVERABLE 1: What is the system clock frequency of the Piccolo F28035 MCU? DELIVERABLE 2: Is the processor 16, 32, or 64-Bit? DELIVERABLE 3: What system control voltage is used for the F28035? 5V or 3.3V? DELIVERABLE 4: What pin on the TMS320F28035 device and what GPIO pin on the ControlCARD are connected to the ControlCARD s Red LED (LD3)? DELIVERABLE 5: How many PWM channels are on the F28035? What is the GPIO pin designation of these outputs on the Docking Station? (The answer is in F28035controlCARD-PinOutTable.pdf) For information regarding applications, visit www.ti.com/apps. 2. Piccolo F28035 Experimenter Board. [30 minutes] This section requires use of the Experimenter Kit schematics (USBDockingStation_Schematic [R3].pdf), and the TMDSF28035 datasheet (tms320f28035.pdf). Use this lab time to learn the capabilities and features of this control platform; we will use it to control power electronic devices in future labs. Open ControlSUITE from the Start Menu, or navigate to C:\TI\controlSUITE\controlSUITE.exe. ControlSUITE is your one-stop-shop for everything C2000. Here, you can find the Piccolo F2803x Datasheet, as well as many other useful documents. Take some time to browse ControlSUITE; there are many useful resources here. Navigate through ControlSUITE to find the Experimenter s Kit Quick Start Guide (QSG) DIM100. Go through this document to setup the hardware (section 1). Skip the software setup for Control Suite (section 2) at this time; it has already been installed. Skip the installation of drivers (section 3). Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-2

3. Code Composer Studio v5 [60 minutes] Go through the download process several times to become proficient. You will do this a lot in the future. For a more detailed guide, see How to use Code Composer Studio v5 to program a TI device in the supporting documents for this lab, or consult the CCS Help menu. Note: TI has recently migrated from CCSv4 to CCSv5, to better suit the development of applications for emerging devices. ControlSUITE is set to automatically open CCSv4. To open examples for CCSv5, first open CCSv5, then navigate to the example project. Navigate to C:\ticcsv5 and open Code Composer Studio v5. When instructed, set the work space path to C:\WorkspaceCCSv5. This is a shared location on the local machine, with Read/ Write privileges enabled for any user. If prompted to specify a license, click Activate and enter: License Server Location: io.ece.iastate.edu Port: 27003 Code Composer Studio should read Licensed in the bottom left corner. Go to Help/Welcome to CCS. On the Welcome screen, click on Examples. This will open a navigation bar on the left side of the screen. Scroll down to find the Flashing LED example for the F28035 ControlCARD. Follow the steps outlined here to import, build, and download the example project. You should see the following set of instructions: Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-3

Before building the project, highlight the FlashingLED project in the Project Explorer, then go to Project/Properties, which is shown in Figure 1. On the General tab, select your Device Variant as Piccolo F28035, and set the Connection to XDS100v1 USB. Also, ensure that the Compiler Version is set to TI v5.2.2. The Linker command file should be set as F28035_FLASH_FlashingLeds.CMD. If it is not, browse to the example project location C:\TI\controlSUITE\development_kits\TemplateProjects\FlashingLeds- F28035_v1.0, and select the FLASH command file. Also set the Runtime support library to <automatic>. Click Apply and OK. Figure 1. The Project Properties dialog box has adjustable project options. Build the project. Note the build progress shown in the Console. When done, you should read Finished building target: FlashingLeds.out. Debug the project. You may receive a warning that the debugger is not configured for any particular device. If so, follow the instructions given. If asked to build a new Target Configuration file, save it to C:\WorkspaceCCSv5. Connect the target to the computer via the supplied USB cable. Turn on the board. Debug the imported project. CCS will connect to the target, erase, program, and verify. Once the program is loaded, the device shown in the Debug window will show a status Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-4

of Suspended. Click the Resume button, or go to Run/Continue. The red LED on the ControlCARD should be blinking. Roam around the various options and familiarize yourself with the debug environment. Go through the download and reload processes multiple times. Before disconnecting the target, or terminating the debug session, be sure to reset the CPU. DO NOT PUT A PASSWORD ON THE PROGRAM YOU ARE LOADING; YOU COULD PERMANENTLY LOCK THE DEVICE! Additionally, you may go to Help/Code Composer Help/Getting Started Quickly. Go through the subsections to further familiarize yourself with the CCS environment. 4. Embedded Coder and the TI F28035 Toolbox. [75 minutes] Explore the Embedded Coder Toolbox. Go through the project build process several times to become proficient; we will be doing this a lot in future labs. For a more detailed guide, see Installation, Setup, and Program Generation using ControlSUITE, CCSv5, and Embedded Coder provided in the supporting documents for this lab. Open MATLAB. Set the Current Folder, on the top toolbar, to C:\WorkspaceMATLAB. If you have the folder set as a network location, you will encounter errors during the build process. Read through the Help information for Embedded Coder. In Particular, review the sections in Help/Embedded Coder/User s Guide/Embedded IDEs and Embedded Targets/Working with Texas Instruments Code Composer Studio 4 IDE. Explore other topics within the Embedded IDEs and Embedded Targets subsection, and answer the following questions: DELIVERABLE 6: What Simulink Toolbox Libraries cannot be used to generate code for Embedded Systems? After reviewing the Getting Started section and browsing through Tutorial: Using Makefiles with Code Composer Studio 4.x perform the following: a) Verify the Code Composer Installation: Type the command checkenvsetup ( ccsv4, f28035, check ). Ensure that the Code Generation Tool (compiler) is within the range specified, and that the Header Files match those specified. MATLAB should return the following screen: Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-5

b) Setup the XMakeFile Utility: Enter the command xmakefilesetup. The xmakefile Utility will open after a few moments, as shown in Figure 2. Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-6

Figure 2. MATLAB s xmakefile utility must be set for the proper CCS configuration. Select the configuration ticcs_c2000_ccsv4. Check that the compiler, linker, and archiver tool directories are specified and correct. They should be set to use tools located within the folder for compiler version 5.2.2. If prompted to specify a Code Composer Installation directory, point to the location of C:\ticcsv5\ccsv5. c) Build a Simulink Model to Generate Code: Build the Simulink block diagram shown in Figure 3. Figure 3. Simulink diagram of a simple program task. Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-7

Inside the Target Preferences block, select the IDE/ Tool Chain as CCSv4, and select the proper board, as shown here: Configure the Digital Output for the GPIO of the red LED on the controlcard; you found this pin location earlier. Set the Source Pulse Generator to output a square wave with period 1s, and duty cycle of 75%. Go to Simulation/Configuration Parameters. On the Solver Tab, verify that the solver is set to discrete. On the Hardware Implementation tab, verify that Texas Instruments, C2000, and Little Endian are selected. On the Code Generation tab, ensure the System Target File is idelink_ert.tlc. Code Generation objectives, such as execution efficiency and ROM efficiency can also be specified on this tab. Within Code Generation, go to the Report tab, and check to create a code generation report. In the IDE Link tab, change the Build Action to Build only. Apply the changes and click OK. Go to Tools/Code Generation/Build Model to build the project. Watch the command window to see the progress. Examine the code generation report. Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-8

DELIVERABLE 7: How many lines of code are in the file FlashingLED_main.c? How about the model file FlashingLED.c? When the build is complete, you will see a new folder created in the location specified in the Current Folder called projectname_ticcs. This folder has all files created for use in Code Composer, including a projectname.out executable which will be downloaded to the board. Verify this file exists. d) Load the Project to the Target Device: Open Code Composer Studio. Create a new Target Configuration File, and save it to C:\WorkspaceCCSv5. Select the appropriate device and connection type (Piccolo F28035, XDS100v1 USB). Go to Run/Debug Configurations, shown below. Make a new Launch Configuration under the Code Composer Studio Device Debugging section. Search the File System to select the target configuration file you just created. On the Program tab, browse to the location of the *.out file created during the Embedded Coder build process. Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-9

On the Target tab, scroll down and check Connect to Target on Debugger Startup. Click Apply and verify there are no warnings. Then click Debug. The device is erased and programed with the specified file. When the download is done, the device will be Suspended. Click Resume (play button) to run the program. DELIVERABLE 8: What duty cycle do you observe for the ON state of the LED? Why? e) Reset the CPU and Disconnect the Target: WARNING: When you Suspend (pause button) the target, the program stops at the command it is currently executing; the current state of any outputs will be latched. DO NOT SUSPEND/PAUSE THE TARGET WHILE DRIVING ENERGIZED POWER SWITCHES! Use Reset to halt the device; outputs will latch to their default state, and the program will stop running. 5. Conclusion [15 minutes] Write about one or two things you learned in this lab that you think are important or interesting, and why. Revision 7/23/2012. Nicholas David & Dionysios Aliprantis 2-10