STMicroelectronics ST7MDTULS-EVAL ST7 USB low-speed evaluation board UM0068 User manual Rev 2 October 2007 BLANK UM0068 User manual ST7MDTULS-EVAL ST7 USB low-speed evaluation board Introduction The objective of the ST7MDTULS-EVAL evaluation board is to provide a complete USB application package using a Windows-based host software application and one of ST’s range of USB low-speed microcontrollers acting as a peripheral device. The host software and the ST7 source code provide an easily-understood example of how to exchange data using the HID (human interface devices) class protocols. The firmware supplied on the ST7 devices is based on a USB core library that makes the control of all the USB interface hardware transparent to the application developer. This USB library, developed by STMicroelectronics and plug-tested by the USB IF (implementers forum), is intended for you to use as a toolbox. All the documentation you need to do this is supplied with the package. The ST7MDTULS-EVAL evaluation board incorporates basic input sources such as pushbuttons, an analog trimmer and output sources (LEDs). It also has a wire-wrap area so that you can easily develop your own application. An external 12 V charge pump is also provided, to allow you to program the ST7 embedded Flash program memory using inapplication programming (IAP). The following development tools can be ordered separately: assembler, linker, C compiler, source level debugger, hardware emulator, programming boards and gang programmer. For ordering information, see our website at www.st.com or contact your local sales office. October 2007 Rev 2 1/15 www.st.com Contents UM0068 Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 2 3 2/15 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Package contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.1 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.2 Jumper settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4.3 Device selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Running the USB low speed evaluation board . . . . . . . . . . . . . . . . . . . . 8 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 HID demonstrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.1 USB enumeration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.2 Communication with the evaluation board . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Remote wake-up function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Adding circuitry on the wire-wrap area . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 Enabling board for ICC communication . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 UM0068 List of tables List of tables Table 1. Table 2. Description of evaluation board probing points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3/15 List of figures UM0068 List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. 4/15 Evaluation board layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Device selection for analog-to-digital conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Enumeration result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 HID demonstrator window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 HID demonstrator window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Board schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Recommended board modifications for ICC communication . . . . . . . . . . . . . . . . . . . . . . . 13 UM0068 Getting started 1 Getting started 1.1 System requirements In order to use the ST7MDTULS-EVAL with the Windows operating system, a recent version of Windows, such as Windows 98, Windows Millennium, Windows 2000, or Windows XP must be installed on the PC. The version of the Windows OS installed on your PC may be determined by clicking on the “System” icon in the Control Panel. Caution: 1.2 When running the HID evaluation board applet provided in the package, verify that the correct version of the HID.dll file is installed: ● Windows 98: HID.dll - Version 4.10.1998 ● Windows 98 SE: HID.dll - Version 4.10.2222 ● Windows Millennium: HID.dll - Version 4.90.300.1 ● Windows 2000: HID.dll - Version 5.00.2134.1 ● Windows XP: HID.dll - Version 5.1.2600.0 Package contents The USB evaluation low-speed board package includes the following items: ● Hardware content – Two ST72 Low-speed USB microcontroller devices: ST7262xxx devices in SDIP42 package ST7263Bxx devices in SDIP32 package Both devices are FLASH devices allowing up to 100 reprogramming cycles. They are delivered already programmed with the demonstration firmware. – ● ● 1.3 One evaluation board Software content – PC executable software for demonstrating HID transfers. – ST7 firmware (C source code) for the ST7262xxx devices – ST7 firmware (C source code) for the ST7263Bxx devices Documentation – USB library 4 x Interface documentation. – ST7262 and ST7263Bxx datasheets – Application note AN1325 Software installation Run USBDemonstrator.exe to install the PC HID demonstrator, and follow the on-screen prompts to complete the installation. 5/15 Getting started 1.4 UM0068 Hardware installation Figure 1 shows the location of the main components of the evaluation board. The schematic drawing is given in Figure 6. Figure 1. Evaluation board layout Jumper W1 Jumper W6 Jumper W7 Trimmer SW4=Reset SDIP32 socket USB connector & supply 1.4.1 SDIP42 socket Power supply The evaluation board is directly supplied by the USB Connector (bus powered) and therefore does not require any external supply. In case the components added on the wirewrap area sink more than 500mA, an external power supply must be used. 1.4.2 Jumper settings The W1 jumper selects the analog trimmer. When the jumper is removed, the analog trimmer is disconnected from Ground in order to stop power consumption and to meet the power specifications of USB suspend state. If analog-to-digital conversion is needed for application development, you can replace this jumper by a switch transistor controlled by an I/O pin. 6/15 UM0068 Getting started Figure 2. Device selection for analog-to-digital conversion W6 jumper ST7262xxx ST7263Bxx If you are using the analog trimmer, select the installed ST7 device using jumper W6 as shown in Figure 2. This ties the analog trimmer to the PA0 I/O port of the ST7262xxx devices and to the PB0 port of the ST7263Bxx devices. Any other analog input pin on the microcontroller can be used by removing the W6 jumper and wiring the center pin of W6 to the analog input. The W7 jumper can be used to connect or disconnect an external 12V charge pump in case you want to program the Flash. 1.4.3 Device selection Three devices can be used with this board: ● ST7263Bxx devices in SDIP32 package on the internal socket ● ST7262xxx devices in SDIP42 package on the external socket 7/15 Running the USB low speed evaluation board 2 Running the USB low speed evaluation board 2.1 Introduction UM0068 The USB low-speed evaluation board application consists of two main parts: a HID demonstrator running on a PC and the evaluation board itself. Communications between the PC and the ST7 board are done through different USB pipes: ● Control IN and OUT during enumeration with the bi-directional Endpoint 0. ● Interrupt IN from endpoint 1 for data transferred from the ST7 to the PC. ● Interrupt OUT to endpoint 2 for the data transferred from the PC to the ST7. Note that the Windows98 HID driver does not support interrupt OUT transfers, and automatically uses the control OUT pipe to endpoint 0 instead (Set-Output function). First connect the evaluation board to the PC with the USB cable. As a result, the evaluation board is enumerated as an HID device as shown in Figure 3, and is ready to use. Figure 3. Enumeration result When you start the HID demonstrator on the PC, a graphical interface is displayed (see Figure 3) for controlling the evaluation board. This PC software is used to demonstrate the enumeration process and data transfer between the PC and the ST7 peripheral according to the USB HID class specifications. 8/15 UM0068 Running the USB low speed evaluation board 2.2 HID demonstrator 2.2.1 USB enumeration The device selection tabsheet, shown in Figure 4, displays the following information: ● Available USB HID devices: All the HID devices connected to the PC are displayed in this window. ● Device information This information, obtained during the enumeration phase, refers to the highlighted device in the “Available USB HID device” window: vendor ID, product ID and version numbers (refer to the USB Specification version 1.1 or higher). In addition, as string information is supported, the manufacturer name, product and serial number are displayed. Figure 4. HID demonstrator window HID attached device 2.2.2 Device information Communication with the evaluation board Controlling the evaluation board from a host PC The HID demonstration tabsheet, shown in Figure 5, displays the following information: ● Click on the ON/OFF button in the application dialog box to switch on the LED LD2 on the board. ● Click again to switch it OFF. ● The slider bar controls the brightness of a LED LD3 (ST7262xxx) or LD1 (ST7263Bxx). Each slider bar value will be converted to a pulse width modulation (PWM) signal by the microcontroller. Displaying the evaluation board state ● Button state: this red LED changes its state when you press the SW1 push button on the evaluation board. ● Trimmer value: this value is the result of the analog-to-digital conversion of the RV1 trimmer output. When you turn the trimmer on the evaluation board to a different position, the new ADC value is transmitted via the USB bus and displayed on the progress bar of the HID demonstrator. 9/15 Running the USB low speed evaluation board Figure 5. UM0068 HID demonstrator window “LED Control” Button Red LED Progress Bar Slider Bar (LED brightness) 2.3 Remote wake-up function The remote wake-up function is also supported by the evaluation board. By pressing SW3 (ST7262xxx) or SW2 (ST7263Bxx) you can wake up the PC from standby mode. Under Windows XP, the remote wake-up capability should be enabled. For that you should go to the “Device Manager” then “Human Interface Device” and “HID-compliant device”. On the tabsheet “Power Management”, select “Allow this device to bring the computer out of standby”. 2.4 Adding circuitry on the wire-wrap area The evaluation board features a 43-hole row with all the microcontroller pins plus one side of the analog trimmer. These connection points can be used for signal probing or rewiring to the wire-wrap area. Table 1 gives the definition of these points for each MCU used. Table 1. 10/15 Description of evaluation board probing points Probing point ST7262xxx 1 PD6 2 PD5 3 PD4 4 PD3 5 PD2 6 VPP 7 PD1 8 PD0 9 PC7 10 PC6 11 PC5 ST7263Bxx VPP UM0068 Running the USB low speed evaluation board Table 1. Description of evaluation board probing points (continued) Probing point ST7262xxx ST7263Bxx 12 PC4 13 PC3 14 PC2 PC2 15 OSCIN OSCIN 16 OSCOUT OSCOUT 17 VSS VSS 18 VDD VDD 19 PC1 PC1 20 PC0 PC0 21 PB7 PB7 22 PB6 PB6 23 PB5 PB5 24 PB4 PB4 25 PB3 PB3 26 PB2 PB2 27 PB1 PB1 28 PB0 PB0 29 PA7 PA7 30 PA6 PA6 31 PA5 PA5 32 PA4 PA4 33 PA3 PA3 34 PA2 PA2 35 PA1 PA1 36 PA0 PA0 37 RESET RESET 38 VSSA 39 USBDM USBDM 40 USBDP USBDP 41 USBVCC USBVCC 42 VDDA VDDA 43 An.Trim. An.Trim. 11/15 ST7262 PD5 PD6 PD4 PD3 PD2 VPP PD0 PD1 PD4 PD5 PD6 2 1 3 PD3 12 11 10 OSCI N PC2 PC3 PC4 PC5 PC6 VPP 13 OSCOU T PC7 PD0 PD1 PD2 4 5 6 07 08 14 VSS 09 15 OSCIN OSCOUT 16 VSS 17 VDD 18 VDD PC1 19 PC1 PC0 20 PC0 PB7 21 PB7 PB6 22 PB6 PB5 23 PB5 PB4 24 PB4 PB3 25 PB3 PB2 26 PB2 PB1 27 PB1 PB0 28 PB0 PA7 29 PA7 PA6 30 PA6 PA5 31 PA5 PA4 32 PA4 PA3 33 PA3 PA2 34 PA2 PA1 35 PA1 PA0 36 PA0 RESET 37 RESET VSSA 38 VSSA USBDM 39 USBDP 40 USBVCC 41 USBVCC VDDA 42 VDDA 43 W1B1 35 RESET PA0 PA1 R4 1K5 2 50V 4. 7UF USB 33PF C4 C2 10NF 33PF J1 12MHz 4 3 2 1 RESET SW4 470 LD4 LED red W5 R3 47K SW3 SW3 470 LD3 LED red W4 VCC_ARROW W1 RV1 10K R2 47K SW2 SW2 R6 470 LD2 LED red W3 47K R1 SW1 SW1 470 LD1 LED red W2 VCC_ARROW C5 220NF C8 220NF C1C1+ C2C2+ C9 100NF + C6 4. 7UF 50V 2 2 VSS VCC_ARROW 15 R7 PC2 OSCIN R8 14 C3 PC3 PC2 XT1 13 2 PC7 PC5 PC6 PC4 PC3 16 PC4 PC3 1 PC2 17 12 1 OSCI N PC5 PC4 1 OSCOUT 11 VCC_ARROW VDD PC1 18 PC6 PC5 1 VSS VDD PC0 PB7 10 W6 PC7 PC6 CW 19 20 21 PB5 09 USBDM USBDP 2 + 1 4. 7UF 50V W7 BC557B T1 VCC_ARROW PD0 PC7 R6 2K2 08 U3 PD1 PD0 C7 07 8 7 6 5 VPP PD1 ST662A 2. 5V SHDN GND VOUT VCC 6 1 2 3 4 PD2 VPP 1 5 R5 PD2 2 4 2 PC1 PB7 PB4 36 VSSA OSCOUT PD3 2 PD5 3 2 PD6 2 1 PC0 23 PB3 PB6 24 PB1 PB2 22 25 PB0 26 PA7 27 28 37 USBDM PA2 PA3 PA4 PA5 PA6 29 30 31 32 33 38 34 39 USBVCC USBDP C1 PD3 1 PD4 1 2 3 PB6 PB5 PB4 PB3 PB2 PB1 PB0 PA7 PA6 PA5 PA4 PA3 PA2 40 VDDA 41 42 1 PD4 PD6 PD5 1 PA1 PA0 USBDM VSSA RESET USBDP USBVCC VDDA VCC_ARROW VDDA USBDP 32 29 USBVCC 31 PA5 PA4 PA3 PA2 PA1 PA0 RESET 17 18 19 20 21 22 23 26 27 8 30 PA6 16 USBDM PA7 15 28 PB0 VSSA PB1 14 PB2 PB3 13 PC0 PB7 PB6 1 6 7 9 10 12 PB4 PC1 4 PB5 VSS VDD PC2 OSCI N 11 5 3 OSCOU T 2 VPP VDDA ST7263 USBVCC USBDP VSSA USBDM RESET PA1 PA0 PA2 PA4 PA3 PA5 PA6 PA7 PB0 PB1 PB2 PB4 PB3 PB7 PB6 PB5 PC0 PC1 VDD VSS OSCOUT PC2 OSCI N VPP U2 12/15 U1 ST7262 + Board schematics Figure 6. UM0068 Running the USB low speed evaluation board UM0068 2.5 Running the USB low speed evaluation board Enabling board for ICC communication To enable ICC communication on this board, the connection between the VPP pin of the MCU and the charge pump capacitors (C6 and C7) needs to be cut to allow the programming tool to generate pulses on the VPP line (mandatory for entry into ICC mode). To allow switching between either ICC and IAP functionality, the use of a jumper is recommended, soldered across the location of the cut. This allows 12 V to reach the VPP pin in IAP mode. See the figure below for the recommended cut and jumper locations. Figure 7. Recommended board modifications for ICC communication Cut line here Jumper between these points 13/15 Revision history 3 UM0068 Revision history Table 2. Document revision history Date Revision 28-Oct-2002 1.2 Initial Release 2.0 Added evaluation board root part number (ST7MDTULS-EVAL). Removed ST72F61 and SDIP42-DIP20 adaptor. Changed ST72F62 and ST72F63B root part numbers into ST7262xxx and ST7263Bxx, respectively. Removed reference to supplied C source code for PC executable software, Section 1.2 on page 5 Added Section 2.5: Enabling board for ICC communication. 11-Oct-2007 14/15 Changes UM0068 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. © 2007 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 15/15