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

Similar documents
Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

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

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

ToolStick-EK TOOLSTICK USER S GUIDE. 1. Kit Contents. 2. ToolStick Overview. Green and Red LEDs. C8051F321 provides USB debug interface.

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

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

CMS-8GP32. A Motorola MC68HC908GP32 Microcontroller Board. xiom anufacturing

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

Embedded Development Platform Getting Started Guide for XC167 Command Module

Getting Started with STK200 Dragon

Manual of Board ET-PIC STAMP 18F8722-K22 ET-PIC STAMP 18F8722-K22

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

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

Nuvoton 4T 8051-based Microcontroller NuTiny-SDK-N78E715 User Manual

LPC2468 Industrial Reference Design Platform System Development Kit Version 1.2. August 2008

STM32L100C-Discovery Board Projects

ECE3120: Computer Systems Hardware & Software Development Tools

LPC1768 Industrial Reference Design Platform System Development Kit Version 1.3. May 2009

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

CEIBO FE-5111 Development System

Objective: Additional project details: Code: PSEMBP 100 Category:STEM Level: High School/Community C.

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

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

CEIBO FE-51RD2 Development System

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

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Nuvoton 1T 8051-based Microcontroller NuTiny-SDK-N76E885 User Manual

Easy Kit Board Manual

C8051F530A-DK C8051F530A DEVELOPMENT KIT USER S GUIDE. 1. Relevant Devices. 2. Kit Contents

Adesto Serial Flash Demo Kit: Quick Start Guide

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

keyestudio Keyestudio MEGA 2560 R3 Board

DEMO9S08LG32 Up to 5V MCU with integrated LCD display driver

AK-STM32-ETH Development Board

FM3. MB9B500 Series 32-BIT MICROCONTROLLER FSS MB9BF506R EV-BOARD USER MANUAL APPLICATION NOTE FUJITSU SEMICONDUCTOR (SHANGHAI) LIMITED

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

HandsOn Technology -- HT-MC-02 MODEL: HT-MC-02

Programming in the MAXQ environment

Lab 1 Introduction to Microcontroller

User Manual. LPC-StickView V3.0. for LPC-Stick (LPC2468) LPC2478-Stick LPC3250-Stick. Contents

EB-51 Low-Cost Emulator

Mega128-Net Mega128-Net Mega128 AVR Boot Loader Mega128-Net

CEIBO FE-5131A Development System

DEV-1 HamStack Development Board

LPC2148 DEV BOARD. User Manual.

AC/DC. Adapter. Serial. Adapter. Figure 1. Hardware Setup

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

78M6618 PDU1 Firmware Quick Start Guide

Development Tools. 8-Bit Development Tools. Development Tools. AVR Development Tools

AGH University of Science and Technology Cracow Department of Electronics

CoiNel Technology Solutions LLP. LPC2148 ARTIST Instruction Manual LPC2148 ARTIST. Instruction manual. Revision 1

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

LPC1788 Mio Board. The functional details of the board are as follows-

ESP-WROVER-KIT Getting Started Guide

Evaluation board for NXP LPC2103. User Guide. Preliminary Version updated 27 th Aug TechToys Company All Rights Reserved

Arduino ADK Rev.3 Board A000069

[MG2420] MCU Module Datasheet. (No. ADS0705) V1.0

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

Debugging in AVR32 Studio

Quick-Start Guide. BNS Solutions. QSK62P Plus

STM32F429 Overview. Steve Miller STMicroelectronics, MMS Applications Team October 26 th 2015

P&E Microcomputer Systems, Inc. PKGPPCNEXUS

EM6819 TOOLS DEVELOPMENT QUICK START

F²MC-8FX FAMILY MB95100 SERIES EMULATOR HW SETUP 8-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

Clicker 2 for Kinetis

EMUL-PPC-PC. Getting Started Guide. Version 1.0

AC/DC Adapter. Figure 1. Hardware Setup

User Manual. LPC-StickView V1.1. for LPC-Stick. Contents

Also available for purchase separately are socket daughter boards for the QFN-11 and QFN-10 packages.

ADuC812 GetStarted Guide a tutorial guide for use with the ADuC812 Quickstart Development System CONTENTS:

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

AVR Intermediate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

AN1369 APPLICATION NOTE

C8051F700-DK C8051F700 DEVELOPMENT KIT USER S GUIDE. 1. Relevant Devices. 2. Kit Contents. 3. Hardware Setup

C8051F411-EK C8051F411 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Kit Overview. 3. Evaluation Board Interface LCD User Interface

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

P89V51RD2 Development Board May 2010

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

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

