Sensor Controller Studio Hands-On

Similar documents
IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

BASICS OF THE RENESAS SYNERGY PLATFORM

User s Guide IoT Microcontroller Development Kit

BASICS OF THE RENESAS SYNERGY TM

LDC1000 SENT Bridge MSP-EXP430F5529LP based Getting Started

A Tutorial for ECE 175

ez430-chronos Wireless Watch Development Tool: Teardown & Getting Started

MSP430 Interface to LMP91000 Code Library

BASICS OF THE RENESAS SYNERGY PLATFORM

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

Getting Started Guide: TMS-FET470A256 IAR Kickstart Development Kit

Figure 26 CC Debugger Interface

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

Fujitsu 2010 FAE Training Lab Sunnyvale, CA

MSP430 Interface to LMP91000 Code Library

Debugging in AVR32 Studio

BT2540 Bluetooth 4.0 BLE (CC2540) Module Users Manual

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

AGH University of Science and Technology Cracow Department of Electronics

UCD3138. JTAG Configuration. Using CCS 6

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

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

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

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

Using ARM ETB with TI CCS. CCS 3.3 with SR9 on TMS320DM6446

LAB #1: The CSM12C32 Module and PBMCUSLK Project Board

Implementation Techniques for DSP

Hands-On Workshop: ARM mbed

IBM Fault Analyzer for z/os

Quick Start Guide for the Turbo upsd DK3300-ELCD Development Kit- RIDE

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

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

ECE 103 In-Class Exercise L1 Guide

ADS MultiTrace Tutorial v2.0

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

Laboratory Hardware and Tools

MetaWatch Firmware Design Guide

Software Setup and Introductory Assembly programs for the MSP430 *

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

TRACE32 Getting Started... ICD In-Circuit Debugger Getting Started... ICD Introduction... 1

TI mmwave Labs. Vital Signs Measurement

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

Codewarrior for ColdFire (Eclipse) 10.0 Setup

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

User Guide. Introduction. Requirements. Installing and Configuring. C Interface for NI myrio

1.2 - Introduction to the IAR Workbench IDE *

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

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

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

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

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

Embedded Systems. 2. Software Development. Lothar Thiele. Computer Engineering and Networks Laboratory

Code Composer Studio v4. Introduction

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

Exporting MOSAIC Models to Chemcad

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

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

BASICS OF THE RENESAS SYNERGY TM

Using Code Composer Studio IDE with MSP432

Building an Embedded Processor System on Xilinx NEXYS3 FPGA and Profiling an Application: A Tutorial

STM32L100C-Discovery Board Projects

IAR C-SPY Hardware Debugger Systems User Guide

Part I. "Hello, world"

TUTORIAL Auto Code Generation for F2833X Target

Lab Course Microcontroller Programming

Getting Started with STK200 Dragon

Emad Ebeid Ph.D. CS depart University of Verona, Italy

With the standalone CD, follow the installer dialog.

Quick Start Guide: RL78G14 Motor Control Starter Kit

Core2530/XCore2530 User Manual

NEW CEIBO DEBUGGER. Menus and Commands

3 Getting Started with Objects

How to Create and Modify Page Numbers in the American University Thesis and Dissertation Template

Writing Code and Programming Microcontrollers

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

Debugging Applications with the JTAG In-Circuit Emulator

AN301, Spring 2017, V 1.0 Ken Havens

EECS 388 Laboratory Exercise #03 Button Input and Serial Communication September 16, 2018 Gary J. Minden

Tutorial 19 - Remotely Debugging Projects

AURIX family and AUDO Future, AUDO MAX

DSP Development Environment: Introductory Exercise for TI TMS320C55x

Getting Started with Kinetis SDK (KSDK) v.1.2

TriCore Free Entry Tool Chain. AURIX family and AUDO Future, AUDO MAX

ADuC7XXX MicroConverter Get Started Guide

Getting Started Guide RS-EDP & XC167 CPU Module. Version 2 10th June 2010

RVDS 4.0 Introductory Tutorial

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

NIOS CPU Based Embedded Computer System on Programmable Chip

Getting Started with Kinetis SDK (KSDK) v.1.3

Controller Continuum. for Microcontrollers V6.3. Quick Start

Dual Tone Multi-Frequency (DTMF) Generation with TI-DSP TMS320C6713 Processor

