Home

Old Company Name in Catalogs and Other Documents

image

Contents

1.
2.
3.
4.
5.
6. Unregulated Power
7. Ea Unregulated Power supply gt gt 7 5VDC Figure 4 3 Power jet Power supply for LCEVB SH1 Since total power consumption can vary widely due to external connections SH1 port state and memory configuration generally use a power supply capable of providing at least 500mA at 5VDC regulated 5 19 Renesas System Solutions Asia Pte Ltd ENESAS Section 5 Software Startup 5 1 Host PC Computer Requirement HDI is powerful yet easy to use MS Window based Interface Program communicating with LCEVB SH1 hardware system For program development with the LCEVB SH1 package you will need a PC Capable of hosting the Renesas s tools editing files and communicating with the evaluation board The computer must be an i386 i486 or P
8. In Use Figure 2 1 Selecting AC cut parallel resonating system for system clock 6 Renesas System Solutions Asia Pte Ltd LENESAS Alternatively by changing the jumpers setting of both J1 and J2 a standard TTL can oscillator may be used In Use
9. Figure 1 1 LCEVB SHI Layout Schematic diagrams are provided at the back of this manual At the top level the LCEVB SH1 is composed of an SH processor ROM RAM and two serial ports as shown in figure 1 2 1 Renesas System Solutions Asia Pte Ltd EPROM NN SH7032 Port lt TI Monitor gt Port to Host PC Figure 1 2 LCEVB SH1 Functional Block Diagram The SH1 processor contains most of the decoding and glue logic necessary to implement an expanded memory SH1 based system Read only memory ROM EPROM contains the Monitor Firmware Two byte wide WORD RAM blocks are used side by side to provide word wide reads and writes A serial transceiver supports two three wire serial ports using the two on board SH1 Universal Asynchronous Receiver Transmitters UARTSs The respective usage of the ports are 1 x Port is dedicated to the on board Monitor Firmware for Host PC communication 1 x Port is available to the user for user application system The PC Host communication with LCEVB SH1 is through PC interface program HDI Hitachi Debugging Interface Users re configuring LCEVB SH1 I O ports should be caution tha
10. Regulated oVDC El Power supply
11. Figure 2 2 Selecting Oscillator system for system clock The setting of J1 and J2 can be shown below Jumper setting Assignment Oscillator OSC1 AT cut parallel resonating system Y1 amp circuitry default Table 2 3 Jumper J1 and J2 setting 2 3 Reset Circuitry 2 3 1 Reset Generator The reset generator for the LCEVB SH1 is a Dallas Semiconductor DS1233 Econo Reset device The DS1233 monitors its supply voltage When the supply voltage is out of tolerance level the DS1233 pulls its reset input output line active low This condition continues indefinitely After the voltage reaches tolerance level again the reset is held low for an additional 350 ms to allow for final supply stabilization before release the processor from reset state The DS1233 monitors its own reset output so that a pushbutton can be used as a reset source The DS1233 de bounces the input from the pushbutton S1 provides a 350 ms reset signal when S1 is released Quickly switching power off then on supplying to the board may not allow Vcc to fall low enough to generate a reset pulse In practice the SH1 usually continues to operate normally Rapid switching of the power supply stresses the integrated circuit components and is not recommended 7 Renesas System Solutions Asia Pte Ltd LENESAS 2 3 2 Reset and Non Maskable Interrupt NMI The
12. Figure 4 2 Direct Power supply to LCEVB SH1 The pin assignment of JP1 1 MC me OV GND Table 4 2 Pin assignment of JP1 4 3 2 Power jet Power Supply Alternatively a power jet supplying unregulated voltage 27 5VDC to LCEVB SH1 through J12 The power jet configuration Figure 4 2 Power jet configuration for LCEVB SH1 The power jet connection with the appropriate J11 setting of the jumper at 2 3 using regulator
13. OGFFFFFF Internal 10 DFOODOOOO OFFFFFFF Internal RAM System Memory resources Hull Figure 7 6 Memory Mapping Window The Target Device Configuration shows the following Table 7 2 Target Device Configuration Description In the Memory Mapping Window the following memory attribution description Access Type On Chip Read write Emulation RAM memory On Chip Read only Emulation ROM memory No access allowed Description On Chip Guarded User Read write External RAM memory User Read only External ROM memory User Guarded Table 7 3 No access allowed Target Memory Attribute 31 Renesas System Solutions Asia Pte Ltd LENESAS 75 User Target Program Downloading Once the LCEVB SH is properly configured you can download the User Target Program object program you want to debug First load the SYSROF format object file file extension abs as follows e Choose Load Program from the File menu or click the Load program speed button in the toolbar Figure 7 7 File open speed button e Select the file tutorial abs in the progra 1 hitach 1 sh1_tut directory and click OK Load Object File File Name Directories c wprogra ivhita Ach tut Cancel E Ch 3 progra 1 E3 hitach 1 Lele 39 shl tut Network List Files of Type Drives Sysrof Files abs sl E c disk 1 Offset Space o Memory sl Figure 7 8 File open Dialog box When the file has been loa
14. addv Rm Rn and imm RO and Rm Rn and D imm RO GBR bf disp8 bra disp12 bsr disp12 bt disp8 clrmac cirt cmp eq imm RO cmp eq Rm Rn mov Rm Rn mov b Rm RO Rn mov b Rm Rn mov b Rm Rn mov b disp Rm RO mov b disp GBR RO cmp ge Rm Rn cmp gt Rm Rn cmp hi Rm Rn cmp hs Rm Rn cmp pl Rn cmp pz Rn cmp str Rm Rn divOs Rm Rn divOu div1 Rm Rn exts o Rm Rn exts w Rm Rn extu b Rm Rn extu w Rm Rn jmp Rn mov w Rm Rn mov w RO disp Rm mov w RO disp GBR mova disp PC RO movt Rn muls Rm Rn 46 jsr Rn Idc Rn GBR Idc Rn SR Idc Rn VBR Idc Rn GBR Idc Rn SR Idc Rn VBR Ids Rn MACH Ids Rn MACL Ids Rn PR del Rn MACH Ids Rn MACL Ids Rn PR mac w Rm Rn mov imm Rn shlr8 Rn sleep stc GBR Rn stc SR Rn stc VBR Rn stc l GBR Rn Renesas System Solutions Asia Pte Ltd mov b RO Rm Rn mov b Rm Rn mov b Rm Rn mov b RO disp Rm mov b RO disp GBR mov Rm disp Rn mov Rm RO Rn mov Rm Rn mov Rm Rn mov l disp Rn Rm mov l disp GBR RO mov l disp PC Rn mov l RO Rm Rn mov l Rm Rn mov l Rm Rn mov RO disp GBR mov w Rm RO Rn mov w Rm Rn mov w Rm Rn mov w disp Rm RO mov w disp GBR RO mov w disp PC Rn mov w RO0 Rm Rn mov w Rm Rn mulu Rm Rn neg Rm Rn negc Rm Rn nop not Rm Rn or imm RO or Rm Rn or b imm RO GBR rotcl Rn rotcr Rn rotl Rn rotr Rn rte rts
15. list i list k nn IIA gn III LAA LA AA CAC AAA nn IA 27 Renesas System Solutions Asia Pte Ltd break case AGE for i 0 listlil age 0 1 1 min list i age k i for j itl list j age 0 jtt if list j age lt min min list j age k 3 worklist list i list i list k list k worklist break case ID for i 0 listli idcode 0 itt min list i idcode k i for j atl y list j idcode 0 zs j if list j idcode lt min min list j idcode k 3 worklist list i list i list k list k worklist break 7 2 Execute HDI To run the HDI select Hitachi Debugging Interface under the Start Menu Programs Hitachi Debugging Interface menu or double click the Hitachi debugging interface icon Hitachi Debugging Interface Figure 7 1 HDI Application Icon 28 Renesas System Solutions Asia Pte Ltd LENESAS 7 2 1 Selecting the Target Platform The HDI can be extended to support multiple target platforms and if your system is set up for more than one platform you will first be prompted to choose a platform for the current session Select Platform ALE300H Emulator H8 3003 ALEJDOL Emulator CEVESHI Evaluation Board Figure 7 2 Select Platform e For this tutorial select LCEVBSH1 Evaluation Board and click OK to continue Note that you can change the target platform at any time by choosing Select
16. 29 31 31 A 0 21 33 33 35 CSO 35 3 CS1 37 39 CS2 39 41 CS3 41 43 43 45 45 PA 0 15 VCC VCC VCC PA 0 15 2 1 AVREF lt p 1 gt AVEC N PAS 1 3 E PA o Z 2 8 7 7 10 9 9 12 11 AVSS 11 PATO 14 13 13 DA 16 15 dies 15 DA 18 17 D 17 N PATS a PBU la DATI 22 21 DE 21 VA EE SS Ee a E zl ck gt u V T 31 PC 0 7 PEG 31 33 DP 33 35 gt UMI ER 35 WDTOVF gt 37 PB8 37 39 DBO 39 41 PBTO 42 41 pi Eu Tla as E La 3 a gt PB 0 15 Renesas System Solutions Asia Pte Ltd ingapore Engineering Center ize Document Number Rev A3 ASH1EVB001 Connectors 2 1 ebrua 0 Nednesda of G 60 Renesas System Solutions Asia Pte Ltd LENESAS Renesas Technology Asia Sales Offices URL http www renesas com Renesas System Solutions Asia Pte Ltd LCEVB SH1 LENESAS Renesas System Solutions Asia Pte Ltd
17. Ltd LENESAS using the HDI debugger e Speed buttons Provides convenient buttons as shortcuts for the most frequently used menu commands The Help Button is the short cut for Help ndex e Program Window Displays the source of the program being debugged Maximised Window in this case e Address The address column show the respective absolute address of the C code e Status Bar Displays the status of the LCVEB SH1 For example progress information about User Program downloads Execution etc 73 Setup the Debugging Environment Before downloading a program to the LCEVB SH1 you need to set up the user system for your application The Device type in LCEVB SH1 Configuration Dialog box needs to be setup This leads to Device Memory Mapping selection for the respective device automatically Take note that LCEVB SH1 is a common tool for current SH1 Series The configuration of this setup is for information during debugging To set up the target configuration choose Configure Platform from the Setup menu LCEYBSH1 Configuration Device r Mode Target A gone Clock 20 MHz r Help Driver LCEYBSH1 SERIAL Driver Change Figure 7 4 Target Configuration Dialog box e Setup the option as shown below e Click OK to change the target configuration Table 7 1 Target Configuration option 30 Renesas System Solutions Asia Pte Ltd LENESAS 7 4 Memory Mapping The next step is to open the Memory M
18. SH1 distinguishes between a power on reset and a manual reset by sampling the state of the NMI input when the RESET line goes high If NMI is high at this point a power on reset sequence is initiated internally and the SH1 is initialised throughout If NMI is low the manual reset sequence initiates the SH1 except the following e bus state controller e pin function controller e IO ports The LCEVB SH1 by default generates a power on reset when e power is applied into the system e reset pushbutton is depressed and released 24 NMI Circuitry The NMI input of the SH1 is an independent edge triggered input NMI may be generated on the positive or negative going transition depending on the setting of the Interrupt Control register ICR NMIE bit The LCEVB SH1 uses two NAND gates U3A and U3B as an inverter to de bounce the output of momentary pushbutton S2 ln the quiescent case the output of U3B and thus the SH1 NMI input is high Closing depressing S2 cause the NMI signal to go low until S2 is released The default value of ICR NMIE is 0 and NMI is generated when NMI goes low Multiple bounces of the switch on the normally open closure will have no further effect switches bounce on the active closure only and the NMI signal will stay low until S2 is released Since the quiescent state of NMI is high closing the reset pushbutton S1 always generates a power on reset In other words when the board is reset all SH1 internal circuitry
19. User Target Program SYSROF or Motorola S type format Save target program in Motorola S type format Save Session Memory Fixed User usable Emulation Memory Address H 0A000000 to functions H 0AOOFFFF Modifies and displays memory contents including memory mapped peripheral registers Dumps a range of memory contents Fills data with specified pattern Standard 64Kbyte high speed RAM for emulation Breakpoint e 20 PC breakpoints Single step e Performs simulated single step execution e Executes target program in step s Table 1 2 LCEVB SH1 Functions oj Renesas System Solutions Asia Pte Ltd LENESAS Section 2 Functional Description The LCEVB SH1 includes the following components SH1 SH7032 RISC Microcomputer Clock circuitry Reset circuitry NMI circuitry ROM memory RAM memory Serial interface LED driver External user interface Complete LCEVB SH1 schematics are provided as part of the LCEVB SH1 kit and are referenced throughout this chapter ZA SH1 RISC Microcomputer Because the SH1 SH7032 provides many on board functions required to implement an expanded memory micro controller system for example address area decoding the amount of glue logic required is minimized 2 2 Clock Circuitry The LCEVB SH1 may use one of two clock sources e AT cut parallel resonating system e Oscillator The SH1 is designed to operate with an AT cut parallel resonating crystal default clock source Y1
20. base 4000 ITU GRB1 0 ITU TCRO 0xA3 pe ITU ICNIO is Cleared by output compare match A Select internal clock 8 1 period 8 20 MHz 400 ns ITU TIORO 0x88 TA Select output compare operation with pin output disabled ITU GRAO 50000 50000 x 400 na 20 ms ITU TCR1 0x23 TCNT1 is cleared by GRA compare match ITU TSTR ITU TSTR 0x02 starts ITU TENTI exit trapa 0 int main j now required by compiler see release notes AA a EE EE ses EEN EE EEN EE ENEE ENEE ER ENEE EEN EE EE EES ee ee nm 94 Renesas System Solutions Asia Pte Ltd LENESAS Appendix D Schematic Diagram of Mini project 1 i Power Indicator Se DC MOTOR e OA f in Input Switches Buzzer PALER Connector to Evaluation Board ae UA Fa Cal Ie e E KN LI Far caca Indicator De coupling Renesas System Solutions Asia Pte Ltd Capacitor Deep By Um Up Sani Moker Ciro ry Moker TESI Board a 55 Renesas System Solutions Asia Pte Ltd Appendix E VCC OSCILLATOR CIRCUITRY oil O gt EXTAL Ol E Los OSC y1 uz N Ho o H x 20MHz RESET 2 C3 C4 VCC 22 pF 22 pF NMIL gt MD 0 2 U2 __ gt RESET EXTAL L_ gt vcc XTAL gt VCC di A 0 21 XK 1 10K NMI CIRCUITRY a J6 M t omentary 3 Ei o _ 7 gt nm 01 ae s2 74HC00 74HC00 VCC CONTROL R J7 e MDIO 2 Ol LO
21. could be faulty Verify that pins 2 and 3 of each end of cable are connected to each other respectively Is the target system drawing too much current User Target System connected is drawing to much current No P The fuse may have been blown due to mishandling such as shorting of VCC and Ground or drawing of too much current from target system Simply replace the 1A fuse located beside the main power switch Note Please investigates the cause before replacing the fuse Target system not working 1 Check User voltage e Running at LCEVB SH1 supply 5 Volt Target may be drawing too much current from the LCEVB SH1 Check the clock used to perform emulation e Only one of the on board clock source can be used at any one time 43 Renesas System Solutions Asia Pte Ltd LENESAS Appendix A Frequently Asked Questions This section contains a list of frequently asked questions about developing and evaluating programs using the LCEVB SH1 1 How dol write to the SH serial ports See the tutorial examples Refer to the also Appendix C 2 Why is RAM on the LCEVB SH1 at such a high address The LCEVB SH1 RAM starts at H A000000 Since the monitor must reside at O area 0 to provide for system boot up system RAM must be located somewhere else Areas 0 and 2 share internal wait state generation facilities so area 2 is a logical place for RAM Area 2 starts at location H 2000000 but to access It as word wide it must be addressed
22. fully understand its mechanism LCEVB SH1 Evaluation Board Throughout this document the term LCEVB SH1 shall be defined as the LCEVB SH1 emulation system produced only by Renesas System Solutions Asia Pte Ltd excluding all subsidiary products Purpose of LCEVB SH1 This emulation product is a software and hardware development tool for application systems employing the SH1 series microcomputer It should only be used for the above purpose Improvement Policy Renesas System Solutions Asia Pte Ltd hereafter collectively referred to as Renesas pursues a policy of continuing improvement in design performance and safety of the emulation products Renesas reserves the right to change wholly or partially the specifications design user s manual and other documentation at any time without notice Target User of the Emulation Product User of this emulation product should have carefully read and thoroughly understood the information and restrictions contained in the user s manual before using it Do not attempt to use the emulation product until you fully understand its mechanism It is highly recommended that users who know how to operate this emulation product give proper training to users who are not familiar with the operation of this product Renesas System Solutions Asia Pte Ltd www rss renesas com LENESAS LIMITED WARRANTY Renesas warrants its emulator products to be manufactured in accordance with published s
23. is set at that address 7 8 Executing User Target Program To run the program from reset e Choose Go Reset from the Run menu or click the Go Reset speed button in the toolbar Figure 7 13 Go Reset speed button The program will be executed up to the breakpoint you inserted and the statement will be highlighted in the program window to show that the program has halted 34 Renesas System Solutions Asia Pte Ltd Sig TUTORIAL C Address Break Code 0a004000 0a004006 0a00400a Da004012 0a004022 Da00402a 0a004032 OaOO403e Naoko Midori Rie Laj Eri Wi Kyoko W rer r h int count void sort main count 0 for sort sectionl NAME count count sort sectionl ID count void sort list key struct namelist list short key short_i ik k Figure 7 14 Program PC Break The message Break PC Breakpoint is displayed in the status bar to show the cause of the break You can also see the cause of the last break in the System Status window e Choose Status Window from the View menu or click the Status window button in the toolbar O E System Status Emulator Session Name Program Name Connected To CPU Mode Bun status Cause of last break Figure 7 15 Connected Status speed button C PROGRA 1 HITACH 1 SH1_TUT TUTORIAL hds C PROGRA 1 HITACH 1 SH1L_TUT TUTORIAL ABS LCEVESHI Evaluation Board LCE
24. now if you do not want to install the Hitachi Debugging Interface for LCEYBSH1 at this time Figure 5 1 Welcome Screen of HDI for LCEVB SH1 20 Renesas System Solutions Asia Pte Ltd LENESAS Click Next to proceed with the installation Read the update information for any important information concerning the installation Hitachi Debugging Interface for LCE BSH1 Installation HOI for LOEVBSH1 Version 1 01 nd Release November 1998 Enhancement RESET Button Handling for PC Breakpoint Bug fixed Session Loading Cancel Figure 5 2 Latest information on HDI for LCEVB SH1 Click Next to proceed Select which directory you wish to install HDI for LCEVB SH1 Hitachi Debugging Interface for LCEVESHI Installation Select Destination Directory Please select the directory where Hitachi Debugging Interface for LCEWBSHA1 files are to be installed Free Disk Space After Install is based on your current selection of files to install A negative number indicates that there is not enough disk space to install the application to the specified drive CA Hitachi Debugging Interface 16 Current Free Disk Space 13930080 k Free Disk Space After Install 1927615 k Figure 5 3 Selecting which Directory to install HDI for LCEVB SH1 Click Browse if you wish to change the default directory The default directory is C Program File Hitachi Debugging Interface 16 or specify an alternative directory and click OK Clic
25. r 51 APPENDIX D SCHEMATIC DIAGRAM OF MINI PROJECT ssssssssssssssssssssssssssesssssssesesesesescs 55 APPENDIX E SCHEMATIC DIAGRAM OF LCEVB SHI1 s essscssssccsssccsscccsscssssssesscsssscessscesss 56 RENESAS TECHNOLOGY ASIA SALES OFFICES Renesas System Solutions Asia Pte Ltd LENESAS Section 1 Introduction 11 Overview The SH1 Evaluation Board LCEVB SH1 is an inexpensive demonstration evaluation tool for the SH7000 family of RISC micro controllers It supports two members of the SH 1 family e SH7O020 Series SH7021 SH7020 e SH7032 Series SH7034 SH7032 Figure 1 1 shows the physical layout of the LCEVB SH1 system not drawn to scale
26. starting at H AOOOOOO 3 Can LCEVB SH1 RAM be accessed at a different address Why do have trouble with the RAM at H 200000 Conceptually memory that is in SH area 2 is addressable at both address H 2000000 and H A000000 The correct addressing considering the LCEVB SH1 s hardware memory configuration is starting at H A000000 The LCEVB SH1 RAM is word wide If you address it at H 2000000 you ll be telling the SH that it is byte wide In hardware terms for purely 8 bit accesses the SH signal LBS will never go low so half the RAM memory on the board will not be used 4 Why doesn t the monitor use SH on board RAM On board SH RAM is the fastest possible being accessible in 32 bit chunks without wait states Committing this RAM to the monitor might interfere with using this area for full speed benchmarks Since monitor source is included with the LCEVB SH1 kit users are free to allocate onboard RAM for this use 5 Why does the LCEVB SHI have word wide instead of byte wide RAM Word wide accesses are faster This choice was an inexpensive way of providing faster program execution 6 My program or the monitor is crashing randomly What might be wrong Check these possibilities e Check that your program isn t affecting the monitor RAM area Use the CMON status command to find the current limit of monitor RAM use Locate the code data and stack above that area e Check that there is actually RAM in the areas you are using e The m
27. this method to add a Watch on the variable count as follows e Click right mouse button in Watch window and choose Add Watch from the pop up menu Bee Etri FIE Delete Watch Add Watch OM Figure 7 30 Watch window Popup menu The Add Watch dialogue box appears Address Variable or expression section 6 Cancel Figure 7 31 Watch window Add Watch Dialog box e Type the Symbol Label to watch and click OK will show the similar display as shown in Figure 7 28 40 Renesas System Solutions Asia Pte Ltd LENESAS 712 Local Variable Watch Local Variable window is treated different from Watch window Content of Watch window is determinate by User while content of Local Variable window will only appear once User Target Program execution reach function that has variables within the scope of the function You can watch variables local in a function using the Local Variables window For example we will examine the local variables in the function sort e Open the Locals window by choosing Local Variable window from the View menu Note again that the Locals window will be empty if the local variable declarations have not yet been executed The Local Variable window will now show the local variables with their values once execution has reach the function sort EnnnnnnnnnNNNNNNNNNNNNNNMNNNNRNRNRNRRRRKHNYNYNYNYYNYYYYYMMMMMMMMMMMNNNNHNYNYYYYNYNYYYYYYY NN MMMMMMMMNMNNYNYNYNYNYNYNYNYNYNYNYNYNYYYYYYNMMMMMMMMMNYNYNYNYNY
28. 3 C Byte 1 Byte 2 Byte 0 Single float Figure 7 19 Register PC Edit Dialog box e Edit the value to H 0A004000 the starting address of the User Target Program and click OK The yellow highlighted bar will move to the new address in the program window Tutorial c to show current program counter value e Choose Go from the Run menu or click the Go speed button in the toolbar to execute up to the breakpoint again 36 Renesas System Solutions Asia Pte Ltd Figure 7 20 Go speed button 7 10 Reviewing PC Breakpoints You can see a list of all PC breakpoints set in the program in the Breakpoint window e Choose Breakpoint Window from the View menu or click the Breakpoint Window speed button in the toolbar Figure 7 21 Breakpoint window speed button The Breakpoint window also allows you to enable and disable individual breakpoint define new breakpoints and delete breakpoints Below shows the breakpoints set at several location besides address H 0A00401A previously set EE TUTORTAL 2 35 01004006 Program TUTORIAL EZT DAOODA01A TUTORIAL 41 04004032 TUTORIAL 045 _ DA O4OJE TUTORIAL 54 DAOODA404A Add Edit Delete Del All Disable Help 5 of 20 PC breakpoints in use Figure 7 22 Breakpoint window Note that Symbol is actual address location In another words valid Labels Symbols can be entered in the B Break Address entry Breakpoint E vent Properties General Type Address PC Break
29. 712 Watch Window As you step through a program It is useful to be able to watch the Variables content used change according in your program to verify that they change in the way that you expected For example set a watch on the structure variable section1 declared at the beginning of the program using the following procedure e Scroll up in the program window until you see the line main count 0 for sort sectionl NAME COUNEFF e Place the blinking cursor in the word section1 in the program window e Click on the right mouse button in the program window to display a pop up menu and choose Instant Watch Eopy Find Set Line Go To Cursor Set PC Here Toggle Break point Instant Watch Add Watch Source Mixed Assembler Add Match Figure 7 28 Instant Watch Dialog box e Click Add Watch to add the variable to the Watch window Note double click on the Symbols e g section with the at the left of Symbol Label will expand that Symbol Label further if it has finer detail 39 Renesas System Solutions Asia Pte Ltd Watch Window OF x sectionl Oxba004450 0 UxUa 4450 tname Eri age ZU ideode 9999 1 4 Ox0a004460 name Eyoko age Z ideode 3333 2 i Ux0a004470 3 0x04004480 4 0x040044 0 5 Ox0a0044a0 A Figure 7 29 Watch window You can also add a watch to the Watch window by specifying its name Use
30. Before reading this chapter e Setup the LCEVB SH1 and verify that it is communicating correctly with HDI e Make sure you are familiar with the architecture and instruction set of SH1 before continuing For more information refer to e SH1 SH2 Series Programming Manual e SH7034 or SH7021 Series Hardware Manual 7 1 1 Overview This Tutorial program is an infinite loop that sort elements based on NAME in the alphabetical order and AGE and ID in the ascending order It is a simple C program to illustrate the capabilities of LCEVB SH1 with simple C code 7 1 2 Compiling Assembling The Tutorial is provided on the installation disk as the file tutorial c A workable version of the Tutorial should be compiled at User Host PC by executing Tutorial bat this needs the Evaluation SuperH RISC engine C C Compiler Assembler Optimizing Linkage Edition refer to section 5 3 Note that the following files need customization e Tutorial bat e Tutorial sub Depending on the directory path where the Compiling Assembling Tools are installed the path of the respective files contains in these two files above need to be altered The final workable Tutorial should have ABS as its file extension Tutorial abs 7 1 3 How the Tutorial Program Works The first part of the program includes a series of header files include lt machine h gt i include CH38 INCLUDE string h 26 Renesas System Solutions Asia Pte Ltd LENESAS The progr
31. Break Address sort oe ov O me Figure 7 23 Breakpoint window Add Dialog box 37 Renesas System Solutions Asia Pte Ltd LENESAS Before proceeding remove the breakpoint as follows e Highlight move black highlight bar the breakpoint with address H 0A00401A and click Delete e Close the Breakpoint window 711 User Memory Monitoring You can monitor the behavior of User Target Program by e Examining content of the User memory e Displaying variables content used 7 11 1 Viewing User Memory You can view the contents of User Memory in the Memory window For example to view the memory corresponding to the array section in ASCII e Choose Memory Window from the View menu or click the Memory Window button in the toolbar Figure 7 24 Memory window speed button e Enter section1 in the Address field and set Format to ASCII Open Memory Window EN Address Format ASCII Space Figure 7 25 Memory window Open Dialog box e Click OK to open the Memory window showing the specified area OF MEMO ASCII Memory secioni Addresa Data 04004450 04004480 04004460 04004480 O4004510 04004540 DA004570 DA O45AO DA O45DO OA004600 DA O4 630 DA004660 DA O4 6590 Figure 7 26 Memory window in ASCII format start from address section1 38 Renesas System Solutions Asia Pte Ltd LENESAS e Leave the Memory window open so that you can monitor the contents of the array section1
32. H Series Hardware manuals in pdf format SH Series Evaluation software and manuals in pdf format Documents included in the package e 1x User Manual e 1x Packing list 1 2 2 Hardware Components The hardware components included in the package are listed below e 1x LCEVB SH1 System 4 x General User Cable 1x Serial cable 1x Power Supply Cable 5 x Board spacer amp Nuts Renesas System Solutions Asia Pte Ltd LENESAS 13 Specifications SPECIFICATION e SH7034 SH7032 SH7021 SH7022 Host PC PC AT i486 or above Microsoft Windows 3 x Window 95 One free serial port Approximately 4 Mbytes of free hard disk space Host Interface e RS232C Serial Communication e Baud rate 5 600bps e 160x160 x 25 mm Power supply e Power jet unregulated Input 7 5 9 VDC 1A requirement J11 set at 2 3 input to regulator Or e Direct DC regulated Input 5 VDC 1A J11 set at 1 2 bypass regulator Environmental e Operating Temperature 10 C to 35 C e Humidity 30 to 85 RH no condensation e Corrosive Gas None Table 1 1 LCEVB SH1 Specification 4 Renesas System Solutions Asia Pte Ltd LENESAS 14 Summary of LCEVB SHI Functions SPECIFICATION Emulation e Performs close to real time emulation of a target program e High level C debugging capability with SYSROF User Target Program Performs simulated single step execution Supports MCU frequency 20MHz Modifies and displays MCU registers Resets MCU Loads
33. It is not possible to support all configurations but there is provision for Jumpers providing some additional signals Active hardware control is not possible without additional hardware 15 Renesas System Solutions Asia Pte Ltd UCN1 No Name No Name 5 GND 6 ADO 7 GND 8 ADI 9 GND 10 AD2 UCN2 No Name No Name 5 GND 6 AS z enD 8 as 9 GND 140 At0 Table 2 7 LENESAS UCN3 No Name No Name 5 GND 6 PA6 7 GND 8 PA7 _ 9 GND 10 GND 31 GND 3 WW 33 vcc 34 J 39 _ GND 40 Al GND 42 43 GND 44 TI 45 GND 46 J 47 GND 48 _ 49 GND 50 UCN4 No Name No Name 5 GND 6 NoADC 7 o GND 8 NoADC 9 GND 10 NoADC SH7020 21 Connector Pinout 16 Renesas System Solutions Asia Pte Ltd UCN1 No Name No Name 5 GND 6 ADO 7 GND 8 AD1 9 GND 10 AD2 __ 47 GND 48 A4 UCN2 No Name No Name 5 GND 6 AS z ceno 8 as 9 GND 140 A DO Table 2 7 LENESAS UCN3 No Name No Name 5 GND 6 _ PA6 __ 7 _ GND 8 PA 9 GND 10 GND_ 31 GND 32 J _ 33 vc 4 J 39 _ GND 40 Al GND 42 J 43 GND 44 TI 45 GND 46 J 47 GND 48 49 GND 50 J UCN4 No Name No Name 5 GND 6 PC 7 GND 8 PO ___ 9 GND 10 PO3 SH7032 34 Connector Pinout 17 Renesas System Solutions Asia Pte Ltd LENESAS Section 4 Ha
34. NTO 0 starts counting from 0 ITU TSTR ITU TSTR 0x01 starts ITU TONTO for delay var 0 delay var lt count delay var while temp ITU TSRO 0x01 0 check for IMFA 1 ITU TSRO ITU TSRO amp 0xF8 IMFA flag 0 ITU TSTR ITU TSTR OxFE stop ITU TONTO return 0 Routine delay count Purpose generate a software delay in multiples of 20ms delay count int count int delay var ddd for add 4 7 dad l Count ddd for delay var 0 delay var lt delay constant delay var return 0 Routine INLE pOKES Purpose initialize Ports A and B Port Configuration a PALO TIOCAO b PBO lt gt PB6 output to drive 7 segment LED init ports PFC PACR1 0x0020 PA15 lt gt PAB except PALO general purpose I O PFC PACR2 0xBF55 PB7 lt gt PBO general purpose I O PEC PALOS OxFFFF BIS lt gt PBO all output PFC PBCR1 0x0000 PB15 lt gt PB8 general purpose I O PFC PBCR2 0x0000 PB7 lt gt PBO general purpose I O PFC EBLOR OxFFFF PB15 lt gt PBO all output ee ee ee ee Routine init timers Purpose initialize timers 0 amp 1 ee ee ee eee ee init tiners ITU TSNC 0x00 All channels to function independently ITU TMDR 0x82 TCNTO normal operation TCNT1 PWM operation ITU GRAl 4000
35. Ol tg J EZ 44 MODE ki SELECTOR yu Lo MDO d O Li E J 7 D1 GREEN LED Ne CONTROL PB 0 15 LED CIRCUITRY ES 470 74HC00 N N 79 76 g i 0 80 V 73 74 56 U1 SH7032 VCC VCC VCC VCC VCC VPP VCC VCC VCC RES A21 CS1 CASH ES2_ CS3 CASL PAO CS4 TIOCAO PA1 CS5 RAS PA2 CSGTICBO PA3 CS7 WAIT PA4 WRL WR PA5 WRH LBS PAG RD PAZIBACK PAS BREQ PAQ AH IRQOUT ADTRG PA10 DPL TIOCA1 PA11 DPH TIOCB1 PA12 IRQO DACKO TCLKA PA13 IRQ DREQO TCLKB PA14 IRQ2 DACK1 PA15 IRQ3 DREQ1 CK WDTOVF PCO ANO PC1 AN1 PC2 AN2 PC3 AN3 PC4 AN4 PC5 AN5 PC6 AN6 PC7 AN7 PBO TPO TIOCA2 PB1 TP1 TIOCB2 PB2 TP2 TIOCA3 PB3 TP3 TIOCB3 PB4 TP4 TIOCA4 PB5 TP5 TIOCB4 PB6 TP6 TOCXA4 TCLKC PB7 TP7 TOCXB4 TCLKD PB8 TP8 RXDO PB9 TP9 TXDO PB10 TP10 RXD1 PB11 TP11 TXD1 PB12 TP12 IRQ4 SCKO PB13 TP13 IRQ5 SCK1 PB14 TP14 IRQ6 PB15 TP15 IRQ7 Schematic Diagram of LCEVB SH1 LENESAS VCC 85 5 T 1 2 0 C1 La l o r lt _Javec 10uF 0 01uF i VCC gt ho 86 o EJ C5 S Or JAVREF 10uF e e J5 Pey 3 91 2 2 AVSS 1 toot La lt __ gt PC 0 7 87 PCO wy ER PB 0 15 97 PBO mo Pen 4 lt gt D 0 15 ot gt vlvivivivlivivlvlivivivivivivivie al DECOUPLING CIRCUIT VCC C8 C9 0 01uF 0 01uF enesas System Solutions Asia Pte Ltd ingapore Engineering Center Size Document Number A3 ASH1EVB001 CPU Renesas System
36. Platform from the Setup menu Note that if you have only one platform installed this menu option will not be available When the emulator has been successfully set up the HDI Desktop window will be displayed with the message Link up in the status bar ES Hitachi Debugging Interface TUTORIAL LCEVYBSH1 Evaluation Board TUTORIAL c Menu bar P File Edit View Run Setup Tools Window ia 08004006 0a00400a sort secltion1 NAME Da004012 count 0a00401a sort sectionl AGE Speed buttons 0004022 counti 0a00402a sort sectionl ID Help button 0004032 RECH ONE Da00403e void sort list key struct namelist list short key Program skue ick Window long min char name struct namelist worklist Da00404a switchi key case NAME 0a004060 for i 0 list i name 0 14 0a004068 name list i name Da004076 k i es for j itl list j name 0 j if stremp list j name name lt 0 Address 00402 name list j name 0a0040b0 k 3 Oa0040ca worklist list i Da0040e0 list i list k Oa0040fe list k worklist Oa00412a break case AGE Da00412e for i 0 listlil age 0 itt Status bar NUM SCRL Figure 7 3 HDI Application Code Window The key features of HDI are described in the following sections e Menus Give you access to the HDI commands for setting up the SH1 Evaluation Board and 29 Renesas System Solutions Asia Pte
37. Renesas System Solutions Asia Pte Ltd www rss renesas com LENESAS PREFACE This guide explains how to setup and use the LCEVB SH1 emulation system for the SH1 series of MCU Section 1 Section 2 Section 3 Section 4 Section 5 Section 6 Section 7 Section 8 Introduction Introduction of LCEVB SH1 system including its package specification and functions Functional Description Explain the functional blocks in LCEVB SH1 Board Options Configurable components in LCEVB SH1 Hardware Startup The necessary hardware installation to startup LCEVB SH1 Software Startup The software installation sequences LCEVB SH1 System Check General check diagnostic possible on LCEVB SH1 Tutorial Session Provides a step by step guide in using the LCEVB SH1 to perform emulation Troubleshooting Advises on some basic fault locating methods and commonly make mistakes Related Manuals e SuperH RISC engine C C Compiler Assembler Optimizing Linkage Editor User s Manual e SH7034 SH7032 Hardware Manual e SH7020 SH7021 Hardware Manual Renesas System Solutions Asia Pte Ltd LENESAS Table of Contents SECTION 1 INTRODUCTION estrada tante I ea SOE VOSS Sh 1 IN UME 82 SET as l 1 2 e SNOT FFTT7 qRy A e A 0009 EE 22 0020 E CEA 3 1 2 1 SO le E 3 1 2 2 Hardware Components castes ins EET Aa GA B eL ican da ia canes R LA DA os deh te aia aetna Rade 3 i Be RC IR TONS na to 4 14 SUMMARY OF LCE VB
38. Rm Rn exts b Rm Rn subc Rm Rn cmp gt Rm Rn exts w Rm Rn subv Rm Rn cmp hi Rm Rn extu b Rm Rn cmp hs Rm Rn extu w Rm Rn B 3 3 Logical and imm RO or imm RO xor imm RO and Rm Rn or Rm Rn xor Rm Rn and b imm RO GBR or b imm RO GBR xor b imm RO GBR not Rm Rn tas b Rn B 3 4 Shift Rotate rotl Rn shar Rn shlr Rn rotr Rn shll Rn shlr2 Rn rotcl Rn shll2 Rn shlr8 Rn rotcr Rn shll8 Rn shlr16 Rn shal Rn shll16 Rn B 3 5 Branches bf disp8 jmp Rn bt disp8 jsr Rn bra disp12 rts bsr disp12 48 Renesas System Solutions Asia Pte Ltd B 3 6 System Control Cirt Clrmac Ldc Rn GBR Idc Rn SR Idc Rn VBR Idc Rn GBR Idc Rn SR Idc Rn VBR Ids Rn MACH Ids Rn MACL Ids Rn PR delen MACH Ids Rn MACL Ids Rn PR nop rie sett sleep stc GBR Rn stc SR Rn stc VBR Rn stc l GBR Rn stc SR Rn stc VBR Rn 49 LENESAS sts MACH Rn sts MACL Rn sts PR Rn ste MACH Rn sts I MACL Rn sts PR Rn trapa imm tst imm RO tst Rm Rn tst b imm RO GBR Renesas System Solutions Asia Pte Ltd LENESAS Appendix C Mini project This section contains the schematic for a mini DC motor project that can be constructed and connected with the LCEVB SH1 The purpose of this project is to test the PWM function of the SH1 and also it s Input and output pin Also provided is the SH1 C program required to run it This C program can be compiled using the SuperH RISC eng
39. SH 1 FUNCTIONS css iria 5 SECTION 2 FUNCTIONAL DESCRIPTION cc cccecccecccecccccccccccccocccocccccccccoocccoccocccoccoccosccocccoccsocesecosecouss 6 Zo _ SI RISC MICROCONTROLLER spas Dako o E SEd KRO Kaa km ENS Ga oa ko kd 6 Oo eq eii GUU STT TTT TTRTTTTTRTRTTTTTTTTTTTT TTT 6 Za RESETOCRCU SS TF en TTT 7 2 3 4 EE 7 2 3 2 Reset and Non Maskable Interrupt ONAMII EEE EEE nn nn E EELS ELLER EERE EERE EERE 8 24 IM CIRCULE EE 8 1725 E EPROM RON EEN 9 O PII TRTFRTTTTTTTRT 9 Zal E AE EN CNN ON EET EA p TTERETRE 3 10 20 ERROR a iii 10 24 EXTERNAL USER INTERFACE EE 10 SECTION 3 BOARD OPTIONS ccceccccccccccccccccccccccccccccocccocccocccccooccooccoccvoccveceosecocccoceueceuecesecuoceseeueceueceus 12 A 12 3 1 1 Jumper JL and J2 Crystal Clock SOUT ce A AKA AK At KKG 13 3 1 2 Jumpers J3 J4 and J5 Analog Reference and Supply oooooononcnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnss 13 3 1 3 JUMP JOY A RETRE TTT MFpTPTOy E 7 xTRXRR EA 13 3 1 4 Jumpers J7 J8 and J Setting Operating Model 13 3 1 5 EE 14 3 1 6 Jumper ITE IDC FCF OF o ART 14 3 1 7 Jumpers J15 J16 J17 and J18 Serial Port Disconnects E 14 3 2 SERIAL PORT HARD WIRING OPTIONS ettr ts tetteste ttre e
40. Solutions Asia Pte Ltd D 0 15 lt __ gt A 0 21 2 CONTROL PPF gt O nt PAS LBS_N1 VCC PA4 WR PA6 RD PA4 WR PA6 RD 74CT32 74CT32 270512 HM62256 HM62256 EPROM SRAM SRAM VCC C13 0 01uF DECOUPLING CIRCUIT Renesas System Solutions Asia Pte Ltd Singapore Engineering Center Size Document Number Rev A3 ASH1EVB001 Memorys 1 0 D qa AD QO 57 Renesas System Solutions Asia Pte Ltd EXT POWER SUPPLY JP 1 1 2 Power Supply n Phono Jack DC Adapter F1 FUSE D3 1N4148 C14 100uF D2 AA RED LED 58 LENESAS VCC 1 w LM7805 VCC L VIN VOUT S Z O C15 C16 C17 0 1uF N 0 1uF 100uF Renesas System Solutions Asia Pte Ltd Singapore Engineering Center Size Document Number Rev A ASH1EVB001 Power Supply 2 1 D day Ap 00 of A Sheet Renesas System Solutions Asia Pte Ltd PB O 15 VCC G22 1uF DECOUPLING CIRCUIT VCC 1uF C18 C19 1uF C21 1uF MAX232A LO Renesas System SolutionsAsia Pte Ltd ingapore Engineering Center ize Document Number A ASH1EVBOO1 Serial Comms Sheet 99 Renesas System Solutions Asia Pte Ltd LENESAS VCC VCC PB 0 15 A 0 21 AD 0 15 PB15 1 1 3 3 S lt NA 1 N ADS 1 3 ADZ 11 11 ND 13 13 ADO 15 15 AD 17 17 N MN ADB A Le A J U 21 21 ie 25 25 N MA ADI NV V ADIZ 27
41. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry LENESAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website 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 he
42. VBSH1 SERIAL Driver aH7U34 Target Break PO Breakpoint Figure 7 16 Status window The Cause of last break line shows that the break was a Program PC Break 7 9 Examining Registers While the program is halted you can examine the contents of the MCU registers These are displayed in the Registers window e Choose Registers window from the View menu or click the Registers window speed button in the toolbar Figure 7 17 Register speed button 35 Renesas System Solutions Asia Pte Ltd DA O44A O OA0044 90 04004480 00000001 04004450 ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO ODOOOOOOO DA OOBOC 0A004014 O0000 T 00000000 00000000 00000000 00000000 0A004012 Figure 7 18 Register window As expected the value of the program counter PC is the same as the highlighted statement H 0A00401A Note that during the execution of User Target Program Emulation control is totally handed over to LCEVB SH1 hardware Thus HDI has lose all control of the LCEVB SH1 until it break by PC breakpoint or by pressing RESET NMI button where control is once again back with HDI You can also change the MCU registers from the Registers window For example to change the value of the PC e Double click PC in the Register window The Register PC Edit dialog box allows you to edit the value Register PC G Whole register High Word Low Word Cancel C Byte
43. Vcc Set externally J4 AVREF digital Vcc Set externally J5 Avcc digital Vss Set external J6 NMI Internal External J SH MD2 J8 SH MD1 Mode 0 Set according to table 4 2 J9 SH MDO J10 User LED PB15 drives LED PA15 drives LED J11 Power Direct Power supply Power jet Power supply DC adapter J12 Power Unregulated Power Supply power jet power supply JP1 Power Regulated Power Supply direct power supply TxD1 PB11 connected Do not connect Jumper if J15 e PB11 J16 RxD 1 PB10 connected e PB10 e PB9 J17 TxDO PB9 connected e PBS J18 RxDO PB8 connected deele lk Table 3 1 Jumper Settings and Options The following sections describe each jumper and its alternative settings 12 Renesas System Solutions Asia Pte Ltd LENESAS 3 1 1 Jumper Jl and J2 Crystal Clock Source The LCEVB SH1 comes with two types of clock source e AT cut parallel resonant crystal e TTL Can Crystal Either clock source may be used To make a selection simply make the necessary connection on jumper J1 and J2 The default crystal clock source is the AT cut parallel resonant crystal with J1 1 2 and J2 1 2 connected To use the TTL can crystal simply change connection to J1 2 3 and remove Jumper at J2 1 2 3 1 2 Jumpers J3 J4 and J5 Analog Reference and Supply As described in section 14 of the SH7032 and SH7034 RISC Hardware Manual the port C bits of the SH1 may be configured as analog inputs In this case reference voltages for analog signals beco
44. YNYYYNYNYNYNYYYYYY YM MMMMMMMMNMNNYNYNYNYNYYYYNYNYNYNYNYYYY NNN MMMMMMMMNMNNYNYNYNYNYNYYYNYNYNYYYYYYY YM MMMMMMMMMNNYNYNYNYNYNYYYNYNYNYNYNYYYYYYMMMMMMMMMMNNNYNYNYNYYNYYYNYNYNYNYYYYYY NM MMMMMMMMMNNYNYNYNYNYNYYNYYNYNYNYYYYYYNMMMMMMMMMMNNHYNYYNYNYYYNYNYNYNYYYYYY E EE EE ERR EE EE EE EE EE EE EE EE EE RER E EE EE EEN Locals list Ox0a004450 0x0a004450 name Eri 0 E 1 tr 2 3 4 5 6 7 age 20 ideode 9999 key O 1 0 j 17552 k 4560 min 167789728 worklist Ox0a000ae4 tname Hie LIK age 19 ideode 7777 Figure 7 32 Local Variable window e Double click the in front of the variable worklist in the Local Variable window to display the individual elements of the array worklist 7 13 Stepping User Target Program LCEVB SH1 provides a range of options for single stepping through a program executing an instruction or statement at a time The stepping commands is listed below Step In Executes every statement including statements within functions Allows you to step repeatedly at a specified rate Table 7 4 Single Step Command 7 13 1 Single Step Single step by selecting Step In in Run menu or click on the Step in speed button at the Toolbar e Figure 7 33 Step in speed button 41 Renesas System Solutions Asia Pte Ltd LENESAS e Observe that the PC Register window is incremented each time the Step in speed button is clicked The PC al
45. am then gives prototypes for the constants structures and function initial values define NAME short 0 define AGE short 1 define ID short 2 define LENGTH 8 struct namelist A char name LENGTH short age long idcode be struct namelist sectionl Naoko 17 1234 Midori 22 8888 Rie 19 7777 Eri 20 9999 Kyoko 26 3333 wy j 0 A 0 y nt counti void sorti gumrmsmsrmrmrmtsmrmrmrmnrmrmrmrgnrmrmegrnmssssrsrstsrarastsrsrssssrarsrarrsrsrssasrsrssmsssrsssrmsrssmsssssmsssstsmrssssssssssssrssrsssrsrsmesrsrszssrsrarasrsrsrssssrsrssasrsrssssssrsrsszsssssszssssmsssstsssssssstsmssssrssrsssrsrarsstsrsrssrsrsrasrsrsrssssrsrssmsssrssmrssrsrmssssssmrzsstsssssssssssssssssssssrsrsmestsrsssstsrsrasssrsrssssrsrssasrsrssssssrssmsssssrmsmsssrmssssssssmrssstsmrssstssssssrsrsssstsrsrssrsrsrastsrsrsrasrsrssssssrsrssssrsssssrssstszsstssmsssstsmsssstsmsssurgrszsstsssrsursrsrsmtsssrmrssrmrssssssrsrmsrsrsssszisas main count 0 for sort sectionl NAME count sort sectionl AGE count sort sectionl ID counti void sort list key struct namelist list Short key short i J K long min char name struct namelist worklist Switch key case NAME for i 0 list i name 0 itt name list i name k 15 for j itl list j name 0 jtt if strcemp list j name name lt 0 name list j name k 3 worklist list i
46. apping Window select View then Memory Mapping Window Alternatively click on the Mapping Speed button VrEEEEEEEEEEEERR RRE EEEEEEERREEEEEEE EE EE EE ERR ERR EE EE ERR E EE EE EE EE EE EE EE EE ERR EE EE EE ERR EE EE EE EE EE EE EE EE ERR E EE EE EE ERR EE EE EE EE EE EE EE EE ERR E EE EE ERR EEEEEEEEEEEEEEEEEEEEEEE EE EE ERR EEEEEEEEEEEEEEEEEEEE EE EE EE ERR EE EE EE EE EE EE E EE ERR EEEE EE EE ERR EEEEEEEEEEEEEEEEEEE E EE E EE EE EE EEEEEEEEEEEEEEEEEEEE EE EE ERR EE EE EE EE EE EE EE EE ERR E E EE EE EE EE EE EE EE EE EE EE EE EE ERR E EE E EE EE RR D Figure 7 5 Memory Mapping window Icon The Memory Mapping window shown in the following figure is displayed VrEEEEEEEEEEEERR RRE EEEEEEERREEEEEEE E EE EEEEEEEE RRE EE EE ERR E EE EE EE EEEEEEEEEEEE EE EE EE ERR EE EE EE EE EE EE EE EE ERR E EE EE EE ERR EE EE EE EE EE EE EE EE ERR E E EE EE ERR EEEEEEEEEEEEEEEEEEEEEEE EE EE ERR EE EE EE EE EE EE EE EE EE EE EE EE ERR EE EE EE EE EE EE EE EE ERR EE EE EE EE EE EEEEEEEEEEEEEEEEEEEEE EE EE ERR EE EE EE EE EE EE EE EE ERR EEE EE EE EE EE EE EE EE EE EE EE EE ERR EE E EE EE EEE EE EE EE EE EE E EE EE EE RER E EE EE ERR Memory Mapping From To Mapping Target Device Configuration 00000000 05000000 02000000 04000000 04010000 DFOOOOOO DAFFEFEFE DBFFFFEF KIC DADOFFEFE DEFFFFEFF DFFFFFEFF User Rsad write On Chip Read write User Read write On Chip Read write User Read write On Chip Read write 05000000 05FFFFFF Internal IO DEOOOOOO
47. as 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 Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below 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 categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics 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 an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office equip
48. ating mode of the SH processor Is set at device initialization time by the settings of the three mode inputs MDO MD1 and MD2 These settings should not be changed while the SH1 is running Table 4 2 lists jumper settings for these modes Leaving any of these jumpers open is not recommended Settings not shown in table 4 2 are currently undefined 13 Renesas System Solutions Asia Pte Ltd LENESAS o 3 t2 1 2 Memory area 0 is 8 bit Memory area 0 is 16 bit Not supported Memory area 0 is on chip SH7034 only EPROM programming Not supported Table 3 2 Operating Mode Settings 3 1 5 Jumper J10 LED Indicator Source LED D1 Green LED may be driven by SH1 port signal PA15 by setting J10 2 3 or PB15 by setting J10 1 2 The default source is PB15 If these two sources is allocated for other use remove the jumper at J10 3 1 6 Jumper J11 DC Regulator Bypass Jumper J11 selects the use of on board DC Regulator If Unregulated Power input is used through Connector J12 Jumper J11 setting to 2 3 enables the regulator to regulate a usable voltage of 5VDC for LCEVB SH1 Either if connector JP1 is used to used to provide direct power supply of regulated 5VDC to LCEVB SH1 Jumper J11 setting should be at 1 2 bypass the on board regulator 3 1 6 1 Connector J12 Power jet Connector General power jet connector allowing unregulated power gt 7 5V to be supplied to LCEVB SH1 Note that if this type of power supply is selecte
49. d over the direct power supply regulated to JP1 J11 should be set to 2 3 3 1 6 2 Connector JP1 Direct Power Connector Direct regulated Power supplying 5VDC to LCEVB SH1 Note that J11 should be set to 1 2 3 1 7 Jumpers J15 J16 J17 and J18 Serial Port Disconnects UART1 is dedicated by default to the Firmware Monitor UARTO is unassigned and usable by User Target System The port pins TxDO RxDO and TxD1 and RxD1 associated with transmitting and receiving data for both UARTs are connected to a serial transceiver device In some applications it may be necessary to use some or all of these pins for another purpose in which case the connections of these port pins to the transceiver device should normally be disconnected These jumpers may be left open because the logic inputs of the MAX232 transceivers are internally pulled up weakly to Vcc Alternate devices may not include these pull ups To free PB8 remove Jumper at J18 1 2 To free PB9 remove Jumper at J17 1 2 To free PB10 remove Jumper at J16 1 2 To free PB11 remove Jumper at J15 1 2 This will normally disable serial communications between the LCEVB SH1 and its host 14 Renesas System Solutions Asia Pte Ltd LENESAS 32 Serial Port Hard wiring Options As supplied the LCEVB SH1 supports three wire serial communication No direct provision is made for additional handshaking signals that may be required by host computers or terminals in some configurations
50. ded the dialogue box shown in the following figure displays information about the memory areas that have been filled with the program code HDI 1 Areas loaded 24004000 04004751 04004754 04004210 04004220 04004039 O40042C0 08004440 24004450 0400444 i Module name C APROGRA1SHITACH 155H1_TUTSTUTORIAL ABS Default Start Address is set to 04004000 Figure 7 9 User Target Program downloaded Information Note that all the code lies within the on chip ROM e Click OK to continue 32 Renesas System Solutions Asia Pte Ltd LENESAS 7 6 Displaying User Target Program code HDI allows you to debug a program at source level so that you can see a listing of the program alongside the disassembled code as you debug To do this you need to read in a copy of the source program from which the object file was compiled e Choose Program Window from the View menu or click the Program window button in the toolbar You will be prompted for the C source file corresponding to the object file you have loaded Open Program Window Ea File Hame Directories c progra 1 hita sh1_tut tutorial c E c 4 CH progra i y hitach 1 3 shl tut List Files of Type Drives Ic Source Files fc sl E c disk 1 Address Open on fo C Address Source TUTORIAL C Address Break Code Midori 22 Rie 19 Eri 20 Kyoko 26 g 0 I int count void sort main 0a004006 fo
51. e reproduced or duplicated in any form in hardcopy or machine readable form by any means available without Renesas s prior written consent Other Important Things to Keep in Mind 1 Circuitry and other examples described herein are meant merely to indicate the characteristics and performance of Renesas Technology s semiconductor products Renesas assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein 2 No license is granted by implication or otherwise under any patents or other rights of any third party or Renesas 3 MEDICAL APPLICATIONS Renesas Technology s products are not authorized for use in MEDICAL APPLICATIONS without the written consent of the appropriate officer of Renesas Technology Asia Sales company Such use includes but is not limited to use in life support systems Buyers of Renesas Technology s products are requested to notify the relevant Renesas Technology Asia Sales offices when planning to use the products in MEDICAL APPLICATIONS Figures Some figures in this user s manual may show items different from your actual system Limited Anticipation of Danger Renesas cannot anticipate every possible circumstance that might involve a potential hazard The warnings in this user s manual and on the emulator product are therefore not all inclusive Therefore you must use the emulator product safely at your own risk
52. en will be displayed as shown below Ki Hitachi Debugging Interface LCEYBSH1 Evaluation Board File Edit View Run Setup Tools Window Help ese iala casado EEE 2 Figure 6 2 HDI startup Desktop Perform the Diagnostic test by selecting View Diagnostic Window to verify the LCEVB SH1 functionality 24 Renesas System Solutions Asia Pte Ltd System Diagnostic Memory Test PASSED M Port B LED Test PASSED M Checksum Test PASSED Number of Checksum Passes H 4662 Figure 6 3 Diagnostic Window The test performed above will cover certain features functions of LCEVB SH1 l Memory Test Emulation Memory accessible 2 Port_B LED Test Inter active test with User observing the blinking of Green LED oi Checksum Test Ensure that the Firmware Monitor used is correct Note that performing Diagnostic will cause the HDI to restart Thus never perform Diagnostic Test in between Emulation process as Emulation Memory content will be erased 25 Renesas System Solutions Asia Pte Ltd LENESAS Section 7 Tutorial Session 71 Introduction The following describes a sample debugging session designed to introduce the main features of the LCEVB SH1 Evaluation Board used in conjunction with the Hitachi debugging interface HDI software The tutorial is designed to run on the Emulation memory so that it can be used without connecting the LCEVB SH1 to an external user system The tutorial is based on a simple C program
53. entium standard PC running DOS 5 0 or higher with Windows 3 x or higher Memory of at least 8Mbytes is highly recommended CD ROM drive is required since the supplementary tools and tutorials are distributed on CD ROM Standard serial port must be available on host computer for communication with the LCEVB SH1 system Harddisk is required at least 6Mbyte of free space The supplementary tools and tutorials files require a trivial amount of hard disk space Text editor capable of editing program source files without inserting non printing characters in the file An ASCII editor such as EDIT is acceptable SuperH RISC engine C C Compiler Assembler Optimizing Linkage Editor Evaluation copy of these tools is available in the distribution CD ROM 5 2 HDI Installation Install the HDI software from the CD ROM is as follows Startup Windows if it is not already running Close all other applications that are running Insert Installation CD ROM into CD ROM Drive Click or Double click on the CD ROM Drive to view the content of the CD ROM Click or Double click on the folder HD 116 to view its content Execute LSH1 101 EXE by clicking or Double clicking The following Welcome Screen will be displayed Hitachi Debugging Interface for LCEVBSHI Installation Weicome This installation program will install the Hitachi Debugging Interface for LCEVBSH1 Press the Next button to start the installation You can press the Exit Setup button
54. ia Pte Ltd www rss renesas com LENESAS State Law Some states do not allow the exclusion or limitation of implied warranty or liability for incidental or consequential damages so the above limitation or exclusion may not apply to you This warranty gives you specific legal rights and you may have other rights which may varies from state to state The Warranty is Void in the Following Cases Renesas shall have no liability or legal responsibility for any problems caused by misuse abuse misapplication neglect improper handling installation repair or modifications of the emulator product without Renesas s prior written consent or any problems caused by the user system Restrictions 1 Earthing applies only to manual for Renesas hardware products This hardware is designed for use with equipment that is fully earthed Ensure that all equipments used are appropriately earthed Failure to do so could lead to danger for the operator or damaged to equipments 2 Electrostatic Discharge Precautions applies only to manuals for Renesas hardware products This hardware contains devices that are sensitive to electrostatic discharge Ensure appropriate precautions are observed during handling and accessing connections Failure to do so could result in damage to the equipment All Right Reserved This user s manual and emulator product are copyrighted and all rights are reserved by Renesas No part of this user s manual all or part any b
55. ine C C Compiler Assembler Optimizing Linkage Editor The Object file will then have to be converted to S record using the H series Linker and the S record converter before it can be downloaded to the LCEVB SH1 When invoking the Linker please take note that user program can only start at H A004000 Thus it is required to specified the start address of the program section The C source program of the Motor control can be found in project directory C1 Bill of Material Push Button switch normally 02 open 7 segment Display Common anode e Resistor 3300 e 4700 e 1 2KQ e 3 9KQ e 22KO GapaotorOjwr luo e Transistor 2N2222A e BC131 e LED RED e GREEN 01 Table E 1 Bill of Material for Mini Project C2 Operation The program starts out by displaying 1 to 10 on the 7 segment display After which depressing S10 will increment the 7 segment display by 1 to a maximum of 5 and depressing S11 will decrement the display by 1 to a minimum of O Respectively the duty cycle of the PWM driving the motor will increase or decrease by 1 starting from 4 to a maximum of 8 corresponding to the value displayed Depressing both S10 and S11 causes motor to stop 50 Renesas System Solutions Asia Pte Ltd C 3 Software Listing a EE Eeer Ee Program Name motor c Date 20 Mar 97 EHhEO e x include lt machine h gt include lt iosh7030 h gt ee ee ee ee eee ee Consta
56. is normally affected It is possible to generate a manual reset leaving the bus state controller pin function controller and I O port values untouched with the following sequence 1 Close the reset switch S1 putting the SH1 into reset state 2 Close the NMI switch S2 generating a negative going edge on NMI which is ignored 3 Release the reset switch S1 starting the SH with NMI low 4 Release the NMI switch S2 returning NMI to its base state Alternatively external connections can be used to affect the NMI signal if jumper J6 is changed from its default Jumper setting Assignment J6 setting 1 2 Internal usage 2 3 External usage to S2 default Table 2 4 Jumper J6 setting 8 Renesas System Solutions Asia Pte Ltd LENESAS 2 5 EPROM ROM The LCEVB SH1 s EPROM ROM memory is provided by U4 which is configured to contain 64k x 8 27 C 512 family device Below shows the memory map H 00 000 000 64K x 8 EPROM ROM 27C512 H 00 00F FFF H 04 000 000 64K x 8 SRAM 62256 H OA 00F FFF Figure 2 3 LCEVB SH1 Memory Map In either case the EPROM ROM is located in area 0 of the SH1 memory space starting at location 0 U4 is always accessed a byte at a time The memory area select signal CSO is generated by the SH1 and is sufficient to select either device The value of SH1 wait state control register 3 WCR3 bits AO2LW1 and AO2LWO control the number of wait states automaticall
57. k Next to proceed 21 Renesas System Solutions Asia Pte Ltd Hitachi Debugging Interface for LCE BSH1 Installation Select Destination Directory Please select the directory where Hitachi Debugging Interface for L EWESHI files are to be installed Free Disk Space After Install is based on your current selection of files to install A negative number indicates that there ls not enough disk space to install the application to the specified drive EA Hitachi Debugging Interface 16 Current Free Disk Space 13930080 k Free Disk Space Alter Install 1927615 k Cancel Figure 5 4 Selecting which Group the HDI application should place its Icon e The Program Group is where icons for HDI application will be The default Program Group ProgMan Group is Hitachi Debugging Interface 16 e Click Next to proceed e Click Next in the Ready to Install Dialog box to start installation The installation will then copies the necessary HDI for LCEVB SH1 files into the specified directory Installing Copying file C Program Files Hitachi Debugging Interface 156 Hdi exe 39 Figure 5 5 Installation Progress Finally icons for HDI will be created into the Program Group specified earlier The installer creates the following icons in the program group Start Menu Programs you specified by default HDI Hitachi Uninstall Debugging Hitachi Interface Debugging Interface Figure 5 6 HDI Icons 22 Renesas System Solu
58. me important The default settings of these three jumpers route on board digital references and the digital Vcc to the SH1 analog subsystem For demonstration purposes this configuration may be sufficient However to demonstrate the full capabilities of the SH1 analog subsystem as well as to reduce noise in the analog subsystem it may be desirable to use external sources for some or all of these signals The recommended noise suppression capacitors are provided on reference circuits as recommended by the hardware manual section 14 7 2 If an external analog Vcc AVcc is provided to the SH1 on Header 4 Pin 1 set J3 2 3 If an external analog reference voltage Vref is provided to the SH on Header 4 Pin 2 set J3 2 3 If an external analog ground AVss is provided to the SH on Header 4 Pin 12 set J5 2 3 Leaving any of these jumpers open is not recommended 3 1 3 Jumper J6 NMI Default 1 2 Setting The SH NMI input is controlled by the set reset flip flop de bounce circuitry implemented with AND gates U3A and U3B schematic diagram Alternate 2 3 Setting The SH1 NMI input is controlled by an external signal on board pull up is provided Open Setting Not recommended The SH1 NMI signal should be driven in most conditions Failure to do so may cause the board to operate erratically 3 1 4 Jumpers J7 J8 and J9 Setting Operating Mode As described in section 3 of the SH7032 and SH7034 RISC Hardware Manual the oper
59. ment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life 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 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 certai
60. n 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 system manufactured by you 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 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics
61. nalog signals isolated The external user interface consists of 4 two row connectors of 50 pins each 10 Renesas System Solutions Asia Pte Ltd LENESAS e SH data lines DO D15 UCN1 e SH Port B lines PB14 8 PB15 e SH address lines A0 A5 e SH address lines A6 A21 e CS0 CS3 e SH1 Port A lines PAO PA3 SH Port B lines PBO PB13 SH Port C lines PCO PC7 AVCC AVREF Table 2 6 External User Interface pin assignment Note Each of these external user interface connectors includes Vcc normally at 5 V Trivial external circuitry may use Vcc from the LCEVB SH1 External circuits drawing gt 50mA at 5V should be powered by an independent power supply Note the positioning of pin 1 on each connector The pins are numbered odd even as shown below Figure 2 4 User External Interface Connector Configuration 11 Renesas System Solutions Asia Pte Ltd LENESAS Section 3 Board Options The LCEVB SH1 provides a number of user settable optional configurations All of these are chosen by jumper settings 31 Jumpers LCEVB SH1 jumpers allow User to configure the board as required for evaluation For simplicity all jumpers are e three pin header or e two pin header In each case the default jumper setting is pin 1 to pin 2 1 2 For most LCEVB SH1 uses these settings need not be changed Jn Use Default 1 2 Alternate 2 3 J1 TTL XTAL XTAL Resonating J2 Selection XTAL No connection J3 AvCC digital
62. ng and it s likely that the garbage following the BRA caused the problem You ll crash somehow possibly generating an exception and a message like INVALID INSTRUCTION or INVALID SLOT or CPU BUS ERROR A full discussion of this subject is beyond the scope of this manual An excellent rule of thumb is when in doubt follow all branches with innocuous instructions such as NOPs 13 My benchmark shows that the SH doesn t run as fast as I think it should Why For maximum flexibility CMON accepts the default setting of WCR3 that is the LCEVB SH1 automatically inserts 4 wait states into area 0 and area 2 accesses This will certainly make the SH run slower You can adjust the value of the AO2LW1 and AO2LWO bits in WCR3 consistent with the operating speed of the SH processor and the memory currently installed 45 Renesas System Solutions Asia Pte Ltd LENESAS Appendix B Assembler Commands This appendix lists assembler command syntax sorted according to different categories and types B 1 Legend Table B 1 lists command syntax abbreviations and their meanings Abbreviation Rn Meaning A numbered register Rm Another numbered register Hmm Disp Immediate data Displacement disp8 8 bit displacement disp12 12 bit displacement Table B 1 Command Syntax Abbreviations B 2 Commands Sorted Alphabetically Available assembler instruction listing add imm Rn add Rm Rn addc Rm Rn
63. nts m J o 7 define delay constant 80160 delay of 0 1 sec unsigned char display table 11 0x40 0x79 0x24 0x30 0x19 0x12 0x02 0x78 0x00 0x18 0x7F unsigned short pwm table 11 0 160 200 240 280 320 0 4 5 6 7 8 EE Global Variables EE EE unsigned char motor speed 0 motor speed unsigned char past motor speed 0 previous motor speed main main program d init ports init timers count while 1 infinite loop get data out motor End Main JE eee A Routine out motor Purpose output to motor Note kick starts stationary motor m m out motor if past motor speed 0 amp amp motor speed 1 d ITU GRBI 6007 kick starts delay20ms ITU GRB1 pwm table motor speed o p to motor ee e 51 Renesas System Solutions Asia Pte Ltd Routine get data Purpose read PCO PCI using software debouncing unsigned char temp templ temp2 unsigned char stable 1 while stable temp PCDR 0x03 delay20ms templ PCDR amp 0x03 delay20ms temp2 PCDR amp 0x03 if temp templ amp amp templ temp2 amp amp temp 0x03 stable 0 beep past motor speed motor speed update past mo
64. onitor may work erratically if RAM is unavailable or only partly available that is if one or both RAM ICs are not correctly plugged into the board e Make sure your power supply is more than sufficient for the needs of the LCEVB SH1 Power supplies operating at or near their limits can sometimes cause programs to operate strangely e Make sure that the stack pointer R15 is pointing to RAM A simple way of doing this is to reset the monitor 7 How can I time my benchmarks Every benchmark is different One approach is to use an I O bit for example by setting it low upon entering the code of interest and high again when leaving 44 Renesas System Solutions Asia Pte Ltd LENESAS 8 When must I use HINT and when can I use say PROCOMM with CMON The only time you must use HINT is when you want to use the Save SV command Most users won t have any reason to upload an s record representation of an LCEVB SH1 memory region to a host computer so this should be no problem Otherwise for all commands you can use almost any terminal emulator 9 So what s the problem with using Save SV and if that s a problem how does Load work The problem is specifying a filename on the host computer Barring the use of a full blown protocol like ZMODEM there s no standard way that CMON can inform the host of what file name to use for the data There is one somewhat awkward way of using SV with any terminal emulator but this requi
65. pecifications and free from defects in material and or workmanship Renesas at its option will repair or replace any emulator products returned intact to the factory transportation charges prepaid which Renesas upon inspection shall determine to be defective in material and or workmanship The foregoing shall constitute the sole remedy for any breach of Renesas warranty See the Renesas warranty booklet for details on the warranty period This warranty extends only to you the original Purchaser It 1s not transferable to anyone who subsequently purchases the emulator product from you Renesas is not liable for any claim made by a third party or made by you for a third party DISCLAIMER RENESAS MAKES NO WARRANTIES EITHER EXPRESS OR IMPLED ORAL OR WRITTEN EXCEPT AS PROVIDED HEREIN INCLUDING WITHOUT LIMITATION THEREOF WARRANTIES AS TO MARKETABILITY MECRCHANTABILITY FITNESS FOR ANY PARTICULAR PURPOSE OR USE OR AGAINST INFRINGEMENT OF ANY PATENT IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY NATURE OR LOSSES OR EXPENSES RESULTING FROM ANY DEFECTIVE EMULATOR PRODUCT THE USE OF ANY EMULATOR PRODUCT OR TIS DOCUMENTATION EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES EXCEPT AS EXPRESSLY STATED OTHERWISE IN THIS WARRANTY THIS EMULATOR PRODUCT IS SOLD AS IS AND YOU MUST ASSUME ALL RISK FOR THE USE AND RESULTS OBTAINED FROM THE EMULATOR PRODUCT Renesas System Solutions As
66. 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 majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics LENESAS Microcomputer Development Environment System C V D n V LU C D 2003 4 Renesas System Solutions Asia Pte Ltd j www rss renesas com LENESAS Microcomputer Development Environment System LCEVB SH1 SH1 Evaluation Board User s Manual Renesas System Solutions Asia Pte Ltd www rss renesas com LCEVB SH1 SH1 Series Low cost Evaluation Board User s Manual Published by Renesas System Solutions Asia Pte Ltd Date April 1 2003 Version 1 0 Copyright c Renesas System Solutions Asia Pte Ltd All rights reserved Trademarks a General All brands or product names in this manual are trademarks or registered trademarks of their respective companies or organisation b Specific Microsoft MS DOS is registered trademark MS Windows is a trademark of Microsoft Corporation Pentium is a registered trademark of Intel Renesas System Solutions Asia Pte Ltd www rss renesas com LENESAS IMPORTANT INFORMATION e READ this user s manual before using this product e KEEP the user s manual handy for future reference Do not attempt to use this product until you
67. r 5 14 OQaOO40OOa sort sectionl NAME Oa 4012 count Da00401a sort sectionl AGE 04004022 count OaOO402a sort sectionl ID 0a004032 count OQaOO403e void sort list key struct namelist list short key short i j k lona mim Figure 7 11 User Target Program Source Code window e f necessary choose Font option from the Customise submenu on the Setup menu to choose a font and size suitable for your computer 33 Renesas System Solutions Asia Pte Ltd LENESAS 7 7 Using Breakpoint PC Breakpoint The simplest debugging aid is the PC breakpoint Program breakpoint which lets you halt execution when a particular point in the program is reached You can then examine the state of the MCU and memory at that point in the program 7 7 1 Setting PC Breakpoint The program window provides a very simple way of setting a PC breakpoint For example set a breakpoint at address H 0A00401A as follows e Double click in the Break column on the line containing address H 0A00401A Address Break Code Naoko or C i 0a00400a sort sectionl NAME Da004012 count OaOO401a Break sort sectionl AGE Da004022 count Da00402a sort sectionl ID Da004032 count void sort list key struct namelist list short key short 1 3 k Figure 7 12 Setting a PC Breakpoint The word Break at the Break column will be displayed there to show that a program breakpoint
68. rdware Startup 4 1 Installing the LCEVB SH1 Board Installing the LCEVB SH1 requires connecting the following e Serial communication cable to Host PC e Power supply 4 2 Serial Communication Connection Plug in the Serial Communication Cable provided to LCEVB SH1 and the Host PC Serial Communication Port usually at the rear of the PC LCEVB SH1 System support the following Ports COM1 COM2 COM3 COM4 LCEVB SH1 System will auto detect the correct Port connection at HDI Interface software startup Ensure that Host PC is off when you are making the connection 43 Power Supply Connection Two type of Power supplies can be used on LCEVB SH1 they are e Direct Power Supply e Power jet Power Supply To select between Direct Power Supply or Power jet Power Supply simply change the connection at Jumper J11 Jumper J11 1 2 is the default setting at shipment using direct power supply of 5VDC The connection should not be left open Jumper setting J11 1 2 Direct power supply of 5VDC regulated default 2 3 Power jet power supply of gt 7 5VDC unregulated Table 4 1 Jumper J11 setting 18 Renesas System Solutions Asia Pte Ltd LENESAS 4 3 1 Direct Power Supply The LCEVB SH1 hardware uses a direct power supply of 5VDC 100mA injecting into JP1 with J11 jumper set to 1 2 bypass regulator
69. reby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part 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 When exporting the 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 You should not use Renesas Electronics products or the 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 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 Renesas Electronics has used reasonable care in preparing the information included in this document but Renes
70. res you to start up your terminal emulator s ASCII capture before invoking SV in CMON You ll undoubtedly have to enter a file name Load works smoothly because you can invoke the L command in CMON then start up your emulator s ASCII download facility 10 Besides that why use HINT It would be very difficult to document setups for using CMON with every terminal emulator commonly used By supplying an easy to use baseline terminal emulator we can ask you What happens when you use HINT rather than trying to figure out your terminal emulator setup 11 Does an application program need to establish its own stack for proper operation on the LCEVB SH1 Trivial programs don t There s room on the monitor stack for user programs and we ve used simple programs without declaring a distinct user stack but we d prefer that you establish your own stack See the tutorials for examples 12 I just entered a very simple program loop using the CMON assembler and it crashed for no reason I can see What s going on If your program ends with a branch and there s garbage in memory following the branch you ve likely found an often misunderstood SH feature delayed branches In order to be as efficient as possible in the case of some program branches the instruction following the branch is also executed even if the branch is taken The BRA instruction is one of these If you write a simple loop it is likely to end with a BRA back to beginni
71. sett shal Rn shar Rn shll Rn shll16 Rn shll2 Rn shll8 Rn shlr Rn shlr16 Rn shlr2 Rn BA Commands Sorted by Type B 3 1 Data Transfer mov imm Rn mov Rm Rn mov b Rm RO Rn mov b Rm Rn mov b Rm Rn mov b disp Rm RO mov b disp GBR RO mov b RO Rm Rn mov b Rm Rn mov b Rm Rn mov b RO disp Rm mov b RO disp GBR mov Rm disp Rn mov l Rm RO Rn mov Rm Rn mov Rm Rn mov l disp Rn Rm mov l disp GBR RO mov l disp PC Rn mov l RO Rm Rn mov l Rm Rn mov Rm Rn mov RO disp GBR mov w Rm RO Rn mov w Rm Rn mov w Rm Rn 47 LENESAS stc l SR Rn stc VBR Rn sts MACH Rn sts MACL Rn sts PR Rn sts I MACH Rn sts MACL Rn sts PR Rn sub Rm Rn subc Rm Rn subv Rm Rn swap b Rm Rn swap w Rm Rn tas b Rn trapa imm tst imm RO tst Rm Rn tst b imm RO GBR xor imm RO xor Rm Rn xor b imm RO GBR xtrct Rm Rn mov w disp Rm RO mov w disp GBR RO mov w disp PC Rn mov w RO0 Rm Rn mov w Rm Rn mov w Rm Rn mov w RO disp Rm mov w RO disp GBR mova disp PC RO movt Rn swap b Rm Rn swap w Rm Rn xtrct Rm Rn Renesas System Solutions Asia Pte Ltd LENESAS B 3 2 Arithmetic Operations add imm Rn cmp pl Rn mac w Rm Rn add Rm Rn cmp pz Rn muls Rm Rn addc Rm Rn cmp str Rm Rn mulu Rm Rn addv Rm Rn divOs Rm Rn neg Rm Rn cmp eq imm RO divOu negc Rm Rn cmp eq Rm Rn div1 Rm Rn sub Rm Rn cmp ge
72. sscesscessscssscessssssseascesssesaseenssqssssqssqnseqnsseqateqassessseqaseqassessteqssesnsetsss 32 7 6 DISPLAYING USER TARGET PROGRAM CODE 33 7 7 USING BREAKPOINT PC BREAKPOINT RR ROD ORO Dn nn nnnnnnnnnnnnnnnnnnnnnnnnss 34 7 7 1 Setting PC Breakpoint E 34 7 8 EXECUTING USER TARGET PROGRAM 34 7 9 RSAMININGREOISTERS testerete tsetse tsetse treere tset rs trst Seese erse sese eeE esere esetet ee eseeseeneee 35 7 10 RNEVIENINO EE ge 37 Z L USER MEMORY MONITORING uzo sop E ns AR 38 IESU E Memory TTT e OPA 38 FAZ BN MCI ENDO Vo nn A EK o E OA o SK E SE A o 2710 39 712 LOCAL V TA EMAA E 41 7 13 STEPPING USER TARGET PROGRAM EEN 41 TES E 41 7 14 EEN 42 7 14 NA Pesce etc oe 42 SECTION 8 TROUBLESHOOTING ssp ESS E a 43 APPENDIX A FREQUENTLY ASKED QUESTIONS ssssssssssscccssssssssssscccccvossssssssccccesssssssssssccccccs 44 APPENDIX B ASSEMBLER C OMMANDOS s sssssessscessscssscsssssessscesssccssscosscssesssssscessssesscsssescessssssccesssesss 46 B 1 EEN 46 B 2 COMMANDS SORTED ALPHABETICALLY EE 46 B 3 COMMANDS SORTED BY TYPE EE 47 B 3 1 EE 47 B 3 2 ATCT EE 48 B 3 3 A A E E A E EE A AE EE 0 E A E EE 48 B 3 4 KEE 48 B 3 5 51471718 712 0A E O TREE TTT ET etn EAEE EE 4427 EE 48 B 3 6 AO se 49 APPENDIX C MINEPROTE Charat 50 Cl E e E RA EEN 50 C 2 EE 50 C 3 SOFTWARE LISTING FTRTRFRTTRTTFTFTR FRTTTFTFTTFTTFTFTTTTT
73. t pull up resistors may be required for proper operation in some the port configurations In particular users adding external memory in area 3 through 7 should be aware that the chip selects provided by SH1 are shared and may be floating until properly configured 2 Renesas System Solutions Asia Pte Ltd CD software Standard user Cable LCEVB SH1 User Manual Packing list O an Q O Power cable Serial Cable Figure 1 3 LCEVB SH1 Package 1 2 1 Software Components The software components included in the package are listed below e 1x CD Software setup Setup exe for HDI setup Adobe Reader Version 3 01 S
74. tions Asia Pte Ltd LENESAS These icons have the following functions e Hitachi Debugging Interface HDI for LCEVB SH1 e Uninstall Hitachi Debugging Interface will remove HDI for LCEVB SH1 and its associated files if you need to uninstall it at any stage 53 Evaluation Compiler and Assembler Installation Compiling Assembling of SH Series Embedded codes need the following tools Evaluation SuperH RISC engine C C Compiler Assembler Optimizing Linkage Edition Install these tools by executing SETUP EXE in EVAL directory A similar automated installation process will copy all the necessary files and setup the environment variables Note that User need to restart Host PC to complete this stage of installation 23 Renesas System Solutions Asia Pte Ltd ENESAS Section 6 LCEVB SH1 System Check The next step is to run the HDI software to check that the LCEVB SH1 System is working correctly Follow the sequence below ensure both the Serial Cable and Power Supply is properly connected up to LCEVB SH1 before continuing e Switch on the LCEVB SH1 and check that the red LED is illuminated e Select Hitachi Debugging Interface under the Start Menu Programs Hitachi Debugging Interface menu or Double click the HDI icon Hitachi Debugging Interface Figure 6 1 HDI Application Icon When everything is setup correctly the status bar will display Link up to indicate that everything is set up correctly and the HDI scre
75. tor speed switch temp case 0x00 both switches are ON motor speed 0 break case 0x02 7 BCO is ON Y if motor speed gt 5 motor speed 5 else motor speed break case 0x01 5 PCL is ON S LE motor speed lt 1 motor speed 0 else motor speed break default motor speed 0 break End Switch PBDR PBDR amp OxFF80 display table motor speed while temp PCDR amp 0x03 check for switch to be released delay20ms PBDR PBDR amp OXFF7F LX off buzzer End get data ee Routine count Purpose display 0 to 9 at 0 2 second interval ENER 7 count int display Count for display count 0 display count lt 11 display count PBDR display table display count d xx 10 delay 10 x 20ms 0 2 sec EE Routine beep Purpose set PB7 on buzzer beep PBDR PBDR 0x0080 set PB7 A E Routine delay20ms Purpose generate a software delay of 20ms E EEBb N el delay20ms int dvarl for dvarl 0 dvarl lt 16000 dvarl TE SS SS a a E EA Routine d xx count Purpose generate a delay in multiples of 20ms using ITU TCNTO Vii H d xx count int count int delay var unsigned char temp ITU TC
76. tter ett ese Eee EEEE S EEEE ssetereseeterseeeeeret 15 SECTION 4 HARDWARE STARTDUP cccccccecccccccccccccccccccccccccccccccccccccccoccccccocccccccccocccocccoccsecccoccvecoveceueoue 18 4 1 INSTALLING THE LCEVB SHI BOARD ssssssccssssssscccsssssssccssssssccssssssseccqsssssresqssssseeqsssssresqsassssesqsssssecsssssss es 18 4 2 SERIAL COMMUNICATION CONNECTION s sessssssccccsssssssccssssssscesssssssesqsssssscsssssssresqsssssreqsssssceqqsssssecqssssssesssssss ss 18 43 POWER DPPLI CONNEC KE 18 4 3 1 Direct Power SUPP ATE E mz z TTTTz o 19 4 3 2 PON CP CLT OWE DUDI VI sas pom A RJ E ai 19 SECTIONS SOE W ARES FAKT LEE 20 o HOSTPE COMPUTER REO EC KEE 20 32 RK E Ee EE 20 5 3 EVALUATION COMPILER AND ASSEMBLER INSTALLATION cccccccciccccccccesocccssoscccsosocccososccasssoocesosooeasoooeeasaneeess 23 SECTION 6 LCEVB SH1 SYSTEM CHECK cccccececeeececececccececccccccccccccccccccoocccoocecoooocoooeoooooooooooocooosocosssecouesess 24 SECTION 7 TUTORIAL SESSION sao neslo on o obtain 26 Tall PINT OC EION suena E EO ER o E OO va ube sed NO NK Saba 26 Tdd EE 26 7 1 2 COMPAS E 26 7 1 3 How the Tutorial E 26 Ta a o O ee iO 28 GE NT A IO E I 0 AE E 20 EA AANE 29 TZ SETUP THE DEBUGGING ENVIRONMENT sesono o keea ada 30 Renesas System Solutions Asia Pte Ltd JA MEMORY MAPPING EE 31 7 5 USER TARGET PROGRAM DOWNLOADINOG es ss
77. two normally ROM Since a minimum of one wait state is used for external accesses and this corresponds to an access time of 120ns at a CPU speed of 20MHz it is likely to be most convenient to use 120ns RAM and EPROM ROM 9 Renesas System Solutions Asia Pte Ltd LENESAS 2 7 Serial Interface The LCEVB SH1 supports two three wire serial channels using the two identical SH1 SCI UART type devices e SCIO e SCIA Of these SCI1 is normally dedicated to use by Monitor Firmware for communication with a Host PC SCIO is available for User Target System development U9 is a serial transceiver device that translates RS 232 signals to logic levels and vice versa This device provides two channels in each direction enough to support TxD and RxD for each of the two channels U9 is a standard 16 pin MAX 232 device 2 8 LED Driver U3 7400 NAND chip is used to drive LED D1 Green LED Jumper J10 should be set to 2 3 connecting to SH port pin PA15 Alternately jumper J10 set to 1 2 cause connection to SH1 port pin PB15 Jumper setting Assignment J10 Connecting to PB15 default Connecting to PA15 Table 2 5 Jumper J10 setting 2 9 External User Interface The External User Interface output most of the Processor SH1 signals to User Target System The arrangement is consistent keeping e Signal lines short e Board design simple e Signals are assigned compatible with Japan User Cable e Lines potentially used for a
78. ways points to the current instruction to be executed by MCU Note the yellow highlight bar in the program window also indicate the current location of PC 714 Save Session Before exiting it is good practice to save your session so that you can resume with the same ALE300L emulator and HDI configuration at your next debugging session e Choose Save Session from the File menu e Choose Exit from the File menu to exit from HDI 7 14 What Next This tutorial has introduced you to some of the key features of the ALE300L emulator and their use in conjunction with the HDI By combining the emulation tools provided in the ALE300L emulator you can perform extremely sophisticated debugging allowing you to track down hardware and software problems very efficiently by precisely isolating and identifying the conditions under which they occur 42 Renesas System Solutions Asia Pte Ltd LENESAS Section 8 Troubleshooting Communication Problems 1 Verify the communication channel e s the Communication Port used by another device e Right Communication Port COM1 COM2 selected e Right Communication Baud Rate 57 600bps supported by Host PC 2 Power supply not switched on or not connected or connected loosely to the LCEVB SH1 Check the power LED on the LCEVB SH1 3 The PC interface cable is not correctly connected between the PC interface board and the LCEVB SH1 5 Wrong PC interface serial cable used PC Interface serial cable
79. y inserted for accesses to area 0 and area 2 by the SH1 on board bus state controller Since RAM memory is located in area 2 the access time requirements for both RAM and EPROM ROM must be considered when setting WCR3 and set to conform with the slowest of the two normally EPROM ROM 2 6 RAM The LCEVB SH1 s Emulation RAM is at U5 and U6 which contain a pair of 32k x 8 62256 family static CMOS RAM organized for word wide access Figure 3 3 shows the memory map In either case the RAM memory is located in area 2 of the SH1 memory space nominally starting at location H 2000000 The configuration of U5 and U6 is 16 bits wide so for proper access this RAM memory must be accessed starting at address H AO00000 When RAM is referenced at this address the memory area select signal CS2 high byte strobe HBS and low byte strobe LBS signals are generated by the SH1 and are externally combined by OR gates UZA and U7B before being used as the RAM device select signal In order for HBS and LBS signals to be generated bit BAS of the SH1 bus control register BCR must be asserted The value of SH1 wait state control register 3 WCR3 bits AO2LW1 AO2LWO controls the number of wait states automatically inserted for accesses to area O and area 2 by the SH1 bus state controller Since EPROM ROM memory Is located in area 0 the access time requirements for both RAM and EPROM ROM must be considered when setting WCR3 and set to conform with the slowest of the

Download Pdf Manuals

image

Related Search

Related Contents

  a visual user interface for the Pantheon storage - e  エジプト国 カイロ大学小児病院 外来診療施設建設計画 準備調査報告書  Fujioh FSR-4200 User's Manual  Chase Blokker, Software Engineer Nicole Klee, Experiment  プライバシーポリシー - 株式会社 鈴木商会  Philips AVENT SCF620  Samsung SGH-F480I Εγχειρίδιο χρήσης    

Copyright © All rights reserved.
Failed to retrieve file