F28069 ControlCard Lab1

Similar documents
F28335 ControlCard Lab1

F28027 USB Stick Lab1_3

Lab 1: Guide for creating portable projects in C2000

TUTORIAL Auto Code Generation for F2806X Target

TUTORIAL Auto Code Generation for F2803X Target

APPENDIX A. CODE COMPOSER STUDIO (CCS) v5: A BRIEF TUTORIAL FOR THE DSK6713

Using Code Composer Studio IDE with MSP432

As CCS starts up, a splash screen similar to one shown below will appear.

System Framework Overview Guide and Instructions on How to Use the Template Projects

How to: Flash the DC/DC LED Lighting Kit s F28035 controlcard so that it works with the GUI

As CCS starts up, a splash screen similar to one shown below will appear.

PSIM Tutorial. How to Use SimCoder with TI F28335 Target Powersim Inc.

Code Composer Studio. MSP Project Setup

MEM MEM Control Applications of DSP. Lab 2. Project Creating & GPIO DSP28355 & CCSv5

6L00IA - Introduction to Synergy Software Package Short Version (SSP v1.2.0) Renesas Synergy Family - S7 Series

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

'C/C++' Project/Code Tutorial for Code Composter Studio (CCS)

Exercise: PWM Generation using the N2HET

Code Composer Studio Operation Manual

TUTORIAL Auto Code Generation for F2833X Target

PSIM Tutorial. How to Use SCI for Real-Time Monitoring in F2833x Target. February Powersim Inc.

NIOS CPU Based Embedded Computer System on Programmable Chip

ECE 487 LAB 1 ÇANKAYA UNIVERSITY Overview of DSP Board

BASICS OF THE RENESAS SYNERGY TM

ATOLLIC TRUESTUDIO FOR STM32 QUICK START GUIDE

QUICKSTART CODE COMPOSER STUDIO Stellaris Development and Evaluation Kits for Code Composer Studio

Getting Started with the Texas Instruments ez430

NIOS CPU Based Embedded Computer System on Programmable Chip

Debugging in AVR32 Studio

Getting Started in C Programming with Keil MDK-ARM Version 5

You have a PC with a USB interface, running Microsoft Windows XP (SP2 or greater) or Vista You have the Workshop Installation Software Flash Drive

Getting Started in C Programming with Keil MDK-ARM Version 5

Getting Started in C Programming with Keil MDK-ARM Version 5

Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 1 Creating an AXI-based Embedded System

MEM Microprocessor-Based Control Systems. Lab 4. Modeling and Simple Feedback Control DSP28355, CCSv Introduction. 2.

BASICS OF THE RENESAS SYNERGY PLATFORM

Migrating from CubeSuite+ to Eclipse RL78 Family

Figure 1. Simplicity Studio

MSP430 Interface to LMP91000 Code Library

TMS570LS Microcontrollers: Using the NHET as a General Purpose I/O Pin

BASICS OF THE RENESAS SYNERGY TM

ECE 362 Experiment 3: General Purpose I/O

ATOLLIC TRUESTUDIO FOR ARM QUICK START GUIDE

Freescale Semiconductor Inc. Vybrid DS-5 Getting Started Guide Rev 1.0

BASICS OF THE RENESAS SYNERGY PLATFORM

Migration from HEW to e 2 studio Development Tools > IDEs

CPE 323: Laboratory Assignment #1 Getting Started with the MSP430 IAR Embedded Workbench

MSP430 Interface to LMP91000 Code Library

BHFlashBurn v2.0. User Guide. BHFlashBurn-UG-02 April 2008

Ethernut 3 Source Code Debugging

LAB PROCEDURE. Lab Objectives 1. Generate a project using the GR-Sakura web compiler 2. Edit/Compile/Build/Debug the project using the web compiler

SMT107 User Manual User Manual (QCF42); Version 3.0, 8/11/00; Sundance Multiprocessor Technology Ltd. 1999

ECE QNX Real-time Lab

SAS Simulation Studio 14.1: User s Guide. Introduction to SAS Simulation Studio

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

Module 3: Working with C/C++

Tools Basics. Getting Started with Renesas Development Tools R8C/3LX Family

TMS320F2808, TMS320F2806 and TMS320F2801 SDFlash JTAG Flash Programming Utilities

427 Class Notes Lab2: Real-Time Clock Lab

Software Installation Guide for S32 Design Studio IDE (S32DS): FRDM-KEAZ128Q80 FRDM-KEAZ64Q64 FRDM-KEAZN32Q64

TMS. series SIGNUM SYSTEMS CORPORATION. JTAGjet Driver for Code Composer Studio 2.x/3.0. Installation Instructions

Start a New Project with Keil MDK-ARM Version 5 and ST Micro Nucleo-F446RE

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

Copyright 2015 by Stephen A. Zajac & Gregory M. Wierzba. All rights reserved..spring 2015.

Implementation Techniques for DSP

