User's Manual H8S, H8SX Family E10A-USB Emulator Additional Document for User's Manual Supplementary Information on Using the H8SX/1725F, H8SX/1725SF, and H8SX/1727SF H8SX Family / H8SX/1700 Series E10A-USB for H8SX/1725F HS1725KCU01HE All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by Renesas Electronics Corporation without notice. Please review the latest information published by Renesas Electronics Corporation through various means, including the Renesas Electronics Corporation website (http://www.renesas.com). www.renesas.com Rev.3.00 Mar. 2013 Notice 1. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information. 2. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein. 3. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others. 4. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics product. 5. Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The recommended applications for each Renesas Electronics product depends on the product's quality grade, as indicated below. "Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc. "High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anticrime systems; and safety equipment etc. Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (nuclear reactor control systems, military equipment etc.). You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any application for which it is not intended. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas Electronics. 6. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges. 7. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or systems manufactured by you. 8. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations. 9. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by the military, including but not limited to the development of weapons of mass destruction. When exporting the Renesas Electronics products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations. 10. It is the responsibility of the buyer or distributor of Renesas Electronics products, who distributes, disposes of, or otherwise places the product with a third party, to notify such third party in advance of the contents and conditions set forth in this document, Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products. 11. This document may not be reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics. 12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries. (Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majorityowned subsidiaries. (Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics. (2012.4) Regulatory Compliance Notices European Union regulatory notices This product complies with the following EU Directives. (These directives are only valid in the European Union.) CE Certifications: * Electromagnetic Compatibility (EMC) Directive 2004/108/EC EN 55022 Class A WARNING: This is a Class A product. In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures. EN 55024 * Information for traceability * Authorised representative Name: Renesas Electronics Corporation Address: 1753, Shimonumabe, Nakahara-ku, Kawasaki, Kanagawa, 211-8668, Japan * Manufacturer Name: Renesas Solutions Corp. Address: Nippon Bldg., 2-6-2, Ote-machi, Chiyoda-ku, Tokyo 100-0004, Japan * Person responsible for placing on the market Name: Renesas Electronics Europe Limited Address: Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K. Environmental Compliance and Certifications: * Waste Electrical and Electronic Equipment (WEEE) Directive 2002/96/EC WEEE Marking Notice (European Union Only) Renesas development tools and products are directly covered by the European Union's Waste Electrical and Electronic Equipment, (WEEE), Directive 2002/96/EC. As a result, this equipment, including all accessories, must not be disposed of as household waste but through your locally recognized recycling or disposal schemes. As part of our commitment to environmental responsibility Renesas also offers to take back the equipment and has implemented a Tools Product Recycling Program for customers in Europe. This allows you to return equipment to Renesas for disposal through our approved Producer Compliance Scheme. To register for the program, click here "http://www.renesas.com/weee". United States Regulatory notices on Electromagnetic compatibility FCC Certifications (United States Only): This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful interference in which case the user will be required to correct the interference at his own expense. CAUTION: Changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate the equipment. Table of Contents Section 1 1.1 1.2 1.3 1.4 Section 2 2.1 2.2 Connecting the Emulator with the User System ............................................................... 1 Components of the E10A-USB Emulator ................................................................................................................. 1 Connecting the E10A-USB Emulator with the User System .................................................................................... 3 Pin Assignments of the E10A-USB Connector......................................................................................................... 5 Example of Emulator Connection............................................................................................................................. 6 Specification of the Emulator's Software ......................................................................... 9 Differences between the H8SX/1725F, H8SX/1725SF, H8SX/1727SF, and the Emulator...................................... 9 The H8SX/1725F, H8SX/1725SF, or H8SX/1727SF E10A-USB Emulator Specific Functions and Notes .......... 13 2.2.1 Emulator Driver Selection............................................................................................................................ 13 2.2.2 Hardware Break Functions ........................................................................................................................... 14 2.2.3 Notes on Setting the [Breakpoint] Dialog Box............................................................................................. 16 2.2.4 Sequential Break Function ........................................................................................................................... 17 2.2.5 Note on Using the JTAG Clock (TCK) ........................................................................................................ 17 2.2.6 Trace Function.............................................................................................................................................. 17 2.2.7 Parallel Transfer ........................................................................................................................................... 18 2.2.8 Debugging in the External Flash Memory ................................................................................................... 20 2.2.9 Interface with Initialization, Write, and Erase Modules and Emulator Firmware ........................................ 24 2.2.10 Performance Analysis................................................................................................................................... 26 H8S, H8SX Family E10A-USB Emulator Section 1 Connecting the Emulator with the User System Section 1 Connecting the Emulator with the User System 1.1 Components of the E10A-USB Emulator The H8SX/1725F E10A-USB emulator supports the H8SX/1725F, H8SX/1725SF, and H8SX/1727SF (hereafter referred to as the MCU unless the description is specific to any of them). Table 1.1 lists the components of the E10A-USB emulator. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 1 of 30 H8S, H8SX Family E10A-USB Emulator Section 1 Connecting the Emulator with the User System Table 1.1 Components of the Emulator Classification Component Hardware Emulator box Appearance Quantity 1 Remarks HS0005KCU01H: Depth: 65.0 mm, Width: 97.0 mm, Height: 20.0 mm, Mass: 72.9 g or *1 HS0005KCU02H : Depth: 65.0 mm, Width: 97.0 mm, Height: 20.0 mm, Mass: 73.7 g Software User system interface cable 1 14-pin type: Length: 20 cm, Mass: 33.1 g USB cable 1 Length: 150 cm, Mass: 50.6 g E10A-USB emulator setup program, 1 HS0005KCU01SR, H8S, H8SX Family E10A-USB Emulator User's Manual, HS0005KCU01HJ-H8S, HS0005KCU01HE-H8S, Supplementary Information on Using the H8SX/1725F, H8SX/1725SF, and *2 H8SX/1727SF , and HS1725KCU01HJ, HS1725KCU01HE, Test program manual for HS0005KCU01H and HS0005KCU02H HS0005TM01HJ, and HS0005TM01HE (provided on a CD-R) Notes: 1. When HS0005KCU02H is purchased, the 36-pin type cable is provided; however, it is not available for this MCU. 2. Additional document for the MCUs supported by the emulator is included. Check the target MCU and refer to its additional document. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 2 of 30 H8S, H8SX Family E10A-USB Emulator 1.2 Section 1 Connecting the Emulator with the User System Connecting the E10A-USB Emulator with the User System Before connecting an E10A-USB emulator (hereafter referred to as the emulator) with the user system, a connector must be installed in the user system so that a user system interface cable can be connected. When designing the user system, refer to the connector and recommended circuits shown in this manual. Before designing the user system, be sure to read the H8S, H8SX Family E10A-USB Emulator User's Manual and the hardware manual for related MCUs. Connect pins 8, 9, 10, 12, 13, and 14 of the user system connector to GND firmly on the PCB. These pins are used as electrical GND and to monitor the connection of the user system connector. Note the pin assignments of the user system connector. User system interface cable Tab GND line User system connector Pin 8 User system GND connection Pin 1 User system Figure 1.1 Connecting the User System Interface Cable to the User System Notes: 1. The pin number assignments of the 14-pin connector differ from those of the E8a emulator; however, the physical location is the same. 2. Do not place any components within 3 mm of the connector. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 3 of 30 H8S, H8SX Family E10A-USB Emulator Section 1 Connecting the Emulator with the User System WARNING Be sure to place the GND line of the user system interface cable on the GND of the user system with a screw, etc. Failure to do so will result in a FIRE HAZARD due to an overcurrent and will damage the user system, the emulator product, and the host computer. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 4 of 30 H8S, H8SX Family E10A-USB Emulator 1.3 Section 1 Connecting the Emulator with the User System Pin Assignments of the E10A-USB Connector Figure 1.2 shows the pin assignments of the user system connector. Pin No. Pin 1 mark User system connector Pin 14 Pin 7 Pin 8 Pin 1 MCU Pin Name Input/Output *1 1 P37/TCK Input 2 P34/TRST# Input 3 P63/TMS Output 4 RES(in)# *2 *5 Input 5 P35/TMS Input 6 P36/TDI Input 7 RES(out)# *2 Output 8 to 10 GND *3 12 to 14 11 Vcc *4 Top view Notes: 1. Input to or output from the user system. 2. The symbol (#) means that the signal is active-low. 3. By detecting GND on the user system, the emulator decides whether the user system is connected or not. 4. Connect Vcc with the Vcc of the MCU. 5. RES(in) is not the pin name of the MCU. It cannot be directly connected to the MCU pins. Pin 1 mark Figure 1.2 Pin Assignments of the User System Connector R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 5 of 30 H8S, H8SX Family E10A-USB Emulator 1.4 Section 1 Connecting the Emulator with the User System Example of Emulator Connection The figure shown below is an example of connecting the user system to the emulator. 14-pin connector with a 2.54-mm pitch (3M Limited: 2514-6002) Pulled up at 4.7 k Vcc MCU 11 EMLE 1 P37/TCK 2 P34/TRST# 3 P63/TDO 5 P35/TMS 6 P36/TDI 4 User logic 7 RES# 8 to 10 12 to 14 E10A-USB pin no. User system * RES(in)# of pin 4 of the user system connector is a signal line in which the emulator outputs signals to the MCU. RES(in)# (pin 4) and the user logic reset circuit for the signal line must be connected to the MCU as shown above. * RES(out)# of pin 7 of the user system connector is a signal line in which the emulator monitors the RES# signal of the MCU. The RES# must be pulled up before it is connected to pin 7 of the user system connector. Figure 1.3 Example of Emulator Connection R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 6 of 30 H8S, H8SX Family E10A-USB Emulator Section 1 Connecting the Emulator with the User System Notes: 1. P34/TRST#, P37/TCK, P35/TMS, P63/TDO, P36TDI are used by the emulator. Pull up and connect the emulator and the MCU pins. MCU User system connector Vcc 4.7 k Pins 1, 2, 3, 5, and 6 Figure 1.4 Connection of Emulator and MCU 2. If the emulator is connected to the user system, pull up pin EMLE of the MCU, and when the emulator is not connected to the user system, ground the EMLE. MCU Vcc The emulator is connected to the user system. 4.7 k EMLE MCU The emulator is not connected to the user system. EMLE Figure 1.5 Emulator and Pin EMLE R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 7 of 30 H8S, H8SX Family E10A-USB Emulator 3. Section 1 Connecting the Emulator with the User System RES(in)# of pin 4 of the user system connector is a signal line in which the emulator outputs signals to the MCU. RES(in)# of pin 4 and the user logic reset circuit for the signal line must be connected to pin RES# of the MCU as shown in figure 1.6. RES(out)# of pin 7 of the user system connector is a signal line in which the emulator monitors pin RES# of the MCU. The RES# must be pulled up before it is connected to pin 7 of the user system connector. Vcc 4.7 k User logic User system connector MCU Vcc RES(in)# (pin 4) 4.7 k RES# RES(out)# (pin 7) Figure 1.6 Connection of Pin RES# 4. Ground pins 8, 9, 10, 12, 13, and 14 of the user system connector. 5. Pin 11 of the user system connector must be connected to the user system Vcc (power supply). The amount of voltage permitted to input to the user system connector must be within the guaranteed range of the MCU. 6. When the MCU in use is connected to the emulator, the pin functions listed below are not available. Table 1.2 Pin Functions Not Available H8SX/1725F, H8SX/1725SF, and H8SX/1727SF P63, P34 to P37 IRQ11# PO12 to PO15 TIOCA1, TIOCA2, TIOCB1, TIOCB2, TCLKC, TCLKD The symbol (#) means that the signal is active-low. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 8 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Section 2 Specification of the Emulator's Software 2.1 Differences between the H8SX/1725F, H8SX/1725SF, H8SX/1727SF, and the Emulator 1. When the emulator system is initiated, it initializes the general registers and part of the control registers as shown in table 2.1. The initial value of the MCU is undefined. When the emulator is initiated from the workspace, a value to be entered is saved in a session. For the registers shown in table 2.1, values other than PC or CCR are not changed even if the CPU reset command is issued. If ER7 (SP) is changed as an odd value, it must be modified in the [Register] window. Table 2.1 Register Initial Values at Emulator Power-On Register Initial Value PC Reset vector value in the vector address table ER0 to ER6 H'0 ER7 (SP) H'10 CCR 1 for I mask, and others undefined EXR H'7F VBR H'0 SBR H'FFFFFF00 MACH H'0 MACL H'0 2. System Control Register In the emulator, the internal I/O registers can be accessed from the [IO] window. However, be careful when accessing the system control register. The emulator saves the register value of the system control register at a break and returns the value when the user program is executed. Since this is done during a break, do not rewrite the system control register in the [IO] window. 3. Memory Access during Emulation If the memory contents are referenced or modified during emulation, realtime emulation cannot be performed because the user program is temporarily halted. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 9 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software 4. The emulator communicates with the MCU by using the P34/TRST#, P37/TCK, P35/TMS, P63/TDO, and P36/TDI pins. These pins cannot be used. 5. The power consumed by the MCU can reach several mA. This is because the user power supply drives ICs to make the communication signal level match the user-system powersupply voltage. 6. Do not use an MCU that has been used for debugging. If the flash memory is reprogrammed many times, and the MCU is left for a few days, data may be lost due to retention problems. If the flash memory is reprogrammed many times, the data will not be erased. If an error message is displayed, exchange the MCU for a new one. 7. MCU Operating Mode Use the emulator in mode 3 (single-chip mode). 8. Sum Data Displayed in the Program Flash Mode Sum data, which is displayed in the `Program Flash' mode, is a value that data in the whole internal ROM areas has been added by bytes. 9. Note on Executing the User Program The set value is rewritten since the emulator uses flash memory and watchdog timer registers during programming (Go, Step In, Step Out, or Step Over) of the flash memory. 10. Note on Reprogramming the Flash Memory While the flash memory is reprogrammed during Go operation, actual reprogramming will not be performed if the flash memory is reprogrammed on the [Memory] window. Therefore, the contents will not be displayed correctly on the [Memory] window. 11. Value Set in the [System Clock] Dialog Box when Connecting the Emulator Input the frequency of the oscillator in use in the [System Clock] dialog box (this also applies when the MCU is multiplied by the PLL circuit). Figure 2.1 [System Clock] Dialog Box R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 10 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software 12. Emulation on Programming or Erasing the Internal Flash Memory A break cannot be generated while the program for programming or erasing the internal flash memory is being called. Note that the following processing also cannot be performed: Execution of the [STOP] button Auto-update of the watch function and use of the tool-chip watch function Memory operation during executing emulation 13. Note on Access to Memory When data-flash memory within the emulator is accessed etc. and the EEPROM read permission register has not been set, a FIFE (Flash Interface Error) interrupt will be generated when the user program is executed. 14.Note on FCU RAM Data If data in the FCU RAM are destroyed, subsequent flash-memory writing is not guaranteed. 15.Note on Flash Memory Synchronization Function The data cannot be read-out from flash memory after a transition to ROM/PE mode etc. If flash memory synchronization is used in this situation and data are read out from flash memory, correct data will not be displayed and data in flash memory may be overwritten. 16. [Run Program], GO_TILL Command [Run Program], GO_TILL command function is not available in this software. 17. Data Flash (EEPROM) Debugging the memory for data-flash area is available by using the setting described in section.2.2.8, Debugging in the External Flash Memory. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 11 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software 18. RAM Error Checking and Correction (ECC) Function When H8SX/1725SF or H8SX/1727SF is in use, the [ECC_OFF] checkbox is shown in the [Select Emulator mode] dialog box. When the RAM ECC function is disabled, select this checkbox. Figure 2.2 [Select Emulator mode] Dialog Box When the RAM ECC function is disabled, note the following restrictions. The start/stop function is not available. The PC break function (BREAKPOINT) cannot be specified for the internal RAM area. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 12 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software 2.2 The H8SX/1725F, H8SX/1725SF, or H8SX/1727SF E10A-USB Emulator Specific Functions and Notes Notes: 1. Do not use an MCU that has been used for debugging. 2. If the flash memory is reprogrammed many times, and the emulator is left for a few days, data may be lost due to retention problems. 3. If the flash memory is reprogrammed many times, the data will not be erased. If an error message is displayed, exchange the MCU for a new one. 2.2.1 Emulator Driver Selection Table 2.2 shows drivers which can be selected in the [Driver Details] dialog box. Table 2.2 Type Name and Driver Type Name Driver HS0005KCU01H, HS0005KCU02H Renesas E-Series USB Driver R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 13 of 30 H8S, H8SX Family E10A-USB Emulator 2.2.2 Section 2 Specification of the Emulator's Software Hardware Break Functions Hardware Break Conditions: In the H8SX/1725F, H8SX/1725SF, or H8SX/1727SF E10AUSB emulator, conditions of Break condition 1,2,3,4 can be set. Table 2.3 lists the items that can be specified. Table 2.3 Hardware Break Condition Specification Items Items Description Address bus condition Breaks when the MCU address bus value matches the specified value. It is possible to select whether a break is generated before or after prefetched address execution. When [User mask] is selected, a value to be masked `*' can be set. For masked bits, the condition is satisfied for any values. Data bus condition Breaks when the MCU data bus value matches the specified value. Byte, word, or longword can be specified as the access data size. When [User mask] is selected, a value to be masked `*' can be set. For masked bits, the condition is satisfied for any values. Bus master condition Breaks when the values of DATA, DTC, and DMA cycles match the specified values. Read or write condition Breaks in the read or write cycle. Execution count condition The condition specified with Break condition 1 breaks after the execution count condition specified here has been satisfied. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 14 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Table 2.4 lists the combinations of conditions that can be set in the [Break condition] dialog box. Table 2.4 Conditions Set in [Break condition] Dialog Box Condition Dialog Box Address Bus Data Condition Condition Bus Master Condition Execution Read or Write Count Condition Condition [Break condition 1] O O O O O [Break condition 2] O X O O X [Break condition 3] O X O O X [Break condition 4] O X O O X Note: O: Can be set by checking the radio button in the dialog box. Table 2.5 lists the combinations of conditions that can be set by the BREAKCONDITION_SET command. Table 2.5 Conditions Set by BREAKCONDITION_SET Command Condition Channel Address Bus Condition (option ) Data Condition (option ) Bus Master Condition (option ) Read or Write Condition (option ) Execution Count Condition (option ) Break condition 1 O O O O O Break condition 2 O X O O X Break condition 3 O X O O X Break condition 4 O X O O X Note: O: Can be set by the BREAKCONDITION_SET command. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 15 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Notes on Setting the Break Condition: 1. When [Step In], [Step Over], or [Step Out] is selected, the settings of Break condition are disabled. 2. The settings of Break condition are disabled when an instruction to which a BREAKPOINT has been set is executed. 3. When step over function is used, the settings of BREAKPOINT and Break condition are disabled. 4. When [Go To Cursor] is selected, the settings of Break condition channel 4 are disabled. 2.2.3 Notes on Setting the [Breakpoint] Dialog Box 1. When an odd address is set, the address is rounded down to an even address. 2. A BREAKPOINT is accomplished by replacing instructions. Accordingly, it can be set only to the flash memory or the RAM area. However, a BREAKPOINT cannot be set to the following addresses: 3. An area other than flash memory or RAM 4. An area occupied by the emulator program 5. During step execution, a BREAKPOINT is disabled. 6. A condition set at Break condition is disabled immediately after starting execution when an instruction at a BREAKPOINT is executed. A break does not occur even if a condition of Break condition is satisfied immediately after starting the execution. 7. When execution resumes from the breakpoint address after the program execution stops at the BREAKPOINT, single-step execution is performed at the address before execution resumes. Therefore, realtime operation cannot be performed. 8. Settings of BREAKPOINT and Break condition are invalid while the STEP OVER function is being used. 9. When a BREAKPOINT is set in the external flash memory area, the emulator executes the programs for initializing, programming, and erasing the flash memory (hereafter referred to as an initialization module, a write module, and an erase module, respectively*) to reprogram the external flash memory. Accordingly, the operation of the user program will differ when it is reexecuted after a break occurs. Note: Prepare initialization, write, and erase modules that are suitable for the external flash memory being used. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 16 of 30 H8S, H8SX Family E10A-USB Emulator 2.2.4 Section 2 Specification of the Emulator's Software Sequential Break Function The user program is halted when conditions of the Break condition for channels 2 to 4 are matched. This function can be set in the [Emulation mode] drop-down list box of the [Configuration] dialog box. Table 2.6 Sequential Break condition Specification Items Items Description Sequential Break condition 2-1 Halts a program when a condition is satisfied in the order of Break condition 2, 1. Break condition 1, 2 must be set. Sequential Break condition 3-2-1 Halts a program when a condition is satisfied in the order of Break condition 3, 2, 1. Break condition 1, 2, 3 must be set. Sequential Break condition 4-3-2-1 Halts a program when a condition is satisfied in the order of Break condition 4, 3, 2, 1. Break condition 1, 2, 3, 4 must be set. Note: When Sequential Break condition 4-3-2-1 is set, [Go To Cursor] is not available. 2.2.5 Note on Using the JTAG Clock (TCK) When the JTAG clock (TCK) is used, set the frequency to lower than that of the system clock. 2.2.6 Trace Function The emulator uses the eight-branch-instruction trace function in the MCU, and acquires a trace by operating the user program in realtime. The branch-instruction trace function displays the branchsource address, the mnemonic, and the operand. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 17 of 30 H8S, H8SX Family E10A-USB Emulator 2.2.7 Section 2 Specification of the Emulator's Software Parallel Transfer (1) This emulator supports memory accesses during user program execution using a H-UDI parallel transfer. To enable the H-UDI parallel transfer, select [Enable] for [Parallel] in the [Configuration] dialog box. Figure 2.3 [Configuration] Dialog Box [Parallel] group box: Selects the setting on memory accesses during user program execution. Table 2.7 [Parallel] Group Box Disable Uses no emulator debugging function (H-UDI parallel transfer) to access memory. A short break occurs. (initial value) Enable Uses the emulator debugging function (H-UDI parallel transfer) to access memory. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 18 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software (2) Limitations on the Conflict Conditions of Parallel Transfer Enabled Memory access by parallel transfer will be limited in the following conflict conditions. During software standby, a recovery with the [STOP] button will cause a malfunction of parallel transfer (a timout error will occur). A recovery should be operated by the user reset. If the memory access is performed by a parallel transfer when the user reset is input or watchdog timer (WDT) is reset, a malfunction of parallel transfer will occur (a writedisabled or indefinite value will be read). If the emulation mode is switched when the user reset is input or watchdog timer (WDT) is reset, a malfunction of parallel transfer will occur (a timout error will occur). (3) Access Size of Parallel Transfer During parallel transfer, when memory is accessed by the address except at the boundary of words or longwords, it is compensated to the boundary of access size. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 19 of 30 H8S, H8SX Family E10A-USB Emulator 2.2.8 Section 2 Specification of the Emulator's Software Debugging in the External Flash Memory This emulator supports debugging in the external flash memory, which is the function to allow downloading of programs to the external flash memory area. Settings for the external flash memory should be made in the [External Flash memory setting] dialog box opened at initiation of the emulator. To display the [External Flash memory setting] dialog box, check [Use External Flash memory setting] in the [Select Emulator mode] dialog box. Debugging function equivalent to that in the H8SX E10A-USB system becomes available in the external flash memory area by specifying the initialization, write, or erase module* and filling information on the external flash memory. Settings made in the [External Flash memory setting] dialog box are retained. Next time this dialog box is launched, the previous settings are displayed. Clicking the [Save] button saves the contents that have been set. The file to be saved (*.EFF: external flash memory data setting file) is loaded by clicking the [Browse...] button for [Select External Flash setting file]. When the file has been set, it is registered as the history (recent 10 files) in the combo box and selected to be loaded. Up to 1024 blocks can be specified for the external flash memory via the [External Flash memory setting] dialog box of the emulator. The maximum size allowed between the start address and the end address of the external flash memory is 16 Mbytes. Since this function forcibly changes the device settings in the emulator when the initialization, write, or erase module is called, the emulator operates differently with the contents of the user program. To verify the operation of the user program, disable the [Use External Flash memory] check box and activate the emulator. Notes: 1. Prepare initialization, write, and erase modules that are suitable for the external flash memory being used. 2. Debugging in the external flash memory is available for data flash (EEPROM) in this emulator. 3. Make settings in accord with the region of memory on the individual device. Table 2.8 lists the items contained in the [External Flash memory setting] dialog box. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 20 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Figure 2.4 [External Flash memory setting] Dialog Box R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 21 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Table 2.8 Items in [External Flash memory setting] Dialog Box No. Item Description 1 Select External Flash setting file Specify the data file (*.EFF) for setting the external flash memory. If not specified, select the setting of [recent setting data] (data previously changed) in the combo box. To make a new setting, select [initialize] and input data. 2 Use External Flash memory Enable or disable use of the external flash memory debugging function. Checked: Enabled Not checked: Disabled (default) 3 Erasing External Flash memory at Link up Select whether or not to erase the contents of the flash memory at initiation of the emulator. Checked: Erases the contents of the flash memory at initiation of the emulator. Not checked: Reads the contents of the flash memory at initiation of the emulator (default). 4 File name Specify the file of initialization, write, and erase modules. A program file must be specified for programming the flash memory. Prepare a file suitable for the flash memory being used. 5 Module offset address Specify the top address by an offset where the initialization, write, erasing modules are to be expanded. (Initial value is H'0). If not specified, disable offset. Checked: Enables offset. Not checked: Disables offset (default). (If the address exceeds H'FFFFFFFF, it will become H'0.) 6 Module top address Specify the top address where the initialization, write, and erase modules are to be expanded. (The 4-kbyte address areas starting from that address are saved by the emulator; it is possible to expand the initialization, write, and erase modules without affecting on the user program.) 7 Initialize module address Entry address of the initialization module The initialization module is used to set the device that is required for accessing the external flash memory. If not specified, disable entry. Checked: Enables entry. Not checked: Disables entry (default). 8 Erasing module address R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Entry address of the erase module Page 22 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Table 2.8 Items in [External Flash memory setting] Dialog Box (cont) No. Item Description 9 Writing module address Entry address of the write module 10 Access size Select the unit of accesses for transfer of the programs. 8bits(Byte): Bytes 16bits(Word): Words 32bits(Long): Longwords 11 Top address Top address of the flash memory 12 End address End address of the flash memory* 13 Bus width Select the unit of accesses to the flash memory. 8bits(Byte): Bytes 16bits(Word): Words 32bits(Long): Longwords 14 Erasing time Waiting time for erasure (in seconds) (Specification of a decimal or hexadecimal value is recommended.) 15 Block count Number of blocks in the flash memory (Specification of a decimal or hexadecimal value is recommended. Up to 1024 blocks can be specified.) 16 Top address of block Define the start addresses of all blocks. If the flash memory has D'10 blocks, the definition will be as shown below. Press the Return key between the definitions for each of the blocks. Example: H'0 H'1000 H'2000 H'3000 H'4000 H'5000 H'6000 H'7000 H'8000 H'9000 17 Remarks Use for writing a text. Contents of data that has been set can be entered. If not specified, setting is not needed. Note: Make settings in accord with the region of memory on the individual device. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 23 of 30 H8S, H8SX Family E10A-USB Emulator 2.2.9 Section 2 Specification of the Emulator's Software Interface with Initialization, Write, and Erase Modules and Emulator Firmware The initialization, write, and erase modules must be branched from the firmware when the emulator is initiated and the external flash memory is written or read*. Note: The modules are not called if the external flash memory data is not updated. To branch from the emulator firmware to the initialization, write, and erase modules, or to return from the initialization, write, and erase modules to the emulator firmware, the following conditions must be observed: * The size of each initialization, write, or erase module must be consecutive 4 kbytes or less (including work areas and stack areas). * Save and return all the general register values and control register values before and after calling the initialization, write, or erase module. * Return the initialization, write, or erase module to the calling source after processing. * The initialization, write, and erase modules must be Motorola S-type files. * For the write module, write data ER1(L) to address ER0(L) and store the top address of flash memory ER2(L) then the result in ER0(L). * For the erase module, erase the block of address ER0(L) and store the top address of flash memory ER1(L) then the result in ER0(L). * Set the write size of the write module as described in No. 13 `Bus width' in table 2.8 (byte, word, or longword). * The initialization module is used to set the device that is required for accessing the external flash memory. Store the result in ER0(L). The module interface must be as follows to correctly pass the information that is required for accessing flash memory. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 24 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Table 2.9 Module Interface Module Name Argument Return Value Write module ER0(L): Write address ER0(L): Result (OK = 0, NG 0) ER1(L): Write data ER2(L): Top address of the flash memory Erase module ER0(L): Address of the block to be erased ER0(L): Result (OK = 0, NG 0) ER1(L): Top address of the flash memory Initialization module - ER0(L): Result (OK = 0, NG 0) Notes: 1. The (L) means the longword size. 2. The initialization module is not always set. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 25 of 30 H8S, H8SX Family E10A-USB Emulator 2.2.10 (1) Section 2 Specification of the Emulator's Software Performance Analysis Measuring Performance Use the performance analysis function to measure the performance of programs. The performance analysis function does not affect the realtime operation because it uses an on-chip performance-measurement circuit to measure the performance in a specified range. To open the [Performance Analysis] window, start by selecting [View -> Performance -> Performance Analysis] or clicking on the [PA] toolbar button ( ). The [Select Performance Analysis Type] dialog box appears. Figure 2.5 [Select Performance Analysis Type] Dialog Box Click on the [OK] button to open the [Performance Analysis] window. Figure 2.6 [Performance Analysis] Window R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 26 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software Performance-measurement settings should be made in the [Performance Analysis] dialog box. Figure 2.7 [Performance Analysis] Dialog Box The [Performance Analysis] dialog box contains the following items. [Channel 1] group box: Settings on PA1 [Don't care] checkbox Selected: Performance measurement will not be performed on PA1. Not selected: Performance measurement will be performed on PA1. PA1 is for measuring the number of execution cycles in the entire program. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 27 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software [Channel 2] group box: Settings on PA2 [Don't care] checkbox Selected: Performance measurement will not be performed on PA2. Not selected: Performance measurement will be performed on PA2. PA2 is for measuring the number of execution cycles between two points. [BC2 -> BC1] radio button Measurement starts with satisfaction of break condition 2 and stops with satisfaction of break condition 1. [BC1 -> BC2] radio button Measurement starts with satisfaction of break condition 1 and stops with satisfaction of break condition 2. [Trigger to start] button Clicking on this button opens a [Break condition] dialog box for the condition to start measurement. [Trigger to stop] button Clicking on this button opens a [Break condition] dialog box for the condition to stop measurement. [Rate] group box: Form of the measurement results PA1/PA2 Rate of PA1 to PA2 PA2/PA1 Rate of PA2 to PA1 R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 28 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software (2) Measurement Results The [Performance Analysis] window shows the number of execution cycles measured during execution of the program. The results of measurement are cumulative. To clear them, display the popup menu by right-clicking on the [Performance Analysis] window, then select Clear Data , Clear All Data or one of the following icons: or . Figure 2.8 [Performance Analysis] Window (Results) PA1: Result on performance channel 1 represented as a 12-digit hexadecimal value PA2: Result on performance channel 2 represented as a 12-digit hexadecimal value Note: When the performance counter has overflowed, an asterisk (*) is displayed on the left to the value. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 29 of 30 H8S, H8SX Family E10A-USB Emulator Section 2 Specification of the Emulator's Software (3) Rate of Measurement Results Right-click on the [Performance Measurement] window and select [Properties] from the popup menu, or click on the corresponding icon ( ) to check the rate of measurement results on PA1 and PA2. Figure 2.9 Rate of Measurement Results (4) Other * On PA1, several cycles are added to the count when stepping is performed or the program ends. So tolerances will be included in the measurement result. * When PA2 has been selected but BC1 and BC2 are disabled, the program will not be executed. R20UT2526EJ0300 Rev. 3.00 Mar 14, 2013 Page 30 of 30 H8S, H8SX Family E10A-USB Emulator Additional Document for User's Manual Supplementary Information on Using the H8SX/1725F, H8SX/1725SF, and H8SX/1727SF Publication Date: Rev.1.00, Mar. 24, 2008 Rev.3.00, Mar. 14, 2013 Published by: Renesas Electronics Corporation http://www.renesas.com SALES OFFICES Refer to "http://www.renesas.com/" for the latest and detailed information. Renesas Electronics America Inc. 2880 Scott Boulevard Santa Clara, CA 95050-2554, U.S.A. Tel: +1-408-588-6000, Fax: +1-408-588-6130 Renesas Electronics Canada Limited 1101 Nicholson Road, Newmarket, Ontario L3Y 9C3, Canada Tel: +1-905-898-5441, Fax: +1-905-898-3220 Renesas Electronics Europe Limited Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K Tel: +44-1628-651-700, Fax: +44-1628-651-804 Renesas Electronics Europe GmbH Arcadiastrasse 10, 40472 Dusseldorf, Germany Tel: +49-211-65030, Fax: +49-211-6503-1327 Renesas Electronics (China) Co., Ltd. 7th Floor, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100083, P.R.China Tel: +86-10-8235-1155, Fax: +86-10-8235-7679 Renesas Electronics (Shanghai) Co., Ltd. Unit 301, Tower A, Central Towers, 555 LanGao Rd., Putuo District, Shanghai, China Tel: +86-21-2226-0888, Fax: +86-21-2226-0999 Renesas Electronics Hong Kong Limited Unit 1601-1613, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong Tel: +852-2886-9318, Fax: +852 2886-9022/9044 Renesas Electronics Taiwan Co., Ltd. 13F, No. 363, Fu Shing North Road, Taipei, Taiwan Tel: +886-2-8175-9600, Fax: +886 2-8175-9670 Renesas Electronics Singapore Pte. Ltd. 80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre Singapore 339949 Tel: +65-6213-0200, Fax: +65-6213-0300 Renesas Electronics Malaysia Sdn.Bhd. Unit 906, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia Tel: +60-3-7955-9390, Fax: +60-3-7955-9510 Renesas Electronics Korea Co., Ltd. 12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea Tel: +82-2-558-3737, Fax: +82-2-558-5141 (c) 2013 Renesas Electronics Corporation. All rights reserved. Colophon 2.0 H8S, H8SX Family E10A-USB Emulator Additional Document for User's Manual Supplementary Information on Using the H8SX/1725F, H8SX/1725SF, and H8SX/1727SF R20UT2526EJ0300