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

Similar documents
TMS570LS Microcontrollers: MibADC Example

Exercise: PWM Generation using the N2HET

F28069 ControlCard Lab1

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

TUTORIAL Auto Code Generation for F2806X Target

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

F28335 ControlCard Lab1

Introduction to EZ430 RF2500

Section 2: Getting Started with a FPU Demo Project using EK-LM4F232

TMS470M. Cortex -M3 based Hercules Microcontrollers ARM. 1 Day Workshop

Section Objective: Acquaint with specifications of Launchpad Acquaint with location of switches, LEDs, power-on switch, powering the board.

XDS200 ISO Operating Guide

TUTORIAL Auto Code Generation for F2803X Target

Colorado State University

Software Setup and Introductory Assembly programs for the MSP430 *

BASICS OF THE RENESAS SYNERGY TM

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

STM32L100C-Discovery Board Projects

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

XDS560V2 Installation Guide

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

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

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

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

ABSTRACT. Table of Contents

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

EPM900 - Overview. Features. Technical Data

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

Code Composer Studio Operation Manual

BASICS OF THE RENESAS SYNERGY TM

BASICS OF THE RENESAS SYNERGY PLATFORM

Part I. "Hello, world"

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

Bluetooth 4.0 Development Board (B-DB001 Base Board with B-001 core module)

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

C File System File Functions EXPERIMENT 1.2

Getting Started in Assembly Programming with Keil uvision and MSP432

Renesas Starter Kit for RX111

HVMotorCtrl + PFC Kit How to Run Guide

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

TUTORIAL Auto Code Generation for F2833X Target

BASICS OF THE RENESAS SYNERGY PLATFORM

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

Texas Instruments Code Composer and ez-dsp Setup Notes

TMS320C5502 ezdsp Quick Start Guide

Cortex -M3 Hands-On LAB featuring Serial Wire Viewer

ArduCAM CC3200 UNO board

Quick Start Guide for mbed enabling Freescale FRDM-KL25z Freedom board

Implementation Techniques for DSP

Hercules TM Safety Microcontrollers. Introduction to Hercules ARM Cortex TM -R4F MCUs

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

F28027 USB Stick Lab1_3

Keil TM MDK-ARM Quick Start for. Holtek s HT32 Series Microcontrollers

Installing and using CW 10.x for TPMS applications. Revision 5

Migrating from CubeSuite+ to Eclipse RL78 Family

With the standalone CD, follow the installer dialog.

ECE 487 LAB 1 ÇANKAYA UNIVERSITY Overview of DSP Board

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

Create and Add the Source File

Getting Started with STK200 Dragon

Introduction to Keil-MDK-ARM. Updated:Monday, January 22, 2018

EKK-LM3S811 QUICKSTART

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Keil uvision development story (Adapted from (Valvano, 2014a))

Quick Start Guide SYG-S7G2-MDK. Copyright 2015, Future Designs, Inc., All Rights Reserved

Introduction to the M16C Development Environment

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

Introduction to Keil-MDK-ARM. Updated:Thursday, February 15, 2018

Quick Start Guide Demo Distance2Go. September 2017

BASICS OF THE RENESAS SYNERGY PLATFORM

Import DAVE version 4 generated library sources to ARM MDK using CMSIS PACK. XMC microcontrollers July 2016

The Road to CCSv4. Status Update

Controller Continuum. for Microcontrollers V6.3. Quick Start

Floating-Point Unit. Introduction. Agenda

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board

UART Bootloader for Hercules TMS570LS04x MCU

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

Note that FLIP is an Atmel program supplied by Crossware with Atmel s permission.

Getting Started Guide: TMS-FET470A256 IAR Kickstart Development Kit

Programming in the MAXQ environment

MSP430 Interface to LMP91000 Code Library

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

Comparison of different microcontroller development boards for power electronics applications

ECE2049 Embedded Computing in Engineering Design. Lab #0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

XDS560v2 LC Traveler JTAG Emulator Technical Reference

Getting Started with Kinetis SDK (KSDK) v.1.2

Code Composer Studio v4. Introduction

Speeding AM335x Programmable Realtime Unit (PRU) Application Development Through Improved Debug Tools

TMS570LS Architecture Overview: Memory Map, Clocking, Exceptions

TI mmwave Labs. Vital Signs Measurement

Old Company Name in Catalogs and Other Documents

UCD3138. JTAG Configuration. Using CCS 6

Changing the Embedded World TM. Module 3: Getting Started Debugging

XDS220 Quick Start Guide

Resource 2 Embedded computer and development environment

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

External Headers. USB Host User LEDs. User Switches. E1 Header (Unfitted)

Getting Started with MCUXpresso SDK CMSIS Packs

Labs instructions for Enabling BeagleBone with TI SDK 5.x

ARROW ARIS EDGE Board User s Guide 27/09/2017

Transcription:

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