STM32-SK/RAIS,STR91X-SK/RAI,STR7-SK/RAIS STM32-D/RAIS,STR9-D/RAIS,STR7-D/RAIS

TUTORIAL Auto Code Generation for F2833X Target

Quick Start Guide. S12VR64EVB S12 MagniV Mixed-Signal MCUs. S12 MagniV

UT32M0R500-EVB Development Board User Manual

Intro to MS Visual C++ Debugging

Bolt 18F2550 System Hardware Manual

XNUCLEO-F030R8, Improved STM32 NUCLEO Board

ADuC7XXX MicroConverter Get Started Guide

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

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

phycore- AT91M55800A

CEIBO FE-W7 Development System

ET-BASE AVR ATmega64/128

DC6688EMT User Manual

ARDUINO LEONARDO WITH HEADERS Code: A000057

78M6613 PSU Firmware Quick Start Guide

Versa-Kit-30xx Getting Started Guide Rev 1.0

FriendlyARM. Mini2440.

P&E Microcomputer Systems, Inc. P.O. Box 2044, Woburn, MA 01888, USA

Transcription:

Contents: Circuit Board upsd DK3300-ELCD Development Board with a upsd3334d-40u6 MCU with Enhanced Graphic LCD RLINK-ST, a USB-based JTAG adapter from Raisonance for debugging with Raisonance Integrate Development Environment (RIDE) ULINK, a USB-based JTAG adapter from Keil for debugging with Keil s uvision Tools. USB Cables and RS232 Cables 110/220V Universal Power Supply Adapter Software and Tools CD s 1) RKit Development Suite CD- Raisonance: Contains o RIDE C-Compiler and Assembler (limited to 4Kbytes code size) o RIDE Debugger Utility (no code size limit) o upsd3300 sample projects and Application Note o Also includes ST s PSDsoft Express software for configuring the Programmable Logic inside the upsd3300 2) DK3300-ELCD CD- STMicroelectronics: Contains o STMicroelectronics Datasheets, Tools, Software,uPSD3300 sample projects, User Manual and Application Notes o Keil uvision 2 Software and support Tools (Demo Version) for upsd (Limited to 2Kbytes code size) Purpose: The demonstration application code is a RIDE based project that shows use of the PWM and ADC function blocks within the upsd3300 device. A pulse width modulated signal output from the PWM circuit is tied to an RC circuit resulting in a DC voltage that is proportional to the pulse width. This DC voltage is input to an ADC channel and is read after each time the pulse width out of the PWM is changed. The PWM setting and the ADC value read is displayed on the LCD. This simple demonstration project will illustrate the powerful software development tools based upon Raisonance RIDE software, and the RLINK-ST adapter, which provides many features for editing, compiling, programming, and debugging a upsd3300 MCU Series from STMicroelectronics. This demo will quickly illustrate the specific features below to give you a feel for their simplicity and capability: Project Compilation and Flash Programming Single-Step Execution and Source-Level Debugging Device Specific Formatted Displays Breakpoints Symbolic Debugging and Variables Watch Code Iteration Instruction Tracing approaching Real-Time performance The exercise takes a few minutes to complete and demonstrates the major steps for creating and debugging a upsd3300 project. Software Installation and Connections: 1. Software Installation Insert the Raisonance disc supplied with DK3300 Development Kit in your CD drive. The auto run will bring up the program installation menu. First Install PSDsoft Express, take all default choices. Next install RIDE, take all default choices. Remove the Raisonance Disc and then insert the DK3300- ELCD Disc from STMicroelectronics in the CD drive. Navigate the screens and bring up Menu page with Copy Device Drivers and Demo Code. Click on it and then Unzip the file pointing to C:\ root directory in your drive. 2. Physical Connections Connect RLINK-ST to your PC/Laptop using the supplied USB cable and let the USB driver install on Windows. Connect RLINK-ST ribbon cable to the JTAG connector on the DK3300-ELCD circuit board. Make sure that the Board is powered up using the Universal Adapter supplied with the kit and ensure that it is functioning. (See that the LCD display shows the text). Make sure that the Jumpers are set correctly. (Refer to appendix-1 at the end for Jumper settings). Demo and Features Evaluation: Launch RIDE from the Windows programs menu (Raisonance Kit 6.1) or from RIDE icon. Next you ll see a blank work area with the RIDE title menu bar as shown here: Open the demo project. In title menu bar click Project, then Open. Next double-click the project named pwm_adc.prj, from the folder: \RIDE\examples\8051\derivatives\st_upsd\upsd3300\dk33 00-elcd\PWM_ADC\pwm_adc.prj The RIDE environment will display with multiple windows and icons. Refer to Figure - 8 for help as you follow along. The left window will show the project files. Click on the + to expand the project component files and then doubleclick on pwm_adc.c to open file (Refer to Figure -2). 3. Compile Project and Program Flash Memory Click Make All. This compiles and builds the project. Start the Debugger by clicking Start. This programs the Flash and refreshes the RIDE environment showing actions in the Debug / Action/Messages Window (See Figure-8 ). The blue line indicates where MCU execution has stopped at the first line of executable code in the main program, now waiting for your debugging command. The RLINK-ST kit, and the DK3300-ELCD Development Board or your own designed circuit board with a upsd3300 MCU is all that is needed to develop code. RIDE s debugger utility can be used to symbolically debug 8051 code generated from most any 8051 compiler. So you have a choice keep your existing 8051 compiler and debug with the RIDE debugger (no code size limit), or upgrade the evaluation version of the RIDE compiler on the CD so you can compile with no limit and debug code all within the RIDE environment. See RIDE CD insert, or http://www.raisonance.com for more information on RIDE and upgrades. 1 4. Single-Step and Source-Level Debugging Click Go to see that program runs full speed with the DK3300-ELCD Display showing the following lines of text: PWM to ADC DEMO PWM = xx ADC = yyy where xx and yyy are changing with each execution of the program loop. Click Reset and the program returns to first line of the main program. Click Step-Over to execute one line of C code. You can scroll down to see more lines of code in the program.