LabEXCEL Clino. Manual. WYLER AG Im Hölderli CH-8405 WINTERTHUR Switzerland. Tel (0) Fax (0)

RVDS 3.0 Introductory Tutorial

CodeWarrior Development Studio for Freescale 68HC12/HCS12/HCS12X/XGATE Microcontrollers Quick Start SYSTEM REQUIREMENTS Hardware Operating System 200

TI ARM Lab 2 Bright Light

SensorXplorer TM Installation Guide

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

The board contains the connector for SWD bus to implement SWD method of programming. Fig. K190 VDD 2 GND 4

EMBEDDED SYSTEMS: Jonathan W. Valvano INTRODUCTION TO THE MSP432 MICROCONTROLLER. Volume 1 First Edition June 2015

Transcription:

Sensor Controller Studio Hands-On Introduction This introduction lab is the entry level guide on how to use sensor controller studio to generate and debug code that will run on the sensor controller processor. After the hands-on tasks there is a note describing how to add a sensor controller task to an application project. Please note that the latest installer (Version 1.0.1 (June-2015)) currently only support the XDS100 debugger. Support for the XDS110 ( JTAG device in ST DevPack) will be added in the next release (version 1.1). Pre-requisites Knowledge: - Basic familiarity with IDEs (IAR or CCS) Software - IAR Embedded Workbench (version 7.30.4 or later) or Code Composer Studio (version 6.1 or later). Hardware - 1 x CC2650EM (Evaluation Module) - 1 x SmartRF06 Evaluation Board - 1 Micro-USB cable Task 1 Getting started Making sure it works - Make sure IAR Embedded Workbench or CCS is installed. - Download SCS and install it to default location. http://www.ti.com/tool/sensor-controller-studio Task 2 Run the Analog Light Sensor example This task is almost the same exercise as the Tutorial: Analog Light Sensor which can be found in the SCS Quick Start Guide. The quick start guide has more detailed information than this task. A link to the document is given in the Tool Documentation Pane which resides on the top tight of the start page in SCS. The quick start guide resides in the path given below. C:\Program Files (x86)\texas Instruments\Sensor Controller Studio\docs

Task 2.1 Moving On - Open SCS. - Start the example either by double clicking on the given example as shown below or by pressing file- > Open Project and selecting: \Documents\Texas Instruments\Sensor Controller Studio\examples\analog_light_sensor\analog_light_sensor.scp Double click on the Analog Light Sensor Example - In the Projects settings set Operating system to TI-RTOS. - Review the task code (Initialization -, Execution - and Termination code). Quiz: a. How many times will the Initialization code run? b. How often will the Execution code run? Hint: see help text on the fwscheduletask prodecure - Go to the Code Generator tab by navigating there in the left panel or by using the keyboard combination CTRL+G. - Verify that your project is selected in the Current Project Selection (If this is the only open project it will be selected by default). - Push the bottom button called Generate driver source code. If there are no compile errors your source code will be compiled into assembler and the driver source code will be generated. In the figure below you can see an overview of the Code Generator panel.

Memory Usage Generate driver source code Generated SCIF driver files Task 2.1 Run example on the (CC2650EM or CC1350EM)+SmartRF06EB - Open your IDE (IAR or CCS) - Open the TI-RTOS version of the standalone example code found here: Documents\Texas Instruments\Sensor Controller Studio\examples\analog_light_sensor\projects\iar_tirtos\analog_light_sensor_tirtos.eww Documents\Texas Instruments\Sensor Controller Studio\examples\analog_light_sensor\projects\ccs_tirto\analog_light_sensor_tirtos.projectspec - Connect a USB cable to your SmartRF06EB + EM and power the board. - Compile and download the project to your device. - Verify that the example runs as expected by covering the light sensor on the EB with your hand (then all LEDs should be shut off). Task 2.2 Task Debugging In this task you will debug the sensor controller task (analog light sensor). - Go to the Task Testing panel by navigating there in the left pane or by using the keyboard combination CTRL+T. - Verify that your project is selected in the Current Project Selection (If this is the only open project it will be selected by default). - Push the bottom button called Generate and output task testing driver source code.