SPI Storm Studio. Getting Started Guide. Revision Sep Byte Paradigm

F2802x Firmware Development Package USER S GUIDE. F2802x-FRM-EX-UG-210. Copyright 2012 Texas Instruments Incorporated

To install the Texas Instruments CCS Compiler, follow these steps: 1. Go to the TI Wiki page (

HVMotorCtrl + PFC Kit How to Run Guide

DOMAIN TECHNOLOGIES INC. Users Guide Version 2.0 SB-USB2. Emulator

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking)

Creating a new CDC policy using the Database Administration Console

Xilinx Vivado/SDK Tutorial

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

TMS320C5535 ezdsp Quick Start Guide

TMS320C5502 ezdsp Quick Start Guide

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

Project Debugging with MDK-ARM

University of Massachusetts Amherst Computer Systems Lab 2 (ECE 354) Spring Lab 1: Using Nios 2 processor for code execution on FPGA

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

Delfino TMS320F28377D controlcard R1.1 Information Guide

TMS320F2802x SDFlash JTAG Flash Programming Utilities

Create and Add the Source File

April 4, 2001: Debugging Your C24x DSP Design Using Code Composer Studio Real-Time Monitor

FAE Summit Interfacing the ADS8361 to the MSP430F449 Low Power Micro Controller

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

Configuring Code Composer Studio for OMAP Debugging

C File System File Functions EXPERIMENT 1.2

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

Lab 4: Introduction to Programming

C8051F00x/01x-DK C8051F00X/01X DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. 2. Hardware Setup using a USB Debug Adapter

Two Axis Virtual. Click & Move. Two Axis Motion Project 4/15/2016

esi-risc Development Suite Getting Started Guide

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0.

XDS200 ISO Operating Guide

Moses Jones Application Note ECE 480 Design Team 7 Programming Altimeters. Using MSP 430 Launch Pad 11/8/2013

At the shell prompt, enter idlde

Programming in the MAXQ environment

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter

Transcription:

F28069 ControlCard Lab1 Toggle LED LD2 (GPIO31) and LD3 (GPIO34) 1. Project Dependencies The project expects the following support files: Support files of controlsuite installed in: C:\TI\controlSUITE\device_support\f28069\v135 Code Generation Tools Version 6.1.0: Code Composer Studio Version 5.3.0: DSP 28069 December 2012 Frank Bormann Revision 5.5 Texas Instruments Inc.

Project Objective 2. Project Objective Blink LD2 (GPIO31) and LD3 (GPIO34) at the F28069 ControlCard. Software delay loop in main() for approximately 100 milliseconds. No interrupt system in use. Watchdog Timer disabled. 3. Hardware Setup No special setup required. Connect the F28069 Docking Station with a USB cable to your computer. Make sure the main switch SW1 is in position USB. The LED LD1 (green) of the F28069 controlcard should be on. 4. Start Code Composer Studio V5 Start Code Composer Studio V5: When CCS loads, a dialog box will prompt you for the location of a workspace folder. Use the default location for the workspace and click OK. This folder contains all CCS custom settings, which includes project settings and views when CCS is closed so that the same projects and settings will be available when CCS is opened again. The workspace is saved automatically when CCS is closed. Note: The first time CCS opens a Welcome to Code Composer Studio v5 page appears. The term workbench refers to the desktop development environment. The workbench will open in the CCS Edit Perspective view. Notice the CCS EDIT icon in the upper right-hand corner. A perspective defines the initial layout views of the workbench windows, toolbars, and menus which are appropriate for a specific type of task (i.e. code development or debugging). The CCS Edit Perspective is used to create or build C/C++ or any other languages projects. A Debug Perspective view will automatically be enabled when the debug session is started. Page - 2 F28069 - Lab1_1

Project Design 5. Project Design 5.1. Create a new project File New CCS Project: Name the project Lab1 Store it in a Location of your choice; make sure to store the project in a separate subfolder, e.g. \Lab1 Select the Device Family C2000 and the F28069 Set the JTAG connection to Texas Instruments XDS100v1 USB Emulator Select the Linker Command File 28069_RAM_lnk.cmd Select the Runtime support library rts2800_fpu32.lib Do NOT FINISH this window yet! Expand the Project templates and examples part and select Empty Project : F28069 - Lab1_1 Page - 3

Project Design Now click Finish. Next, change some of the project properties. In the project window, right click at Lab1 and select Properties : 5.2. Edit Project Properties 5.2.1. Create a new Variable for include files Right Click at project Lab1 and select Properties Add a new Build Variable: Add: Page - 4 F28069 - Lab1_1

Project Design 5.2.2. Add 2 new include search path locations Extent the search path of the C-Compiler for additional include files. Select Build, C2000 Compiler, Include Options. In the box Add dir to #include search path, add the following lines: "${CONTROL_SUITE}/F2806x_common/include" "${CONTROL_SUITE}/F2806x_headers/include" 5.2.3. Add a new link path location Create a new link path variable CONTROL_SUITE : F28069 - Lab1_1 Page - 5

