Download Getting started with the ST7 low
Transcript
UM0250 User manual Getting started with the ST7 Low-speed USB/RS232 Evaluation Kit Introduction The Low-speed USB/RS232 Evaluation Kit (STEVAL-PCC02V1) has been created to provide a complete reference design for a serial port bridge as well as an evaluation board for ST72F63B/60 devices in QFN40 package. This application is used to interface between devices with a serial port (RS-232 type) and a host computer USB port. USB data transfers comply with HID-class protocols. The bridge is based on a USB low-speed microcontroller manufactured by STMicroelectronics which provides a maximum guaranteed USB transfer rate of 800 bytes per second. Flow control has therefore been implemented to ensure data transfer integrity when interfacing with the serial port at rates up to 38400 bits per second (bps). The bridge application is evaluated on a PC by running a dedicated applet that controls and monitors data transfers on both the USB and serial COM ports. The included hardware provides In-Circuit Programming (ICP) capabilities for the microcontroller and almost all the MCU's I/Os are available on expansion connectors to evaluate different applications. The RS-232 part can be separated by removing the appropriate soldering joints (shunts). This can be used to modify certain firmware or hardware parameters for evaluation or customization purposes. 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 http://www.st.com/mcu or contact your local sales office. July 2006 Rev 1 1/12 www.st.com Contents UM0250 Contents 1 2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Package contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4.1 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4.2 Data transfer via PC serial port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4.3 In-Circuit Communication (ICC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Running the Low-speed USB/RS232 Evaluation Kit . . . . . . . . . . . . . . . 6 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Low-speed USB/RS232 evaluation program . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 2.2.1 Device Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.2 Data Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Adding extra circuitry on expansion connectors . . . . . . . . . . . . . . . . . . . . . 9 3 Low-speed USB/RS232 Evaluation Board diagram . . . . . . . . . . . . . . . 10 4 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2/12 UM0250 Getting started 1 Getting started 1.1 System requirements In order to use the Low-speed USB/RS232 Evaluation Kit with the Windows operating system, a recent version of Windows, such as Windows 98, Windows Millennium or Windows 2000 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. Important: When running the HID evaluation board applet provided in the package, verify that the correct version of the HID.dll file is installed: 1.2 ● 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 Low-speed USB/RS232 Evaluation Kit includes the following items: Hardware content ● One evaluation board with ICC, USB and Serial connectors. ● One soldered ST72F60K2U1 low-speed USB microcontroller device (QFN40 package). This is a FLASH device allowing up to 100 reprogramming cycles. The ST72F60K2U1 is delivered already programmed with the evaluation firmware. Software contents (Contact the Sales Office or www.st.com for the most recent version) ● PC executable software for evaluating the USB/Serial Port Bridge. The source file, written in Delphi, is provided as an application example using the HID driver. ● ST7 firmware (C source code) for the ST72F60/63B Documentation (Contact the Sales Office or www.st.com for the most recent version) 1.3 ● ST7260 and ST7263B datasheets ● PCB production data ● ST7263B/ST7260 flyer ● This Getting Started Manual Software installation Install the Bridgels.exe file on your computer. 3/12 Getting started 1.4 UM0250 Hardware installation Figure 1 shows the location of the main components of the evaluation board. The schematic drawing is given in Figure 6: Low-speed USB/RS232 Evaluation Board schematics on page 10. Figure 1. Evaluation Board Layout ST3222E (on reverse side) USB Connector & Supply RS-232 Connector ICC Connector ST72F60Kx or ST72F63BDx USB to Serial Port Transfer Active LED (Yellow) Serial Port to USB Transfer Active LED (Green) 1.4.1 Power supply The Low-speed USB/RS232 Evaluation Board is directly supplied by the USB Connector (bus-powered) and therefore does not require an external voltage supply. 1.4.2 Data transfer via PC serial port When connected to a PC serial port for data transfer purposes, a DTE (Data Terminal Equipment) to DTE configuration is required. As a result, a cross-wired RS-232 cable must be used as shown in Figure 2. The Low-speed USB/RS232 Evaluation Board is equipped with two LEDs that display the data transfer status: 4/12 ● Yellow/Orange LED: USB to Serial Bus transfer is active, ● Green LED: Serial Bus to USB transfer is active. UM0250 Getting started 1.4.3 Cross-wired serial cable connection diagram 6 1 5 2 4 3 3 4 2 5 1 9 8 7 8 9 7 6 DB9 female DB9 female Figure 2. In-Circuit Communication (ICC) The 10-pin connector must be connected to a programming tool in order to program or erase the microcontroller Flash memory. For further information, please refer to both the ICC Protocol Reference Manual and the ST7 Flash Programming Reference Manual, available online from http://www.st.com/mcu Note: The USB cable must be plugged in to supply the board with voltage. 5/12 Running the Low-speed USB/RS232 Evaluation Kit UM0250 2 Running the Low-speed USB/RS232 Evaluation Kit 2.1 Introduction The Low-speed USB/RS232 Evaluation Kit consists of two main parts: ● the physical board, ● the Low-speed USB/RS232 Evaluation software running on your PC. First, connect the evaluation board to the PC via the USB cable. As a result, the evaluation board is enumerated as a USB HID device as shown Figure 3, and is ready to use. You may be required to insert your Windows CD-ROM. Figure 3. Enumeration Result When you start the Low-speed USB/RS232 Evaluation program on the PC, a graphical interface is displayed for controlling and monitoring the data transfers on the USB and serial ports of the PC. This PC software is also used to evaluate the enumeration process and to set the communication parameters. 6/12 UM0250 Running the Low-speed USB/RS232 Evaluation Kit 2.2 Low-speed USB/RS232 evaluation program 2.2.1 Device Selection USB Enumeration The Device Selection window, shown in Figure 4, displays the following information: ● Available USB HID devices All applicable devices connected to the PC are displayed in this window. The ST7 RS232 USB Bridge is displayed if the enumeration has been successfully completed. ● Device information This information, obtained during the enumeration phase, refers to the highlighted device in the “Available Devices” window: Vendor ID, Product ID and Version numbers. (Refer to the USB Specification version 1.1 or higher). Additionally, as string information is supported, the Manufacturer name, Product and Serial Number are displayed. COM port settings This function selects the COM port used by the Low-speed USB/RS232 Evaluation program to emulate a serial port communication. The selection None is not fully implemented in version 1.0.0 of the evaluation software. Common settings This function is used to select the baudrate of the bridge in the bridge firmware. If the applet is used to emulate the serial port, it also configures the COM port of the PC. Otherwise, the serial port baudrate must be defined as the same value in the other applet or device. The maximum applicable baudrate for this board is 38400 bit/s. Figure 4. Device Selection Window 38400 7/12 Running the Low-speed USB/RS232 Evaluation Kit 2.2.2 UM0250 Data Transfers Serial Port The two following items do not apply if None has been selected in the “COM Port Setting” box of the Device Selection window. ● PC Flow Control defines the flow control method used by the COM port when the applet controls the COM port of the PC. ● Automatic received (USB) to sent (Serial) comparison verifies that the data received by the USB port is equal to the data sent by the COM port of the PC. ● Loop: Send Serial, Receive USB is used to perform serial to USB transfers in Loop mode. Unchecking this box during the data transfer aborts the transfer. If the serial port is handled by another applet or PC, the Automatic received... box must not be checked and the Loop box must be checked, depending on the required configuration. USB Port These items are validated only if the bridge is connected to the USB port. ● Hardware Flow Control done by bridge is used to enable/disable the RTS/CTS flow control performed by the bridge on the serial port. ● Automatic received (Serial) to sent (USB) comparison verifies that the data received by the serial port is equal to the data sent by the USB port. ● Loop: Send USB, Receive Serial is used to is used to perform USB to serial transfers in Loop mode. Unchecking this box during the data transfer aborts the transfer. Figure 5. 8/12 Data Transfer Window UM0250 2.3 Running the Low-speed USB/RS232 Evaluation Kit Adding extra circuitry on expansion connectors The evaluation board features two 16-hole connectors (P1 & P2) with all the microcontroller I/O pins and which together with ICC connector (P3) are giving access to almost all MCU pins. These connection points can be used for signal probing or adding extra circuitry needed to evaluate different applications. The figures in the next section give the definition of these points for each connector. 9/12 D C B VBUS DD+ GND USB CON J1 100nF VDD VDD 18pF C4 C3 1 2 3 4 18pF C1 2 A 1 4 10/12 3 1 8 9 7 6 15 16 19 100nF C10 PD0/AIN8 PD1/AIN9 PD2/AIN10 PD3/AIN11 PD4 PD5 PD6 PD7 PC0/RDI PC1/TDO PC2/USBOE PB0 (10mA)/AIN0 PB1 (10mA)/AIN1 PB2 (10mA)/AIN2 PB3 (10mA)/AIN3 PB4 (10mA)/IT5/AIN4 PB5 (10mA)/IT6/AIN5 PB6 (10mA)/IT7/AIN6 PB7 (10mA)/IT8/AIN7 PA0/MCO PA1 (25mA)/SDA/ICCDATA PA2 (25mA)/SCL/ICCCLK PA3/EXTCLK PA4/ICAP1/IT1 PA5/ICAP2/IT2 PA6/COMP1/IT3 PA7/COMP2/IT4 VDD 2 4 6 8 10 ICC FEATURE 1 3 5 7 9 P3 10K PA1/ICCDATA PA2/ICCCLK RESET R6 VPP ST72F63B_QFN40 ST72F60_QFN40 (Port D not available) VSSA VSS USBDM USBDP USBVCC VDD VDDA NC NC Vpp/TEST RESET OSCOUT OSCIN U1 OSCIN 2 10 4 3 USBVCC 5 C8 10nF VPP RESET 14 USBDM USBDP + C2 10uF/6.3V 1k5 R2 470 R3 XT1 24MHz_NX2520SA OSCIN PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 PA0 PA1/ICCDATA PA2/ICCCLK PA3 PA4 PA5 PA6 PA7 2 32 33 34 35 36 37 38 39 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 13 PC0 12 PC1 11 PC2 25 24 23 22 21 20 18 17 1 40 31 30 29 28 27 26 2 VDD P1 PC2 PC0 PD0 PB6 PB4 PB2 PB0 R4 220 2 4 6 8 10 12 14 16 2 4 6 8 10 12 14 16 LED1 YELLOW LED VDD Header 8X2 1 3 5 7 9 11 13 15 P2 Header 8X2 1 PD7 3 PD5 5 PD3 7 PA1/ICCDATA 9 PA3 11 PA5 13 PA7 15 R5 220 3 LED2 GREEN LED USBVCC PC1 PD1 PB7 PB5 PB3 PB1 VDD PD6 PD4 PD2 PA0 PA2/ICCCLK PA4 PA6 3 10 11 1 6 2 7 3 8 4 9 5 SHDN NC V- VCC V+ U3 SHDN CTS RxD RTS TxD C1+ C1C2+ C2- SH6 SH5 SH4 SH3 SH2 Document Number 15.05.2006 Date: Sheet PB0 PB4 PC0 PB1 PC1 NC GND SH1 ST3222E C11 100nF 20 14 7 9 16 8 17 19 3 USB-UART Bridge Eval Board SHDN 100nF Size Title D Connector 9 J2 100nF C7 C5 VDD 4 1 11 18 1 10 CTS 15 RxD 12 RTS 13 TxD 2 4 5 6 4 of 1 C9 100nF C6 100nF Rev 1.0 D C B A Figure 6. PA0 3 PC2 1 Low-speed USB/RS232 Evaluation Board diagram UM0250 Low-speed USB/RS232 Evaluation Board diagram Low-speed USB/RS232 Evaluation Board schematics UM0250 4 Revision history Revision history Table 1. Document revision history Date Revision 03-Jul-2006 1 Changes Initial release. 11/12 UM0250 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 AUTHORIZE REPRESENTATIVE OF ST, ST PRODUCTS ARE NOT DESIGNED, 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. 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. © 2006 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 12/12