- Open the task_testing project in IAR or CCS and download the code to your CC2650 device. The project is located here: Documents\Texas Instruments\Sensor Controller Studio\examples\task_testing\projects\iar\task_testing.eww Documents\Texas Instruments\Sensor Controller Studio\examples\task_testing\projects\ccs\task_testing.projectspec - Start a debug session in SCS by pressing the Connect button ( ) or F12. - Skip the initialization code by pressing the Run the initialization code once button ( ) or F6. - Then enter debug of execution code by pressing the Execution code debugging button ( ) or CTRL+F11. - Go to the assembler code line where the ADC is disabled and set a break point by pressing F9 while the line is marked. Then run the code by pressing F5 and wait until the breakpoint is triggered. - Observe the state.adcvalue and remember it. Then hold your finger over the light sensor and repeat the code execution by pressing: o F5 Run continuously o F8 End the debug session o F6 Run the termination code once o F6 Run the initialization code once o CTRL+F11 Run the execution code once in the task debugging panel o F5 Run continuously Then verify that the value is lower due to less light hitting the sensor. Unfortunately it is not possible to simply restart the execution code without going through the steps mentioned above (SCS version 1.0.1). - Play around in debug mode if desired. Note: When you do significant changes to the projects such as change IO mapping, alter RAM variables (cfg.x, state.x, input.x, output.x), etc. you will need to generate task testing drivers again and download the "Task Testing" project from IAR/CCS to your device before you start a new debug session from Sensor Controller Studio (SCS) (You can then see changes in the content of sciftestdriversetup in the generated files). If you do small logic changes to the execution code (simple changes to pauxramimage) you do not need to download the "Task Testing" project again. Then you can simply start a new debug session from SCS (the new pauxramimage will be loaded). Task 2.3 Run Pre-execution data vectors In this sub-task you will observe the data structures in real time while the sensor controller program is running. - Connect to your device by pressing the Connect button ( ) or F12. - In the right pane tick off cfg.pbinthresholds, output.bin and state.adcvalue. - Press F6 to run the initialization code once and then press F5 to run (free) the code. Provide different levels of strength to the light sensor and observe the value in state.adcvalue.

Now you will load a Pre-Execution Vector Input file to illustrate how you can set a predefined list of values that will be automatically loaded into the cfg.pbinthresholds array. - Create a.csv file with the content found in Appendix B CFG Input Indexed. (You can use excel to create this file). - Load the file you created above by using the Task Testing menu or pressing the open file button ( ) on the right. Then press F6 to run the initialization code once and then press play. Observe the changes. Try to interpret the behavior.

Note: How to integrate SCS drivers into an Application It is fairly easy to integrate a sensor controller application with your main application project. To do this you must simply generate the sensor controller drivers and copy the following files to your main application project (TI-RTOS based): o scif.c o scif.h o scif_framework.c o scif_framework.h o scif_osal_tirtos.c (scif_osal_none.c when running standalone (no operating system)) o scif_osal_tirtos.h (scif_osal_none.h when running standalone (no operating system)) For fast access to the files, push the button on the bottom right in the Code Generator pane to view the output directory which contains the files mentioned in the list above. Then you will need to merge content from main_tirtos.c or main.c from the examples that come with SCS into your application main file to initialize and set up the required configuration for the sensor controller task.

Appendix A Answers to Quiz a. How many times will the Initialization code run? It will run once for every time scifstarttasksnbl is called. PS: This function must not be called for already active tasks. b. How often will the Execution code run? It depends on the task tick interval. For the analog Light Sensor example it is set to the following: // Set the Sensor Controller task tick interval to 1/8 second scifstartrtcticks(0x00010000, 0x00002000); In the execution code the next execution code run is scheduled to start at 1 task tick later (1/8 of a second): fwscheduletask(1); Appendix B CFG Input Indexed index;cfg.pbinthresholds.[0];cfg.pbinthresholds.[1];cfg.pbinthresholds.[2];cfg.pbinthresholds.[3];cfg.p BinThresholds.[4];cfg.pBinThresholds.[5] 0;800;800;800;800;800;800 20;100;800;800;800;800;800 40;100;200;800;800;800;800 60;100;200;300;800;800;800 80;100;200;300;400;800;800 100;100;200;300;400;500;800 120;100;200;300;400;500;600

Appendix C How to connect to SensorTag to the SmartRF06EB Debugger (XDS100) The setup is shown in the figure below. A 10-pin 1.27 mm pitch debug cable is used to connect the P410 header on the SmartRF06EB to the debug connector on the ST2.0. Figure 1 - CC2650 SensorTag2.0 connected to the XDS100 debugger on the SmartRF06EB.