Project Design 5.2.4. Change Diagnostic Options In the C2000 Compiler tab, category Advanced Options, Diagnostic Options, enable Emit Diagnostic Identifier Numbers Issue Remarks Verbose Diagnostics Also, enter the following numbers: Suppress Diagnostic: 238 Treat Diagnostic as Error: 225 Treat Diagnostic as Error: 515 Background rationale: Diagnostic 238 Controlling Expression is constant will be issued in case of a loop construction, such as while(1) which is used in embedded systems for an endless loop in main. Diagnostic 225 function declared implicitly will be issued in case of missing function prototypes in a C code statement. Diagnostic 515 a value of type %t1 cannot be assigned to an entity of type %t2 will be generated in case of false union or structure accesses. This can happen for example in memory mapped registers. Close the Property Window by Clicking <OK>. 5.3. Link Files to Project In the project window, right click at Lab1 and select Add Files : First add a file, which defines the physical addresses for all data memory mapped registers: C:\TI\controlSUITE\device_support\f2806x\v135\F2806x_headers\cmd\F2806x_Headers_nonBIOS.cmd If you select the file, a new window will appear, asking you to select between Add and Link this file. Add File : makes a copy of the original file and work with that copy in the local project directory. Link File : sets a reference to the original file to use this original file. If we do not need to change the file contents, Link is the preferred selection. It is also recommended to use a relative link, relative to the new link variable CONTROL_SUITE : Page - 6 F28069 - Lab1_1

Project Design In the same way, repeat the linking of additional files for: the definition for all global variables to access the F28069 hardware registers: C:\TI\controlSUITE\device_support\f2806x\v135\F2806x_headers\source\F2806x_GlobalVariableDefs.c Link the code file that defines the code-start entry-point branch instruction. This is required to connect the hardware reset entry-point sequence to a first address in code space (section code_start ). C:\TI\controlSUITE\device_support\f2806x\v135\F2806x_common\source\F2806x_CodeStartBranch.asm Link 2 more files with functions to perform the basic core initialization of the F28069: C:\TI\controlSUITE\device_support\f2806x\v135\F2806x_common\source\F2806x_SysCtrl.c C:\TI\controlSUITE\device_support\f2806x\v135\F2806x_common\source\F2806x_usDelay.asm 5.4. Create the main C file Create a new file Lab1_1.c and enter the following #include line: 5.5. Build and Download the Project Project Build Project Click on Build Debug : Click the Debug icon: F28069 - Lab1_1 Page - 7

Code Implementation A blue arrow should now point to the end of function main(). This is an indication that the machine code has been properly downloaded into the F28069. 6. Code Implementation 6.1. Modify file Lab1_1.c Now that we have a working project framework, we can start to develop our own code for Lab1. Recall that the objective is to toggle the LEDs LD2 (GPIO31) and LD3 (GPIO34) at the F28069controlCARD. switch back to the CCS Edit perspective and edit the file Lab1_1.c. At the beginning of the file, add an external prototype for function InitSysCtrl(). This function is defined in file F2806x_SysCtrl.c and will initialize the device to 80 MHz, Watchdog disabled and all peripheral clocks enabled. extern void InitSysCtrl(void); In function main(), add a call of function InitSysCtrl() : InitSysCtrl(); Next, we have to set the direction for GPIO31 and GPIO34 to output. By default all pins are multiplexed to the GPIO function and the direction is set to input. The register block GpioCtrlRegs is secured by the EALLOW secure switch. Therefore we have to open this switch, before we can modify any register: EALLOW; GpioCtrlRegs.GPADIR.bit.GPIO31 = 1; GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1; EDIS; As initial condition (LD2 = ON, LD3 = OFF), add: GpioDataRegs.GPACLEAR.bit.GPIO31 = 1; GpioDataRegs.GPBSET.bit.GPIO34 = 1; Finally we have to add an endless while(1) control loop to main. Inside, we will toggle the LED and install a simple software delay for-loop. At the beginning of main, add the definition for local variable i with data type unsigned long : while(1) { GpioDataRegs.GPATOGGLE.bit.GPIO31 = 1; // toggle LD2 Page - 8 F28069 - Lab1_1

Code Implementation GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1; for (i=0; i<1000000; i++); } // toggle LD3 // time delay 6.2. Rebuild Project Project Build Project A window will pop up to indicate that the machine code for the target has changed: Answer: Yes. If the compilation and the download were successful, the instruction pointer (blue arrow) is set to the beginning of main. Now perform a Run (F8)! The LEDs should toggle with a period of approximately 100 milliseconds. If not, debug. F28069 - Lab1_1 Page - 9

Solution for Lab1_1.c 7. Solution for Lab1_1.c Page - 10 F28069 - Lab1_1