Overview In this example we will: Create a TMS570 HALCoGen Project Generate and import code into Code Composer Studio Write code to turn on the LED on NHET pin 1 Build, deploy and execute the code to the microcontroller Required Hardware: Windows Based PC (WinXP, Vista, 7) TMS570LS2x USB Development Stick or Microcontroller Development Kit Required Software: TMS570 HALCoGen Code Composer Studio v4.x 2

Setting up a New HALCoGen Project Launch HALCoGen Start Programs Texas Instruments HALCoGen File > New > Project Family: TMDX570 Device: TMDX570LS20USB (for USB Stick) OR TMDX570LS20MDK (for MDK) Name: Exercise Location: C:\myWorkspace For more help with HALCoGen, see this getting started video: LINK 3

The HALCoGen Interface 4

Configuring the Peripherals Select the peripherals that are required for this project. In this lab we need only enable the GIO driver, uncheck all other drivers No further changes should be made, the source code can now be generated. To do this go to File Generate Code Following, the folders on the right will populate with our new files 5

HALCoGen Help Information about the files and functions that HALCoGen creates can be found in the HALCoGen Help menu Help can be launched from the main title bar under Help Help Topics 6

Setting up Code Composer Studio 4 Launch Code Composer Studio v4.x (CCS) Start Programs Texas Instruments Code Composer Studio v4 Code Composer Studio v4 When it launches, CCS will ask you to select a workspace, we will chose C:\myWorkspace Once it loads, go to File New CCS Project For more help with Code Composer Studio, see this getting started video: LINK 7

Setting up our Project Our project name needs to match the name of our HALCoGen Project, Exercise Then Click next On the next page, make sure that your project type is set to ARM and Debug and Release are both checked Then Click next 8

Setting up our Project (cont.) We are not using any referenced projects so click next again 9

Setting up the Project (cont.) Lastly, set the Device Variant to Cortex R and TMS570LS20216SPGE Click Finish 10

Getting Started On the left hand side in the C/C++ Projects explorer, open sys_main.c When ever you generate code in HALCoGen, the program overwrites user code, except specific sections marked by USER CODE BEGIN (x) and USER CODE END For code placement we will be referring to the number within the User Code block /* USER CODE BEGIN (0) */ /* USER CODE END */ 11

Writing the Code Inside User Code 1, copy the code below. /* USER CODE BEGIN (1) */ #include "het.h" /* USER CODE END */ Then in User Code 3, copy the code below. /* USER CODE BEGIN (3) */ /* Set HET port pins to output */ giosetdirection(hetport, 0xFFFFFFFF); /* Set HET port pin 1 high */ giosetbit(hetport, 1, 1); /* Infinite loop */ while(1); /* USER CODE END */ 12

Notifications Lastly we must insert a function that would be called if interrupts were enabled. Without these, the code will fail to build /* USER CODE BEGIN (4) */ /* GIO Notification function not used, but required by compiler */ void gionotification(int bit) { return; } /* USER CODE END */ 13

Compiling the Project The code is now complete and we are ready to build our project. Go to Project Build Active Project Now that we have our.out file, we need to program the microcontrollers Flash memory. 14

Creating a Target Configuration Before we begin, we must make a new target configuration, this tells CCS4 what device this project is designed for. Target New Target Configuration A new window will appear, we will make our file name TMS570.ccxml Click Finish 15

Creating a Target Configuration A new tab will appear with a list of emulators and devices. Connection: Texas Instruments XDS100v2 USB Emulator In the text box labeled Type Filter Text, type TMS570. This will narrow the search down to just TMS570 devices, select TMS570LS20216SPGE Click Save on the right 16

Flash Programming Configuration It is possible to make the flash programming process much faster by only the necessary erasing and programming the necessary regions of flash memory. To do so go to Project Properties In the window that appears select CCS Debug In the CCS Debug window select the TMS570LS20216SPGE Flash Settings option in the Target tab. Then select the Necessary Sectors Only option in the Erase Options area, then click the Apply button. NOTE: This option is only available in CCSv4.2 and newer 17

Programming the Flash We are now ready to program the flash. Go to Target Debug Active Project A new window should appear as it programs the flash memory. This may take a few moments. 18

Testing our Program Click the green arrow on the debug tab to run our program Alternatively the program can be run without the debugger connected by Clicking the red square on the debug tab to terminate the debugger s connection Hit the reset button on the board and the NHET[1] LED should illuminate. Congratulations! You have completed the lab. 19

For More TMS570 Information TMS570 Web Page: www.ti.com/tms570 Data Sheets Technical Reference Manual Application Notes Software & Tools Downloads and Updates Order Evaluation and Development Kits TMS570 Forum: http://e2e.ti.com/support/microcontrollers/tms570/default.aspx News and Announcements Useful Links Ask Technical Questions Search for Technical Content TMS570 WIKI: http://processors.wiki.ti.com/index.php/category:tms570 How to guides Intro Videos General Information 20

Thank You! For completing this TMS570 example 21