When the blue line is on timer0_init(), click Step-In. The debugger is now in the called function, timer0_init(). Double click Disassembly Code in the left debugger window. This opens a display named, code (pwm_adc) showing both C and Assembly code source instructions. Click Step-Over a few times to see that code execution can be stepped one assembly instruction at a time. Click Reset to return to main program, pwm_adc.c 5. Device Specific Formatted Displays Double-click Main Registers in the left debugger window to show the contents of the MCU core registers (Refer to Figure -3). Double-click Port 1 in the left debugger window to show the current value of the pins in I/O port 1. Go back to the file, pwm_adc.c by clicking on tab at bottom of the main display window (Refer to Figure -8), and expand the window view back to full screen. 6. Breakpoints Four hardware breakpoints are available on upsd3300. Set one breakpoint by clicking on the green dot on the left of the line of code ( printflcd(msg_buff); ). The green dot will turn into and the line highlights in red at the line of code as shown in Figure -8 Click Go, the program will run until hitting breakpoint. Click Go repeatedly. See that the PWM and ADC values displayed on the LCD change after each cycle. You will see increasing values for PWM and decreasing values for ADC each time one loop of code is executed within the while(1) loop construct. 7. Symbolic Debugging and Variables Watch With the mouse, highlight the entire variable name ADC_result, then right-click on it, then select Add Watch to add this variable to the Watch Window which appears at bottom left of the screen (Refer to Figure-8 and Figure-4). Select K the same way and add to the watch window. These variables show the current PWM and ADC values. Set the same Breakpoint as in step-6 above. Click Reset. Click Go and see that the values change in the watch window (Refer to Figure-4). and the LCD Display. Repeat this a couple of times. You will see that for each loop the PWM value changes by 10. Click Reset. 8. Code Iteration Make this code change in Flash memory. Close the Debugger by clicking on (this is same icon that starts the Debugger). Now you are in the editor. Go to the file pwm_adc.c by clicking on its file tab and change the following C code statement from printflcd("pwm to ADC DEMO"); to printflcd("pwm - ADC DEMO"); Click Make All to recompile and rebuild the program. Start the Debugger by clicking Start to re-program this new code into the Flash memory. Click Go and see that the LCD display now shows PWM - ADC DEMO 2 Go back to the editor. Go to the file pwm_adc.c and change the text back to the original: printflcd("pwm to ADC DEMO Click Make All to recompile and rebuild the program. Start the Debugger by clicking Start to re-program this new code into the Flash memory. Click Go and see that the LCD display now shows the original text PWM to ADC DEMO Click Reset. 9. Instruction Tracing, near Real-Time Performance The upsd will rapidly stream a record of all the MCU instruction steps out to the RLINK-ST adaptor. From this data, RIDE will create a formatted file to help you find even the most stubborn bugs, showing a history as deep as 256,000 instruction steps that the MCU has last executed! To enable Trace, select from the title bar Debug then Trace, and select trace Options as shown in Figure -5. Open the Trace Display. Select from the title bar Debug, then Trace, then View. A blank Trace Display will appear. (Refer Figure-6) A Trace Display file can display program source code in both C and Assembly formats. Tracing runs in the background with little impact to real-time performance in this project. Go back to the file pwm_adc.c by clicking on its file tab. Set one breakpoint at the line of code ( printflcd(msg_buff); ) as shown in Figure -8 by clicking on the green dot on the left of the line of code. The green dot will turn into and the line highlights in red. Click Go, and the MCU will run until hitting the breakpoint, then a window will open showing the Assembly source code, as shown in Figure -9. Note that the red line indicates where the breakpoint is set (MCU Program Counter value 01BA), and the blue line indicates the next instruction to execute. Now open the Trace Display window by clicking on the file tab Trace (pwm_adc) as shown in Figure -10. At the bottom of the Trace Display is the last instruction that was executed (MCU Program Counter at 01BA). Above this line is the history of all the instructions that the MCU has executed before hitting the breakpoint. Examining the Trace Display window further, you ll see the source C and Assembly statements at each step to assist you in finding a bug. Go back to the file pwm_adc.c and remove the breakpoint by clicking on the at the left of the code line highlighted in red. Click Go and notice that the LCD display shows continuous changes in the PWM and ADC values as the loop is executed multiple times while tracing is occurring in the background. After about 10 seconds click. Stop. See the messages in the window that records the actions ( Figure -7 ). This window shows the number of nonsequential instructions traced. Open the Trace Display window again, Trace(pwm_adc). At the bottom-left you ll see that over 50,000 MCU instruction steps have been recorded!

V 1.0 Dec. 2004 Conclusion: The example code and the steps clearly demonstrate the powerful firmware development and debugging capabilities of the RIDE environment with RLINK-ST for the upsd DK3300- ELCD Development Board. (Refer to Figure -1): Schematic for the DK3300-ELCD circuit board: http://psmdev.st.com/dk3300-elcd _schematics.pdf Please see our web site for the latest information on upsd products, tools, application notes, and other documentation: http://www.st.com/psm For more information, please see: µpsd33xx Series MCU Datasheet: http://www.st.com/stonline/books/pdf/docs/9685.pdf Application Note AN48-uPSD on the supplied RIDE CD. Get the latest Design Guides on-line at : http://www.st.com/stonline/products/families/memories/p sm/soft_c2.htm Appendix 1 DK3300-ELCD Jumper Descriptions and Default Settings The following Table describes the DK3300-ELCD Jumpers. For the PWM_ADC demo to run properly, verify that JP14 ADC7 is closed, JP3 is set to Fix, and jumper sets JP4, JP5 and JP6 are all closed. See the Schematics for more information regarding the jumpers. Jumper # Description Default settings Comments/ JP1 JTAG Debug I/O Pin Closed Should be closed JP2 Reset Input Select closed in position 1-2 for reset switch. Position 2-3 for RTC reset. JP3 LCD Contrast 2-3 closed (Fix) Normally closed in position 2-3 Position 1-2 used for PWM control JP4 Enhanced LCD Closed Determines if the Enhanced -LCD is on Board JP5 Encoder Connection Normally all 3 closed to enable Encoder This connects the Encoder to Port B. JP6 Keyboard & LED Closed JP7 Enable SPI Closed Normally closed to enable SPI EEPROM JP8 IrDA / Uart1 Select Normally 1-3 and 2-4 Closed to select the RS232 connector 1 Else can be set to position 3-5 and 4-6 to select the IrDA transceiver to be connected to UART1. JP9 SRAM Battery Normally Open JP10 Enable I2C Closed Normally both positions closed to enable I2C access to RTC chip. JP11 Clock Select Closed X2 for Crystal Selects Crystal or Oscillator JP12 Interrupt Select for MCU Normally open. (See DK3300-ELCD schematics) JP14 ADC Channel Select ADC7 ( Positions 15-16) is Closed (Used to map various RTC Interrupt sources to the MCU) 1-IRQ ; 2-PFO2; 3-SQW; 4-PFO1; 5-PBO Selects what ADC channel connects the RC circuit on the board. JP15 PWM RC Constant Normally (position 1-2) is closed. Selects PWM RC constant. position 1-2 is 1ms. JP16 JP18 For connecting UART0 and UART1 in loop back mode Headers for M41ST87 Signals Normally open Can be connected positions 1-2 and 3-4 for loop back. Normally not used 3 Headers can be used to check the signals: 1- ECON 2-TPCLR 3-F32K 4-GND

Figure-1 upsd DK3300-ELCD Development Board Figure-4 Watch Window Figure-5 Trace Options FIGURE-2 PROJECT WINDOW Figure-6 Blank Trace Figure-3 MCU Registers Figure-7 Messages Window 4

Figure-8 RIDE Environment Interface Display Windows and Icons 5

Figure-9 Code View (Disassembly) Figure-10 Trace Display 6