REJ10J1273-0200 SuperH™ Family E10A-USB Emulator Additional Document for User’s Manual Supplementary Information on Using the SH7211 Renesas Microcomputer Development Environment System SuperH™ Family / SH7210 Series E10A-USB for SH7211 HS7211KCU01HE Rev.2.00 Revision Date: Apr.
Notes regarding these materials 1. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document. 2.
Contents Section 1 Connecting the Emulator with the User System ................................1 1.1 1.2 1.3 1.4 1.5 Components of the Emulator ............................................................................................ 1 Connecting the Emulator with the User System ............................................................... 2 Installing the H-UDI Port Connector on the User System ................................................ 3 Pin Assignments of the H-UDI Port Connector ..........
ii
Section 1 Connecting the Emulator with the User System 1.1 Components of the Emulator The E10A-USB emulator supports the SH7211. Table 1.1 lists the components of the emulator. Table 1.1 Components of the Emulator Classification Component Hardware Appearance Quantity Emulator box 1 User system interface cable User system interface cable 1 USB cable 1 1 Remarks HS0005KCU01H: Depth: 65.0 mm, Width: 97.0 mm, Height: 20.0 mm, Mass: 72.9 g or HS0005KCU02H: Depth: 65.0 mm, Width: 97.0 mm, Height: 20.
1.2 Connecting the Emulator with the User System To connect the E10A-USB emulator (hereinafter referred to as the emulator), the H-UDI port connector must be installed on the user system to connect the user system interface cable. When designing the user system, refer to the recommended circuit between the H-UDI port connector and the MCU. In addition, read the E10A-USB emulator user's manual and hardware manual for the related device. Table 1.
1.3 Installing the H-UDI Port Connector on the User System Table 1.3 shows the recommended H-UDI port connectors for the emulator. Table 1.3 Recommended H-UDI Port Connectors Connector Type Number Manufacturer Specifications 36-pin connector DX10M-36S Hirose Electric Co., Ltd. Screw type DX10M-36SE, DX10G1M-36SE Lock-pin type 14-pin connector 2514-6002 Minnesota Mining & Manufacturing Ltd. 14-pin straight type 38-pin connector 2-5767004-2 Tyco Electronics AMP K.K.
E10A-USB optional 38-pin user system interface cable 50 mm 1 38 2 20 mm 37 5 mm 2-5767004-2 : Area to be kept free of other components Target system H-UDI port connector (top view) Figure 1.1 Restriction on Component Mounting 1.4 Pin Assignments of the H-UDI Port Connector Figures 1.2 through 1.4 show the pin assignments of the 36-pin, 14-pin, and 38-pin H-UDI port connectors, respectively.
Pin No. Signal Input/ Output*1 SH7211 Pin No. Output 1 AUDCK 2 GND 3 AUDATA0 4 GND 5 AUDATA1 6 GND 7 AUDATA2 8 GND 9 AUDATA3 Pin No. Note 110 Output 116 Output 115 Output 112 Output 111 10 GND 11 _AUDSYNC*2 Output 109 Signal Input/ Output*1 19 TMS Input 17 20 GND 21 _TRST Input 18 22 (GND)*4 23 TDI Input 12 24 GND Output 15 Input/ output 30 25 TDO 26 GND 27 *2 _ASEBRKAK /_ASEBRK *2 28 GND 29 UVCC GND 30 GND N.C.
Signal Input/ Output*1 1 TCK Input 16 2 _TRST Input 18 3 TDO Output 15 4 _ASEBRKAK Input/ 30 Pin No. *2 *2 SH7211 Pin No. / _ASEBRK output 5 TMS Input 17 6 TDI Input 12 7 _RES Output 22 8 N.C. 9 (GND) 11 UVCC 10, 12, GND *2 Note User reset *4 Output and 13 14 GND *3 Output Notes: 1. Input to or output from the user system. 2. The symbol (_) means that the signal is active-low. 3.
Pin No. Signal 1 N.C. 2 N.C. SH7211 Pin No. Input/ Output*1 Note *4 Pin No. Signal 20 N.C. 21 _TRST *2 N.C. 3 _ASEMD (GND) 22 4 N.C. 23 N.C. 5 _UCON (GND) *3 24 AUDATA3 6 AUDCK 25 N.C. 7 N.C. 26 AUDATA2 8 _ASEBRKAK/ _ASEBRK*2 30 27 N.C. 22 User reset 28 Output 110 Input/ Output Output 9 _RES*2 10 N.C. 11 TDO Output 12 UVCC_AUD Output 13 N.C. 14 UVCC Output 15 TCK Input 16 N.C. 17 TMS 18 N.C.
1.5 Recommended Circuit between the H-UDI Port Connector and the MCU 1.5.1 Recommended Circuit (36-Pin Type) Figure 1.5 shows a recommended circuit for connection between the H-UDI and AUD port connectors (36 pins) and the MCU when the emulator is in use. Notes: 1. Do not connect anything to the N.C. pins of the H-UDI port connector. 2. The _ASEMD pin must be 0 when the emulator is connected and 1 when the emulator is not connected, respectively.
When the circuit is connected as shown in figure 1.5, the switches of the emulator are set as SW2 TM = 1 and SW3 = 1. For details, refer to section 3.8, Setting the DIP Switches, in the SuperH Family E10A-USB Emulator User’s Manual. VccQ = I/O power supply All pulled-up at 4.
1.5.2 Recommended Circuit (14-Pin Type) Figure 1.6 shows a recommended circuit for connection between the H-UDI port connector (14 pins) and the MCU when the emulator is in use. Notes: 1. Do not connect anything to the N.C. pins of the H-UDI port connector. 10 2. The _ASEMD pin must be 0 when the emulator is connected and 1 when the emulator is not connected, respectively. (1) When the emulator is used: _ASEMD = 0 (2) When the emulator is not used: _ASEMD = 1 Figure 1.
When the circuit is connected as shown in figure 1.6, the switches of the emulator are set as SW2 TM = 1 and SW3 = 1. For details, refer to section 3.8, Setting the DIP Switches, in the SuperH Family E10A-USB Emulator User’s Manual. VccQ = I/O power supply All pulled-up at 4.7 kΩ VccQ VccQ VccQ VccQ VccQ 9 10 12 13 14 H-UDI port connector (14-pin type) 1 TCK 2 (GND) TRST 3 TDO GND ASEBRKAK 4 /ASEBRK 5 TMS GND TDI 6 GND 7 RES GND N.C.
1.5.3 Recommended Circuit (38-Pin Type) Figure 1.7 shows a recommended circuit for connection between the H-UDI and AUD port connectors (38 pins) and the MCU when the emulator is in use. Notes: 1. Do not connect anything to the N.C. pins of the H-UDI port connector. 2. The _ASEMD pin must be 0 when the emulator is connected and 1 when the emulator is not connected, respectively. (1) When the emulator is used: _ASEMD = 0 (2) When the emulator is not used: _ASEMD = 1 Figure 1.
When the circuit is connected as shown in figure 1.7, the switches of the emulator are set as SW2 TM = 1 and SW3 = 1. For details, refer to section 3.8, Setting the DIP Switches, in the SuperH Family E10A-USB Emulator User’s Manual. VccQ = I/O power supply All pulled-up at 4.
14
Section 2 Software Specifications when Using the SH7211 2.1 Differences between the MCU 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 values of the MCU are undefined. When the emulator is initiated from the workspace, a value to be entered is saved in a session. Table 2.
4. Reset Signals The MCU reset signals are only valid during emulation started with clicking the GO or STEPtype button. If these signals are enabled on the user system in command input wait state, they are not sent to the MCU. Note: Do not break the user program when the _RES, _BREQ, or _WAIT signal is being low. A TIMEOUT error will occur. If the _BREQ or _WAIT signal is fixed to low during break, a TIMEOUT error will occur at memory access. 5.
7. Memory Access to the External Flash Memory Area The emulator can download the load module to the external flash memory area (for details, TM refer to section 6.22, Download Function to the Flash Memory Area, in the SuperH Family E10A-USB Emulator User’s Manual). Other memory write operations are enabled for the RAM area. Therefore, an operation such as memory write or BREAKPOINT should be set only for the RAM area. 8. ROM Cache For ROM cache in the MCU, the emulator operates as shown in table 2.4.
The AUD pins are multiplexed with other pins. The AUD function cannot be used for the initial values because they are used as other functions. To use the initial value as the AUD function, set the AUD pins to be used from [AUD pin select] of the [Configuration] dialog box. The emulator rewrites the registers for the pin function controller (PFC) to enable the specified AUD pins before executing the user program.
Table 2.7 Watchdog Timer Register Register Name Usage Register WTCSR(W) Write Watchdog timer control/status register WTCNT(W) Write Watchdog timer counter WTCSR(R) Read Watchdog timer control/status register WTCNT(R) Read Watchdog timer counter WRCSR(W) Write Watchdog reset control/status register WRCSR(R) Read Watchdog reset control/status register • Customization of the I/O-register definition file The internal I/O registers can be accessed from the [IO] window.
15. Contention between the Change of the FRQCR Register and the Debugging Functions The following notes are required for the user program for changing the multiplication rate of PLL circuit 1 to change the frequency: • Avoid contention between the change of the FRQCR register in the user program and the memory access from the [Memory] window, etc.
2.2 Specific Functions for the Emulator when Using the SH7211 2.2.1 Event Condition Functions The emulator is used to set event conditions for the following three functions: • Break of the user program • Internal trace • Start or end of performance measurement Table 2.8 lists the types of Event Condition. Table 2.
Table 2.
Sequential Setting: Using the [Combination action (Sequential or PtoP)] dialog box specifies the sequential condition and the start or end of performance measurement. Table 2.10 Conditions to Be Set Classification Item [Ch1, 2, 3] list box Sets the sequential condition and the start or end of performance measurement using Event Conditions 1 to 3 and 11. Description Don’t care Sets no sequential condition or the start or end of performance measurement.
Table 2.10 Conditions to Be Set (cont) Classification Item Description [Ch1, 2, 3] list box (cont) Ch1 to Ch2 PA Sets the performance measurement period during the time from the satisfaction of the condition set in Event Condition 1 (start condition) to the satisfaction of the condition set in Event Condition 2 (end condition). [Ch4, 5] list box Sets the point-to-point of the internal trace (the start or end condition of trace acquisition) using Event Conditions 4 and 5.
Usage Example of Sequential Break Extension Setting: A tutorial program provided for the product is used as an example. For the tutorial program, refer to section 6, Tutorial, in the TM SuperH Family E10A-USB Emulator User’s Manual. The conditions of Event Condition are set as follows: 1. Ch3 Breaks address H’00001068 when the condition [Only program fetched address after] is satisfied. 2. Ch2 Breaks address H’0000107a when the condition [Only program fetched address after] is satisfied. 3.
Figure 2.1 [Source] Window at Execution Halted (Sequential Break) If the sequential condition, performance measurement start/end, or point-to-point for the internal trace is set, conditions of Event Condition to be used will be disabled. Such conditions must be enabled from the popup menu by clicking the right mouse button on the [Event Condition] sheet. Notes: 1.
7. If the settings of the Event condition or the sequential conditions are changed during execution of the program, execution will be suspended. (The number of clocks to be suspended during execution of the program is a maximum of about 102 bus clocks (Bφ). If the bus clock (Bφ) is 66.6 MHz, the program will be suspended for 1.53 μs.) 8.
Table 2.12 shows the type numbers that the AUD function can be used. Table 2.12 Type Number and AUD Function Type Number AUD Function HS0005KCU01H Not supported HS0005KCU02H Supported The internal and AUD traces are set in the [Acquisition] dialog box of the [Trace] window. Internal Trace Function: When [I-Trace] is selected for [Trace type] on the [Trace Mode] page of the [Acquisition] dialog box, the internal trace can be used. Figure 2.
The following three items can be selected as the internal trace from [Type] of [I-Trace mode]. Table 2.13 Information on Acquiring the Internal Trace Item Acquisition Information [M-Bus & Branch] Acquires the data and branch information on the M-bus. • Data access (read/write) • PC-relative access • Branch information [I-Bus] Acquires the data on the I-bus.
To restrict trace acquisition to access for only a specific address or specific function of a program, an Event Condition can be used. Typical examples are described below. • Example of halting a trace with a write access (M-bus) to H’FFF80000 by the user program as a condition (trace halt): Set the condition to be acquired on [I-Trace mode]. Set the following in the [Event Condition 1] or [Event Condition 2] dialog box: Address condition: Set [Address] and H’FFF80000.
Notes on Internal Trace: • Timestamp The timestamp is the clock counts of Bφ (48-bit counter). Table 2.15 shows the timing for acquiring the timestamp. Table 2.
• Trace acquisition condition Do not set the trace end condition for the sleep instruction and the branch instruction according to which the delay slot becomes the sleep instruction. When [I-Bus, M-Bus & Branch] is selected and the trace acquisition condition is set for the Mbus and I-bus with Event Condition, set the M-bus condition and the I-bus condition for [Event Condition 1] and [Event Condition 2], respectively.
AUD Trace Functions: This function is operational when the AUD pin of the device is connected to the emulator. Table 2.16 shows the AUD trace acquisition mode that can be set in each trace function. Table 2.16 AUD Trace Acquisition Mode Type Mode Description Continuous trace occurs Realtime trace When the next branch occurs while the trace information is being output, all the information may not be output. The user program can be executed in realtime, but some trace information will be lost.
To set the AUD trace acquisition mode, click the [Trace] window with the right mouse button and select [Setting] from the pop-up menu to display the [Acquisition] dialog box. The AUD trace acquisition mode can be set in the [AUD mode1] or [AUD mode2] group box in the [Trace mode] page of the [Acquisition] dialog box. Figure 2.
When the AUD trace function is used, select the [AUD function] radio button in the [Trace type] group box of the [Trace mode] page. (a) Branch Trace Function The branch source and destination addresses and their source lines are displayed. Branch trace can be acquired by selecting the [Branch trace] check box in the [AUD function] group box of the [Trace mode] page. The branch type can be selected in the [AUD Branch trace] page.
Figure 2.4 [AUD Branch trace] Page (b) Window Trace Function Memory access in the specified range can be acquired by trace. Two memory ranges can be specified for channels A and B. The read, write, or read/write cycle can be selected as the bus cycle for trace acquisition.
[Setting Method] (i) Select the [Channel A] and [Channel B] check boxes in the [AUD function] group box of the [Trace mode] page. Each channel will become valid. (ii) Open the [Window trace] page and specify the bus cycle, memory range, and bus type that are to be set for each channel. Figure 2.5 [Window trace] Page Note: When [M-Bus] or [I-Bus] is selected, the following bus cycles will be traced. • M-Bus: A bus cycle generated by the CPU is acquired.
(c) Software Trace Function Note: This function can be supported with SHC/C++ compiler (manufactured by Renesas Technology Corp.; including OEM and bundle products) V7.0 or later. When a specific instruction is executed, the PC value at execution and the contents of one general register are acquired by trace. Describe the Trace(x) function (x is a variable name) to be compiled and linked beforehand. For details, refer to the SHC manual.
2.2.3 Note on Using the JTAG (H-UDI) Clock (TCK) 1. Set the JTAG clock (TCK) frequency to lower than the frequency of the peripheral module clock and to 10 MHz or lower. 2. The initial value of the JTAG clock (TCK) is 2.5 MHz. 3. A value to be set for the JTAG clock (TCK) is initialized after executing [Reset CPU] or [Reset Go]. Thus the TCK value will be 2.5 MHz. 2.2.4 Notes on Setting the [Breakpoint] Dialog Box 1. When an odd address is set, the next lowest even address is used. 2.
2.2.5 Notes on Setting the [Event Condition] Dialog Box and the BREAKCONDITION_ SET Command 1. When [Go to cursor], [Step In], [Step Over], or [Step Out] is selected, the settings of Event Condition 3 are disabled. 2. When an Event Condition is satisfied, emulation may stop after two or more instructions have been executed. 2.2.6 Performance Measurement Function The emulator supports the performance measurement function. 1.
(a) Specifying the measurement start/end conditions The measurement start/end conditions are specified by using Event Condition 1,2. The [Ch1,2,3] list box of the [Combination action (Sequential or PtoP)] dialog box can be used. Table 2.
Note: When [Ch2 to Ch1 PA] or [Ch1 to Ch2 PA] is selected, to execute the user program, specify conditions set in Event Condition 2 and Event Condition 1 and one or more items for performance measurement. (b) Measurement item Items are measured with [Channel 1 to 4] in the [Performance Analysis] dialog box. Maximum four conditions can be specified at the same time.
Table 2.18 Measurement Item Selected Name Option Disabled None Elapsed time AC (The number of execution cycles (Iφ) is set as the measurement item.
Notes: 1. In the non-realtime trace mode of the AUD trace, normal counting cannot be performed because the generation state of the stall or the execution cycle is changed. 2. If the internal ROM is not installed on the product, do not set the measurement item for the internal ROM area. 3. For SH7211, do not set measurement items for the cache-miss counts, cacheable area, or non-cacheable area. 2.
SuperH™ Family E10A-USB Emulator Additional Document for User's Manual Supplementary Information on Using the SH7211 Publication Date: Rev.1.00, February 28, 2006 Rev.2.00, April 10, 2007 Published by: Sales Strategic Planning Div. Renesas Technology Corp. Edited by: Customer Support Department Global Strategic Communication Div. Renesas Solutions Corp. © 2007. Renesas Technology Corp., All rights reserved. Printed in Japan.
Sales Strategic Planning Div. Nippon Bldg., 2-6-2, Ohte-machi, Chiyoda-ku, Tokyo 100-0004, Japan RENESAS SALES OFFICES http://www.renesas.com Refer to "http://www.renesas.com/en/network" for the latest and detailed information. Renesas Technology America, Inc. 450 Holger Way, San Jose, CA 95134-1368, U.S.A Tel: <1> (408) 382-7500, Fax: <1> (408) 382-7501 Renesas Technology Europe Limited Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K.
SuperH™ Family E10A-USB Emulator Additional Document for User’s Manual Supplementary Information on Using the SH7211