Home
E8a Emulator Additional Document for User`s Manual
Contents
1. Setting dialog box Emulator Setting r MCU Group Select the name of the MCU group to be used MOU Setting Communication Baud Rate from the MCU Group drop down list Emulator mode Firmware Location MCU Group Mt 6C 6B Group Device Device PEF IGESE Select the type of MCU to be used from the Device drop down list See 7 1 MCU resources used by the E8a emulator on page 29 for the list of applicable MCUs Mode f Erase Flash and Connect C Keep Flash and Connect C Program Flash C Debugging of GPU rewrite mode amp et p 7 Mode Select the mode to be used For details see 5 2 1 Selecting the Mode Power supply p 19 W Power Target from Emulator Max g00mA 33 ep Power supply Select the power supply to the user system Only 3 3V can be selected Cancel When supplying power to the user system from Do not show this dialog box again the E8a click the Power Target from Emulator MAX 300mA checkbox Figure 5 2 Emulator mode Tab of Emulator Setting Dialog Box Note 1 Only one power supply option is available depending on the selected types of the MCU For the information of the operating supply voltage of the MCU refer to the hardware manual of the MCU used R20UT2011EJ0301 Rev 3 01 Page 18 of 42 May 08 2012 2rCENESAS E8a Emulator 5 Emulator Debugger Setting 1 Selecting the Mode Table 5 1 Selecting the Mode When starting the de
2. TA D T lt a C v E8a Emulator Additional Document for User s Manual Notes on Connection Supported Devices M16C Family M16C 60 Series Notes on Connecting the M16C 6B All information contained in these materials including products and product specifications represents information on the product at the time of publication and is subject to change by Renesas Electronics Corporation without notice Please review the latest information published by Renesas Electronics Corporation through various means including the Renesas Electronics Corporation website http www renesas com Renesas Electronics www renesas com Rev 3 01 May 2012 10 11 i Notice All information included in this document is current as of the date this document is issued Such information however 1s 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 li
3. 13000h 13FEFh is used by the E8a emulator program This area overlaps with the user boot area Therefore when using any other mode than Program Flash mode see 5 2 1 Selecting the Mode on page 19 at the startup of the emulator debugger note that this area 13000h 13FEFh is overwritten by the E8a emulator program 2 When starting the debugger the Emulator Setting dialog box is displayed Specify the area which will not be used by the user system For details see 5 3 Firmware Location tab on page 20 R20UT2011EJ0301 Rev 3 01 Page 29 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 2 Pins used by the E8a emulator The E8a emulator controls the MCUs by using the following pins depending on the usage When communicating via CNVss pin P6_5 pin 1 RESET and CNVss pins When communicating via P6_4 P6_5 P6_6 P6_7 RESET CNVss P5_5 P6_4 P6_5 P6_6 and P6_7 pins 3 Interrupts used by the E8a emulator program unusable The BRK instruction interrupt address match interrupt single step interrupt and DBC interrupt are used by the E8a emulator program Therefore make sure the user program does not use any of these interrupts The E8a emulator changes these interrupt vector values to the values to be used by the emulator No problems occur if the interrupt vector values are written in the user program 4 Interrupts used by the E8a emulator program NMI If NMI interrupts are us
4. 2 Debugging in stop mode or wait mode When debugging in stop mode or wait mode do not operate windows until the program stops at the breakpoint by setting the breakpoint at the line of the program which will be executed after the stop mode or wait mode is cancelled Also if memory contents are referenced or changed during the stop mode or wait mode the program after exiting the stop or wait mode and accessing the MCU memory restarts from the instruction next to the one by which it was placed into the stop or wait mode If the program enters the stop or wait mode in the middle of a memory access a reference or a change of memory contents may not be performed normally In addition disable the automatic update in the memory window or watch window or fix the display in the memory window before running the program and do not make refresh operations during an execution so memory accesses do not occur during user program execution When the program is forcibly stopped or when the memory is referred to or modified in stop mode or wait mode these modes will be cancelled and the memory reference or modification may not be performed properly 3 Note on PC break point When downloading a user program after modifying it the set address of PC break may not be corrected normally depending on the modification Therefore break points other than the set PC breaks may shift After downloading a user program check the setting of PC breaks in the event poin
5. Emulator to the User System 3 Connecting the E8a Emulator to the User System 3 1 Connector for connecting the E8a emulator and the user system Before connecting the E8a emulator to the user system a connector must be installed in the user system so a user system interface cable can be connected Table 3 1 shows the recommended connector for the E8a emulator and Figure 3 2 shows E8a connecting connector pin assignments When designing the user system refer to Figure 3 2 E8a Connecting Connector Pin Assignments and Section 4 Examples of Pin Handling for Connecting the E82 Before designing the user system be sure to read the E8a Emulator User s Manual and related device hardware manuals Table 3 1 Recommended Connector Type Number Specification 14 pin connector 2514 6002 3M Limited 14 pin straight type for use outside Japan 7614 6002 3M Limited 14 pin straight type for use in Japan User system interface cable Connector User system Figure 3 1 Connecting the User System Interface Cable with an E8a Connecting Connector e Do not place any components within 3 mm area of the connector e When using the E8a emulator as a programmer connect it to the user system in the same way Connect E8a connecting connector pins 2 6 10 12 and 14 firmly to the GND on the user system board These pins are used as an electric GND and monitor the connection of the user system connec
6. Eventcondition Tab Type Displays the event types Event A Event B Break Condition Trace Condition State Shows the event is enable or disable Enable Disable Displays the set condition Action For the Event A and Event B the access types are displayed R W READ or WRITE READ WRITE For the Break Condition and Trace Condition Break Trace is always displayed R20UT2011EJ0301 Rev 3 01 Page 24 of 42 May 08 2012 2rCENESAS E8a Emulator 6 3 Event Setting dialog box 6 E8a Emulator Functions Supplement on the User s Manual The conditions in the Event condition sheet can be set Event Setting Event 4 Address Data Access SIZE Gocess Type Event B Address Access Size BYTE Socess Type 420 h Bl blask lower E bits 12 Mask Oot 400 Fl Mask lower je 000400 lt faddr lt 0004037 Break Condition Break None W Break at Trace Full Trace Condition Branch Trace Ga Stop Break Pick up E Type Start bits READ Cancel Figure 6 2 Event Setting Dialog box 1 Event A Set the contents of the Event A You can set the conditions of the address comparison with mask specification and data comparison with mask specification for the Event A Table 6 3 Contents of the Event A Address with mask specification Data with mask specification Access Size Access Type R20UT2011EJ0301 May 08 2012 Re
7. an event for the Event A you cannot specify a mask for an address and data simultaneously If you mask them simultaneously an event will not be encountered 4 Note on setting an event Do not specify the following addresses as the address of the event Otherwise an unauthorized break may occur Address in the interrupt vector table Address set in the interrupt vector table interrupt routine start address Branch address of the branch instruction Both fixed vector table and variable vector table are included with the interrupt vector table above 5 For the access size specify BYTE In this condition the lower one byte data can be compared R20UT2011EJ0301 Rev 3 01 Page 28 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 7 Notes on Using the E8a Emulator 7 1 MCU resources used by the E8a emulator 1 Program area for the E8a emulator Table 7 1 lists the program area for the E8a emulator Do not change this area otherwise the E8a emulator will not control the MCU In this case disconnect the debugger and then reconnect it Table 7 1 Program for the E8a Emulator ROMSize Size Program Area for E8a Emulator Group Part No lt RAM Size g Program ROM ROM Area RAM Area FFFE4h FFFE7h R5F36B3E 256 KB 20KB FFFE8h FFFEBh 13000h 13FEFh FFFECh FFFEFh Eg R5F36B4B 192 KB 20 KB PEE ERE et FFFFCh FFFFFh Notes 1 The portion of the program ROM2 area
8. as such precision is not guaranteed R20UT2011EJ0301 Rev 3 01 Page 6 of 42 May 08 2012 2rCENESAS E8a Emulator 2 E8a Emulator Specifications 2 3 Applicable tool chain and third party products You can debug a module created by the inhouse tool chain and third party products listed in Table 2 4 below Table 2 4 Applicable Tool Chain and Third party Products M3T NC30WA V 5 20 Release 01 or later doar odis TASKING M16C C C EC Compiler V 2 3r1 or later 1 PAP IAR EWM16C V 2 12 or later Note 1 Notes on debugging the load modules created in ELF DWARF2 format If the load module was created in ELF DWARF 2 format using TASKING M16C C C EC compiler V3 0r1 the precautionary note described below must be observed when displaying member variables of the base class in the Watch window Precautionary Note If any class object with a base class is defined the following problems may occur Case 1 Member variables of the base class cannot be referenced directly from the class object 1 gt Use indirect references from the class object to refer to member variables of the base class 2 3 Case 2 If the PC value resides in any member function of a derived class member variables of the base class cannot be referenced directly 4 gt Use indirect references from this pointer to refer to member variables of the base class 5 6 Figure 2 1 shows a code example and Figure 2 2 shows a Watch window registrati
9. set BRANCH DESTINATION is displayed When the data trace is set READ WRITE is displayed Address When the branch trace is set an address of the branch source and destination is displayed When the data trace is set an address or address range set for the encountered event is displayed When the data trace is set the accessed value is displayed When the branch trace is set nothing is displayed area of emulator use to control breaks etc It is not an error Source If there is a source line information correspondent to the Instruction the correspondent source line is displayed When the data trace is set nothing is displayed Label If there is a label correspondent to an address in the Instruction the correspondent label is displayed When the data trace is set nothing is displayed Instruction When the branch trace is set the mnemonic of the address is displayed When the data trace is set nothing is displayed EML may be displayed in the Instruction column This shows that the target program accessed the R20UT2011EJ0301 Rev 3 01 Page 27 of 42 May 08 2012 2rCENESAS E8a Emulator 6 E8a Emulator Functions Supplement on the User s Manual 6 5 Notes on the event settings of the access break and trace function When setting the Event A or Event B for the access break and trace function set the address access size and access type referring to Table 6 8 below 1 2 3 4 Table 6 8 Availability of th
10. y In this mode when starting the debugger the E8a emulator erases the Flash memory data for the MCUs and simultaneously writes the area for the E8a emulator program and the vector area used by the E8a emulator The emulator rewrites the OFS1 and ID code areas Notes 1 In this mode vector addresses are used by the E8a emulator program After a program has been downloaded you cannot disconnect the emulator and operate the user system as a stand alone unit Programs written in this mode cannot be executed from the MCU If you want to execute a program from the MCU use Program Flash mode The vector area ID code area and the OFS1 area have their values rewritten by the emulator so be aware that their checksums do not match 2 When starting up in these modes lock bits in all the blocks of the flash memory will be unlocked Note that the lock bits of the downloaded blocks will be unlocked after downloading the user program In this mode the ID code settings made on the user program will be written to the internal flash memory of the MCU 3 When debugging a program in CPU rewrite mode memory reference or modification functions can be used However do not use these functions in the following condition The MCU does not recognize the writing is continuously executed if the write instruction is interrupted by the memory reference or modification process While write instruction is being executed to the register which requi
11. PU rewrite mode Setting the debugger cache to OFF is not necessary if the debugger is started in Debugging of CPU rewrite mode 7 3 2 Note on rewriting flash memory by the E8a emulator Do not reset nor execute debugging operations to the MCU while the internal ROM flash memory is being written by the E8a emulator Flash memory rewrite ends when the Flash memory write end is displayed in the output window of the High performance Embedded Workshop If the MCU is reset or debugged when rewriting the flash memory the user program or the E8a emulator program may be disrupted Flash memory rewrite occurs When downloading the user program After setting PC breaks in the flash memory and executing the user program After canceling PC breaks in the flash memory and executing the user program After rewriting the value of the flash memory in the memory window and executing the user program 7 3 3 Note on flash memory during user program execution Modification of the internal ROM area program ROM attempted except from the user program such as from the memory window while the user program is being executed is always made to the internal cache of the E8a emulator Actual access to the flash memory is executed before the user program restarts In the same way modification of the internal ROM area during a user program halt is made to the internal cache of the E8a emulator and actual access to the flash memory is executed before the u
12. Please input the ID code being written in the flash memory ID Code 01020304050607 hput Mode f Hex specify ID code by hexadecimal 14 digits f ASG Specity ID code by ASCI character within letters Cancel Figure 7 1 ID Code verification Dialog Box Notes 1 Notes on Program Flash mode When the ID code is specified by the ID option of the Imc30 download the MOT file or HEX file When the X30 file is downloaded the ID code is not valid When downloading the X30 file specify the ID code using an assembler directive command such as BYTE The file to which the ID code specified by the assembler directive command D is output varies depending on the version of the assembler For details refer to the Assembler User s Manual 2 Ifthe ID code written to the ID code area of the MCU matches the one entered for the ID Code box in the ID Code verification dialog displayed at emulator debugger startup the E8a emulator writes FFh FFh FFh FFh FFh FFh FFh to the ID code area Therefore the ID Code verification dialog will not be displayed the next time the debugger starts up R20UT2011EJ0301 Rev 3 01 Page 36 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 7 4 Power supply 1 Consumption current When the E8a emulator does not supply power to the user system it consumes the power voltage of the user system from several mA to more than 10 mA This i
13. able DMA transfer from the memory window etc but enable it in the user program 2 When restarting the user program though the E8a emulator sets back the value of a DMA enable bit to the previous value that was set before the program stops the interrupt request bit remains 0 R20UT2011EJ0301 Rev 3 01 Page 31 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 9 SFRs exclusively used by the E8a emulator program The SFRs listed in Table 7 3 are used by the E8a emulator program not the user program Do not change the registers otherwise the E8a cannot control the MCU The SFRs listed in Table 7 3 are not initialized by selecting Debug gt Reset CPU or by using the RESET command If register contents are referred to a value that has been set in the E8a emulator program will be read out Table 7 3 SFRs Used by the E8a Emulator Program 2 Notes on Using the Address Register Symbol Bit E8a Emulator 0010h Program 2 area control register PRG2C O20Eh Address match interrupt enable register AIER All bits 020Fh Address match interrupt enable register 2 AIER2 All bits 0210h 0212h Address match interrupt register 0 All bits O3EEh Port P6 direction register PD6 Bit 5 1 Notes 1 When operating this register make changes using the bit operation instructions to avoid changing the bit values 2 Do not change this register value R20UT2011EJ0301 Rev 3 01 Page 32 of 42 Ma
14. akpoint S W breakpoints or address match breakpoints the actual instruction at the address must be executed as a single step before further execution continues Operation is thus not in real time R20UT2011EJ0301 Rev 3 01 Page 23 of 42 May 08 2012 CENESAS E8a Emulator 6 E8a Emulator Functions Supplement on the User s Manual 6 1 4 On chip trace functions With the MCUs in this user s manual either the branch trace or data trace function is available Branch trace This function displays addresses mnemonics and source lines of the branch source and destination Data trace This function displays data accesses when a data access event is encountered For the data access event and trace condition set them in the Event condition sheet of the Eventpoints window 6 2 Eventcondition tab of the Eventpoints window Set the contents of the data access event break condition and trace condition Double clicking each item in this window will open the Event Setting dialog box to change the conditions The items displayed in the sheet are shown in Table 6 2 E Event A Enable addr 0x000420 amp amp datasOxOOFF 0x0012 WEITE Event B Enable O0x000400 gt addr 0x000 403 READ Break Condition Enable Trace Full Break Break Trace Condition Enable Branch trace from Go to Break Trace Breakpoint A Breakcondition Eventcondition Figure 6 1 Eventpoints Window Eventcondition tab Table 6 2 Display Contents of the
15. aseeeeesssaeaseeeeeeesessaaageeeeees 23 6 123 On chip Dreak UNCION S senccnceaz tcnecanawaacdccdsadavanastachswudethadencd acs Ea a EEA Taa aeaaea 23 6 L4 OM GRINS Tace TRIG GINS sasesana iea E A colnet a AE RA Ea AAR 24 6 2 Eventcondition tab of the Eventpoints WINKOW ccccccseeeeceeeceeeceeeeeeeseceeecaeeseeeeessaaseeeeseeaeeeeeesauaaseeeeessageeeees 24 6 3 EVENT SENG dialog DOX serseri ena EE E a Ea EREA EE EE Eai 25 6 4 Display contents of the Trace WINGOW ccccscccccsseeeeeceeseeeceeeeeeeaeeeeeeeeeeeeeeseeeeeeeaeeeeseaseeessaeeeessaaeeeeseeeeeesseneeeens 27 6 5 Notes on the event settings of the access break and trace function cccecccceeeeeceeeeeceeeeseeeesseeeessaeeesaeeesees 28 7 Notes on Using the E8a Emulator ccccccccsssseeeccceeseeeeecceeeeeeeeaeeceeeceaasececesseaseceeessaaseceesssaaeeeesseageeeessseageesessaas 29 7 1 MCU resources used by the E8a emulator ccccceeeccccccseeseeeeeceeeeeeeeeeeeeeeeecseeeeeesesseaeeeeeeeseaseeeesaaneaeeesessageeeees 29 TEA E E E etree baa E E E E E E A EEE E E mimamenasimnaanitnssaswee tale pee entans 34 TOF ash MCINOIY rrea E E E E E EEE EE E upon 35 7 3 1 Notes on debugging in CPU rewrite MOdC ccccccccccseeeeceeceeeeceeecaeeseceeesseeseeeeeseaeseeeeeeaeeeeessaaeeeseeessaaeeeees 35 7 3 2 Note on rewriting flash memory by the E8a emulator cece ccc cceeeeeeeeceeeeeeeeceaeeseeeeeeeeeseeeeesaaeeeeeessaaeeeess 35 7 3 3 Note on flash memo
16. bugger the E8a emulator erases the Flash memory data for the MCUs and simultaneously writes the area for the E8a emulator program and the vector area used by the E8a emulator The emulator rewrites the OFS1 and ID code areas Erase Flash and Connect 2 Debugging When launching the debugger the E8a emulator retains the Flash memory data for the only 1 MCUs Keep Flash and Connect 2 j Me Note that the area for the E8a emulator program and the vector area used by the E8a emulator will change The emulator rewrites the OFS1 and ID code areas When downloaded the E8a writes only the user program E8a emulator program is not written Therefore in this mode you can only download the program You cannot change the Simple memory contents by using the fill command etc Program Flash 2 programmer When Execute the user program after ending the debugger is selected with the E8a emulator connected to the user system the user program is executed at the same time the debugger is terminated This check box setting is available only when the Program Flash mode is selected Be sure to select this setting when debugging the program which rewrites the CPU In this mode the following debug operation which rewrites the Flash memory cannot be executed Setting the PC break poi Debugging of CPU rewrite Debugging Setting the PC break points Changing the memory contents in the Flash memory area mode 3 only 1 oe y
17. ccccccccsssceecesseecceeseecceaeeecsaueeecseaseeeseaseeessaneeessaneeesseass 11 4 1 1 Pin handling for connecting the E8a types of CONNECTION method cceeeceeeeeeeeeeeeeeeeeeeeeeseeeeesseeeeeens 11 4 1 2 Examples of pin handling for connecting the E8a communication via CNVSS DIN ccceeesseeeeeeeeeees 11 4 1 3 Examples of pin handling for connecting the E8a communication via P6_4 P6_5 P6_6 P6_ 7 13 4 2 Interface circuit in the E8a emulator cc ceccccsesececcesscecceeseeceaeeeceauseecseuseeessaueeecsaeeeeseseeeeseaeeessaneeessanseesseass 16 5 Emulator Debugger SOUING qc siecetsee cesses ius scazeoeasssesseicipeceesdocsduvendacesetssiuacedesavadebasanenmseousasebbacensoesdasesaboaseteredadaeasaes amos 17 5 1 Emulator Setting dialog BOX iss cecsciee ss s00c2eseccessssisactescacedoksshas tend seems sen acebyseedaneedeiiedoedadncescsintesebs sueenededecosasbsaere 17 eE MAO IMO S ADe a a N E E A E E E E 18 Seila eeg POC AMON UA e E E EE E E E A E E E E N TT 20 AANE E eese EEE EE A E E EE E E E a 21 5 5 Communication Baud RAe CAO essione a aaa a a aaa i a aaaea aaie 22 6 E8a Emulator Functions Supplement on the User s Manual cccccsecscceeeeeeeeeeeeaeeseeeeeceeeeeeeeesseeeeeeeesesseeeeeeeas 23 OVEST CMUlAlOl TING ON E A E E E E 23 CRT FO GOO SC AN senpi E E E E E N E EA EE 23 6 1 2 S W break software break ccccccccssssseeceeeeeceeeeseeeeeeeeeeeseaeeceeeeesaeeeseceeeeessaee
18. cense express implied or otherwise is granted hereby 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 t
19. connecting the E8a types of connection method Table 4 1 shows two types of connection method between the E8a and an MCU Table 4 1 Types of E8a connection method a Bg tne Duet Debugging by Emulator Debugger Flash Sk by FDT 1 Communication via CNVss pin via CNVss Communication via CNVss pin Communication via P6_4 P6_5 P6_6 P6_7 4 1 2 Examples of pin handling for connecting the E8a communication via CNVss pin The following shows examples of pin handling for connecting the E8a Vcc MCU RESET RESET vee Pulled up at 4 7kQ or more a down at 1 a Open collector buffer E8a ee Connector User system Figure 4 1 Example of an E8a Connection Notes 1 For the applicable version of the FDT refer to the Flash Development Toolkit target device list on the Flash Development Toolkit page of our website http www renesas com tools 2 Pin P6_5 SCLK is used exclusively by the E8a emulator Pull up the pins at the Vcc level or pull them down according to the MCU pin state after disconnecting the E8a emulator When adjacent resistors are used for pull up they may be affected by noise from other pins In particular separate the resistor for CNVss from the other resistors Wiring patterns between the connector and the MCU must be as short as possible within 50 mm is recommended Do not connect the signal lines between the connector and MCU to other signal lines For the handling of pin
20. d Dukes Meadow Millboard Poad Bourne End Buckinghamshire 1 8 5FH U K Tel 44 1628 585 100 Fax 44 1628 585 900 Renesas Hectronics Europe GmbH Arcadiastrasse 10 40472 Dusseldorf Germany Tel 49 21 1 65030 Fax 49 21 1 6503 1327 Renesas Hectronics China Co Ltd 7th Foor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 PRChina Tel 86 10 8235 1 155 Fax 86 10 8235 7679 Renesas Hectronics Shanghai Co Lid Unit 204 205 AZIA Center No 1233 Lujiazui Ring Rd Pudong District hanghai 200120 China Tel 86 21 5877 1818 Fax 86 21 6887 7858 7898 Renesas Hectronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 852 2886 9318 Fax 852 2886 9022 9044 Renesas Hectronics Taiwan Co Lid 7F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 81 75 9600 Fax 886 2 81 75 9670 Renesas Hectronics Singapore Pte Lid 1 harbourFront Avenue 06 10 keppel Bay Tower Sngapore 098632 Tel 65 6213 0200 Fax 65 6278 8001 Renesas Hectronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jn Persiaran Barat 46050 Petaling Jaya Selangor Darul Ensan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955 9510 Renesas Hectronics Korea Co Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam ku Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2012 Renesas Electron
21. d the emulator may become uncontrollable Note that if the user program uses the watchdog timer the watchdog timer will be refreshed by the E8a emulator program during the user program halt making the refresh timing differ from the actual operational timing Also note that the watchdog timer is not refreshed during the execution of the user program 2 Count source protection mode cannot be debugged with the E8a emulator 3 Ifthe reset circuit of the user system has a watchdog timer disable it when using the emulator 7 2 Reset 1 Reset function Do not perform reset from other than the emulator debugger otherwise the E8a emulator will run out of control Also note that if a reset occurs while the automatic update is enabled in the memory or watch window the E8a emulator may run out of control Do not stop the user program while the reset pin remains in the L state A timeout error will occur 2 Reset vector address During a debug with the E8a emulator the reset vector addresses are used by the E8a emulator program If the MCU is reset while the user program is being executed control is transferred to the E8a emulator program and the user program is forced to stop R20UT2011EJ0301 Rev 3 01 Page 34 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 7 3 Flash memory 7 3 1 Notes on debugging in CPU rewrite mode 1 Unrewritable area in CPU rewrite mode Do not perform CPU rewrite operat
22. debugger E8a emulator hardware specifications Connecting the E8a emulator to the host computer or user system Operating the E8a emulator debugger Tutorial From starting up the E8a emulator debugger to debugging 2 E8a Additional Document for User s Manual The E8a Additional Document for User s Manual describes content dependent on the MCUs and precautionary notes MCU resources used by the E8a emulator Example of the E8a emulator connection or interface circuit necessary for designing the hardware Notes on using the E8a emulator Setting the E8a emulator debugger during startup Note e For the specifications and supported MCUs of the optional FDT please check the Flash Development Tool Kit page of our website http www renesas com tools e FDT stands for the Flash Development Toolkit Trademarks Microsoft MS DOS Visual SourceSafe Windows and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries All other company or product names are the trademarks or registered trademarks of their respective owners R20UT2011EJ0301 Rev 3 01 Page 4 of 42 May 08 2012 2rCENESAS E8a Emulator 2 E8a Emulator Specifications 2 E8a Emulator Specifications 2 1 Target MCUs Table 2 1 shows the target MCUs covered in this user s manual Table 2 1 Target MCUs ltem Description Target MCUs M16C Family M16C 60 Series M16C 6B Gro
23. e Event Setting Address 400h Byte read to even address Available Access size BYTE Access type READ or R W Address 400h Byte write to even address Available Access size BYTE Access type WRITE or R W Address 400h Word read to even address Available Access size WORD Access type READ or R W Address 400h Word write to even address Available Access size WORD Access type WRITE or R W Address 401h Byte read to odd address Available Access size BYTE Access type READ or R W Address 401h Byte write to odd address Available Access size BYTE Access type WRITE or R W Address 401h Word read to odd address Available Access size BYTE 5 Access type READ or R W Address 401h Word write to odd address Available Access size BYTE 5 Access type WRITE or R W Notes 1 Note on the trace start condition When setting an event other than Go for the trace start condition a data when the event is encountered is not recorded to the trace data The data of the event which is encountered the next time is recorded 2 Notes on the trace stop condition When the trace start and trace stop conditions occur simultaneously the trace stop condition becomes invalid When setting other than Break for the trace stop condition the display contents of the Trace window will not be updated until the user program stops even after a trace stop condition is encountered 3 Note on setting the Event A When setting
24. e at a certain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or 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 co
25. ected to the Vss inside the E8a Make sure that pins 2 6 10 12 and 14 are all connected to the Vss Do not connect anything to the N C pin About Power Supply Circuit of the User System Q When supplying power ensure that there are no short circuits between Vcc and GND Only connect the E8a emulator after confirming that there are no mismatches in pin assignments of the E8a connecting connector Incorrect connection will result in the host computer the emulator and the user system emitting smoke or catching fire R20UT2011EJ0301 Rev 3 01 Page 12 of 42 May 08 2012 2rCENESAS E8a Emulator 4 Examples of Pin Handling for Connecting the E8a 4 1 3 Examples of pin handling for connecting the E8a communication via P6_4 P6_5 P6_6 P6_7 The following shows examples of pin handling for connecting the E8a Pulled up at 4 7kQ or more ie ene RESET RESET Pulled up at 4 7kQ or more Pulled down at 100kQ E8a Connecting Open collector buffer Connector Vss User system Figure 4 4 Example of an E8a Connection Note 1 For details on setting pins P6_4 and P6_5 refer to 1 SCLK RxD TxD and BUSY pins on page 14 For details on setting pin P5_5 refer to 2 EPM pin on page 14 R20UT2011EJ0301 Rev 3 01 Page 13 of 42 May 08 2012 2rCENESAS E8a Emulator 4 Examples of Pin Handling for Connecting the E8a 1 SCLK RxD TxD and BUSY pins Pins P6_4 BUSY P6_S5 SCLK P6_6 RxD and P6_7 TxD are
26. ecution cannot be performed in the internal processing of instructions undefined overflow BRK and INT which generate a software interrupt continuously in the program see Figure 7 2 NOP NOP INT 3 NOP JMP MAIN Passes through if the STEP execution is carried out NOP lt Program should be stopped at this address NOP NOP REIT Figure 7 2 Example of Software Interrupt Instruction b INT instruction To debug the user program with the INT instruction set a PC break for the internal processing of the INT instruction and execute the program with the GO command see Figure 7 3 NOP INT 8 NOP Execute using GO command JMP MAIN INT_3 NOP Break NOP REIT Figure 7 3 Example of INT Instruction c Other Flag manipulating instructions The following instructions when single stepped only manipulate a flag in the E8a emulator with no MCU operations involved Therefore when these instructions are executed be aware that the Start Stop function does not work LDC src FLG STC FLG dest LDINTB STC R20UT2011EJ0301 Rev 3 01 Page 38 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 7 7 2 Other debug functions 1 Go to cursor function The Go to cursor function is actualized using an address match break Therefore when you execute the Go to cursor command all the address match breaks you set become invalid while all the PC breaks remain valid
27. ed be sure to take the necessary precautions before executing the user program like disabling the automatic update in the watch window or fix the display in the memory window before running the program so that memory accesses do not occur during an execution If an NMI interrupt occurs while the user program halts or when memory contents are referenced or modified during user program execution the E8a emulator cannot control the MCU 5 Stack area used by the E8a emulator The E8a emulator uses up to 14 bytes of the stack pointer ISP during a user program break Therefore set aside 14 bytes for the stack area 6 Count source protection mode Count source protection mode cannot be debugged with the E8a emulator 7 User boot function When debugging with the E8a emulator the user boot function cannot be used If the user boot function is set to be enabled in the user boot code area the E8a emulator cannot connect with the MCU In this case rewrite the area to disable the user boot function with a parallel programmer Note 1 The communication mode that needs the CLK1 pin of UART1 cannot be used The external clock cannot be selected as a transfer clock for UART1 Be sure to set the internal clock for it R20UT2011EJ0301 Rev 3 01 Page 30 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 8 SFRs used by the E8a emulator program The SFRs listed in Table 7 2 are used by the E8a emulator program a
28. edicated to the debugger Since the op code at the specified address is replaced by the instruction dedicated to the debugger when a S W breakpoint is set a write to on chip memory flash memory and RAM will occur Similarly removing a S W breakpoint involves a write to memory 6 1 38 On chip break functions With the MCUs in this user s manual the following three on chip break functions are available Address match break data access break and trace full break Address match break This function breaks the program immediately before a specified address instruction is executed It can be realized using the address match interrupt of the MCU Set the address match breakpoint in the Break condition sheet of the Eventpoints window You can also set it by double clicking the Event column in the Editor window For details refer to the E8a User s Manual Data access break This function breaks the program when a specified event is encountered You can combine two points of the data access event Trace full break This function breaks the program when the trace buffer 1s filled Table 6 1 Break Functions Break type Number of points that Can a breakpoint be set while can be set max the program is running Forced break S W break 1 On chip Address match Specified address break break 1 access specified data break EventB 1 Note 1 When execution is restarted from the address where it stopped at a bre
29. ee ea le i Cancel Do not show this dialog box again Figure 5 4 MCU Setting Tab R20UT2011EJ0301 Rev 3 01 May 08 2012 2rCENESAS MCU The MCU selected in the Device drop down list in the Emulator mode tab is displayed Processor Mode Specify the processor mode according to the user system Only the following mode can be specified for this product Single Chip Mode PM10 b0 of 000005H is 1 Specify whether PM10 data flash enable bit is set When using the user program with PM10 set to 1 check this option PRG2CO0 b0 of 000010H is 1 Specify whether PRG2CO program 2 area control register is set PRG2CO is fixed to 0 Page 21 of 42 E8a Emulator 5 Emulator Debugger Setting 5 5 Communication Baud Rate tab Select communication baud rate between the E8a and MCU in the Communication Baud Rate tab 750000 bps default setting should be selected 1 2 Emulator Setting Emulator mode Firmware Location MOU Setting Communication Baud Rate Please select communication baud rate between Emulator and MEL 750000 bps i Cancel Do not show this dialog box again Figure 5 5 Communication Baud Rate Tab Notes 1 Depending on the wired length of the CNVss signal and how it is wired on the user system communication at the selected baud rate may not be performed Reducing this baud rate may help to solve the problem Also the communication in
30. formation you set here cannot be changed after the emulator debugger has started To change the communication baud rate you need to disconnect the emulator and the MCU temporarily and then reconnect 2 The baud rate of 57600 bps or below is designated for checking purpose in case there is a failure in the connection with the emulator With such a low baud rate it takes a long time to write into the flash memory of the target MCU and the emulator debugger may appear to be giving no response Also note if the data of 1024 bytes or larger is handled when displaying the memory contents or in memory fill function a time out error may occur because the communication takes up much time R20UT2011EJ0301 Rev 3 01 Page 22 of 42 May 08 2012 2rCENESAS E8a Emulator 6 E8a Emulator Functions Supplement on the User s Manual 6 E8a Emulator Functions Supplement on the User s Manual 6 1 E8a emulator functions With the MCUs in this user s manual three break functions can be used forced break S W break and on chip break The break functions can be set singly or multiply The list of break functions supported for the MCUs in this user s manual is shown in Table 6 1 6 1 1 Forced break The forced break function is used to forcibly cause a break in execution of the user program 6 1 2 S W break software break This function breaks the program by rewriting the instruction of the specified address to an instruction BRK instruction d
31. he information included in this document but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein 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 boo
32. ics Corporation and Renesas Solutions Corporation All rights reserved Colophon 1 0 E8a Emulator Additional Document for User s Manual Notes on Connection tENESAS R20UT2011EJ0301 Previous Number Renesas Electronics Corporation REJ10J1792 0300
33. ions to the following areas If these areas are rewritten the E8a emulator will not control the MCU Block O area addresses FOOOOh FFFFFh and block containing the E8a emulator program 2 Operation in CPU rewrite mode When debugging in the CPU rewrite mode select Debugging of CPU rewrite mode in the Mode section of the Emulator mode tab When debugging in the CPU rewrite mode do not halt the user program while the CPU rewrite mode is enabled or while in the erase suspend state otherwise the E8a emulator may not control the MCU And do not perform a step execution of the instruction which enables a CPU rewrite mode or enters an erase suspend state Disable the automatic update in the watch window or fix the display in the memory window before running the program so memory accesses do not occur during an execution To check the data after executing the CPU rewrite mode halt the program after releasing the CPU rewrite mode and refer to the memory window etc When rewriting the Flash memory in the program area select Menu gt Setup gt Emulator gt System to open the Configuration dialog box in the High performance Embedded Workshop In this dialog box change the Flash memory synchronization setting to Flash memory to PC and set the debugger cache to OFF In this setting the Flash memory is read whenever a break occurs which takes some time Use it with the Disable setting except when debugging in C
34. ks etc Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots 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 failur
35. l down the E8a emulator and MCU pins and connect the E8a emulator Do not connect a capacitor etc to this pin E8a Connecting Connector MCU Pulled down at 100kQ Figure 4 7 E8a Emulator and CNVss Pin Connection 4 RESET pin The RESET pin is used by the E8a emulator Therefore use an open collector output buffer or a CR reset circuit as the reset circuit for the user system The recommended pull up value is 4 7 kQ or more The MCU can be reset by outputting L from the E8a emulator However if the reset IC output is H the user system reset circuit cannot be set to L As such the E8a emulator will not operate normally E8a Connecting Connector RESET RESET MCU Pulled up at 4 7kQ or more Open collector buffer Figure 4 8 Example of a Reset Circuit 5 Other pins Connect Vss and Vcc to the Vss and Vcc of the MCU respectively The amount of voltage input to Vcc must be within the specified range of the MCU If NMI interrupts are used make sure the NMI pin is pulled up to the Vcc pin through a resistor Pin 14 is used for checking the connection between the E8a and the user system and is not directly connected to the Vss inside the E8a Make sure that pins 2 6 10 12 and 14 are all connected to the Vss Do not connect anything to the N C pin About Power Supply Circuit of the User System Q When supplying power ensure that there are no short circuits between Vcc and GND Only c
36. ntained in this document or Renesas Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics E8a Emulator Contents Contents Page 1 Inside the E8a Emulator Users Manual cccccccccccccseseceeeeaeeeeeeeseeeeeeeeseeeseeeeeeeaeeceeeseeseeeeesseeseeeeeessaaseeessssaseeees 4 2 E84 Emulator SOSCINCAUONS i sesiencecceeadaecenioesooneecesepeusieceiscsisutdecainnccionmddoueseean E a eanmarindes EAEE N 5 2M We NS E N A A A A A E E AA A N A A E E E E E E 5 2E SPa Me O eee a a E anne donee eoncteaee lun ananuastedann cancers 5 2 3 Applicable tool chain and third party prodUCtS ees chavaecsnestec cn shaeeeedcde cyauenite senetnsinntesesinetcechaneeetecaetaueedeceeyeumacneneeasennes 7 3 Connecting the E8a Emulator to the User SyStem cccccccccssssseeceeeeeeeeeeeeeeeeeeeseaeeeeeeeeeeesseeeaaaeeeeeseeeessaeaeeeeeeeeesaas 9 3 1 Connector for connecting the E8a emulator and the user SYStEM cccceccccceeeceeceeeececseeeeeceeceesaeeeeesseaeeeseeees 9 4 Examples of Pin Handling for Connecting the E8a ccccccccscseeecceeceseeeseeeeeeeeeeaaeeeseeeeeeessssaeeeeeeeeeeseessaeeeeeeeeeeesaas 11 4 1 Examples of pin handling for connecting the E8a
37. on example R20UT2011EJ0301 Rev 3 01 Page 7 of 42 May 08 2012 2rCENESAS E8a Emulator 2 E8a Emulator Specifications HHH h class BaseClass public int m_iBase public BaseClass m_iBase 0 void BaseFunc void f class DerivedClass public BaseClass public int m_iDerive public DerivedClass m_iDerive 0O void DerivedFunc void ie cpp main class DerivedClass ClassObj ClassObj DerivedFunc return void BaseClass BaseFunc void void DerivedClass DerivedFunc void m_iBase 0x1234 BaseFunc m_iDerive 0x1234 ILLITE Figure 2 1 Example code HUM Case 1 If the PC value resides in the main function 1 ClassObj m_iBase Cannot be referenced 1 2 ClassObj _ _b BaseClass m_iBase Can be referenced 2 3 ClassObj b BaseClass m_iBase Can be referenced 3 m_iDerive Expansion symbol Case 2 If the PC value resides in the DerivedClass DerivedFunc function 1 m_iBase Cannot be referenced 4 2 this gt __b BaseClass m_iBase Can be referenced 5 3 __b BaseClass m_iBase Can be referenced 5 4 4 this Wa b BaseClass m_iBase Can be referenced 6 m_iDerive 5 __b BaseClass m_iBase Can be referenced 6 LLL Figure 2 2 Watch window registration example R20UT2011EJ0301 Rev 3 01 Page 8 of 42 May 08 2012 2rCENESAS E8a Emulator 3 Connecting the E8a
38. onnect the E8a emulator after confirming that there are no mismatches in pin assignments of the E8a connecting connector Incorrect connection will result in the host computer the emulator and the user system emitting smoke or catching fire R20UT2011EJ0301 Rev 3 01 Page 15 of 42 May 08 2012 2rCENESAS E8a Emulator 4 Examples of Pin Handling for Connecting the E8a 4 2 Interface circuit in the E8a emulator Figure 4 9 shows the interface circuit in the E8a emulator Use this figure as a reference when determining the pull up resistance value User system connecter Power supply circuit Vcc 8 use only with power supply mode Emulator control circuit 74LVC125 in SCLK gt HH eo a Hesa 2802462 1 Power for 74LVC125 and 74LVC2T45 is supplied from Vcc in the user system connector or power supply circuit in power supply mode Figure 4 9 Interface Circuit inside the E8a Emulator For Reference R20UT2011EJ0301 Rev 3 01 Page 16 of 42 May 08 2012 2rCENESAS E8a Emulator 5 Emulator Debugger Setting 5 Emulator Debugger Setting 5 1 Emulator Setting dialog box The Emulator Setting dialog box is provided for setting items that need to be set when the debugger is launched The contents set from this dialog box excluding Power Supply group box items also become valid the next time the debugger is launched When launching the debugger for the first time after creating a new project work space the Em
39. or Up to 32 data cycles can be specified Flash memory programming Available when selecting the Program Flash mode function User interface When communicating via CNVss pin 2 line clock asynchronous Serial see Section 4 1 1 on page 11 When communicating via P6_4 P6_5 P6_6 P6_7 Clock synchronous serial MCU resources to be used When communicating via CNVss pin ROM size 4 KB see Section 4 1 1 on page 11 RAM size 128 bytes Stack 14 bytes Address match interrupt UART1 function external clock and P6_5 1 When communicating via P6_4 P6_5 P6_6 P6_7 UART1 function and P6_4 P6_5 P6_6 P6_7 see Section 4 1 1 on page 11 Interface with host machine USB USB 1 1 full speed Also connectable to host computers that support USB 2 0 Operation with all combinations of host machine USB device and USB hub is not guaranteed for the USB interface Power supply function Can supply 3 3 V to the user system maximum 300 mA 2 Notes 1 Communication mode requiring UART1 CLK1 pin is not supported 2 Do not use the power supply function of the emulator when it is being used to program flash memory as part of a mass production process Separately supply power from the user system in accord with the specifications of the MCU Use FDT for programming flash memory during mass production etc Voltage supplied from the E8a emulator depends on the quality of the USB power supply of the host computer and
40. played when starting the debugger select Program Flash then check Execute the user program after ending the debugger Note 1 The Work RAM address for the E8a emulator is specified in the Firmware Location tab of the Emulator Setting dialog box R20UT2011EJ0301 Rev 3 01 Page 33 of 42 May 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 13 Debugging during a watchdog timer operation 1 2 3 When running the E8a emulator program when the user program is stopped the E8a emulator program refreshes the watchdog timer If memory access is executed through memory reference or modification the watchdog timer will be refreshed by the E8a emulator program Note that this timing will differ from the actual operational timing When starting the M16C E8a Emulator Debugger set each of bit 0 and bit 7 of the option function select address OFS1 FFFFFh to 1b Although these addresses can be rewritten and the changed values can be referred to in the memory window etc the changed values for these bits bit O and bit 7 are invalid b0 Watchdog timer start select bit 1 Watchdog timer is in a stopped state after reset b7 After reset count source protection mode select bit 1 Count source protection mode disabled after reset Notes 1 Ifan underflow or other abnormal condition occurs immediately after the user program breaks causing the watchdog timer to be reset immediately before it is refreshe
41. ram when either the Event A or Event B is encountered Event A and B Breaks the program when both the Event A and Event B are encountered Event B gt A Breaks the program when an event is encountered in the order of the Event B and Event A Break at Trace Full Check it to break the program when the trace buffer is filled It can be set with the break condition by event 4 Trace Condition Set the trace condition Table 6 6 Trace Condition Description Select a trace type Branch Trace Data Trace Select a start condition for the trace measurement Go Starts a measurement when starting executing the target program Event A Starts a measurement when the Event A is encountered Event A or B Starts a measurement when either the Event A or Event B is encountered Event A and B Starts a measurement when both the Event A and Event B are encountered Event B gt A Starts a measurement when an event is encountered in the order of the Event B and Event A Select a stop condition for the trace measurement Break Stops a measurement when stopping executing the target program Trace FULL Stops a measurement when the trace data is filled Event A Stops a measurement when the Event A is encountered Event A or B Stops a measurement when either the Event A or Event B is encountered Event A and B Stops a measurement when both the Event A and Event B are encountered Event B gt A Stops a measurement
42. res continuous writing ex FMRO1 bit R20UT2011EJ0301 Rev 3 01 Page 19 of 42 May 08 2012 2rCENESAS E8a Emulator 5 Emulator Debugger Setting 5 3 Firmware Location tab You can specify the address of the firmware location in the Firmware Location tab Emulator Setting s Firmware Location Select the area in which the firmware is located MOU Setting Communication Baud Rate Specify the address that will not be used by the Emulator mode Firmware Location user system in the ROM area or RAM area Firmware location Program Specify the ROM area in which the firmware is Program FFOh Byte Use aes located This setting is not required Work FAM 80h Byte Use 040 O Work RAM MIN 0400 MAs 5280 Specify the RAM area in which the firmware is Te A located Specify 128 bytes that will not be used by the user system Cancel Do not show this dialog box agair Figure 5 3 Firmware Location tab of Emulator Setting Dialog Box R20UT2011EJ0301 Rev 3 01 Page 20 of 42 May 08 2012 2rCENESAS E8a Emulator 5 4 MCU Setting tab 5 Emulator Debugger Setting In the MCU Setting tab set the operating condition of the MCU used in the user system Emulator Setting Emulator mode Firmware Location MOU Setting Communication Baud Rate MGU Setting MEL P5F26B3E Frocezsor Mode PMO b0 of 0000OSH is 1 eer Tes eee ee iit Be ee ee Lal ef Wala feb sre i i iy ee an ie e
43. ry during user program EXECUTION cccceeeccecseeeeeeeeeeeeecaeeeeaeeeeeseeeeeseueeeeseneesssageees 35 7 3 4 MCUs used for CEDUGGING cccccsseeccccceesseececceeeceeeceeeuececessaueceeeceaaeceeseaaseeeesseaaecesessuaaeeeeesssaaaeeessssaaeeeees 35 73 9 Flash memory ID CODES screenie ineeie a EENE EENE ENERET EE 36 LA POW GL SUPPI Y esciens E ESE EAEE E aE nE iai 37 7 5 Operation during a user program halt ccccceeeccceccseesececcaeeseeeeeeeeeseeeeseeaeeeeeesseaeeeeeeseaseceesseeeeeesessssaaseeeeessageeeees 37 7 6 Final evaluation of the program asi sans craxnvesuscnsasescaneieasdanavneaadutisad danctueddanevancdussindismieseiiontocce siaxecnalteutasdiaverveasneasi 37 Ta DEDUG UNCION oseanen e cece e es es e E A E oe E A REE 38 EE EET rcs coe EE E A E E E A EE E E E EE E E 38 Fa 2 Other debug TUNIC ONS versus urserninin enine ea eA a ae Neea RE o E aaa EE A A a 39 R20UT2011EJ0301 Rev 3 01 Page 3 of 42 May 08 2012 CENESAS E8a Emulator 1 Inside the E8a Emulator User s Manual 1 Inside the E8a Emulator User s Manual The E8a manual consists of two documents the E8a User s Manual and the E8a Additional Document for User s Manual this document Be sure to read BOTH documents before using the E8a emulator In this user s manual the symbol is used to show active LOW e g RESET 1 E8a Emulator User s Manual The E8a Emulator User s Manual describes the hardware specifications and how to use the emulator
44. s because the user power supply drives 74LVC125 74LVCIT45 and 74LVC2T45 to make the communication signal level match the user system power supply voltage 2 Note on E8a emulator power supply When writing a program with the E8a emulator for mass production processes the program requires reliability so do not use the E8a emulator power supply function Supply power separately to the user system according to the allowable voltage for MCU writing Voltage supplied from the E8a emulator depends on the quality of the USB power supply of the PC and as such precision is not guaranteed 7 5 Operation during a user program halt 1 Operation clock during a user program halt When the user program halts the emulator changes the CPU clock to the internal on chip oscillator clock for the E8a emulator This oscillator clock is changed as follows to meet the frequency specification for rewriting the flash memory of the MCU When firmware is operating Approx 10 MHz When writing flash memory Approx 8 MHz or approx 4 MHz The peripheral features operate with the clock specified by the user program the peripheral clock coming from the CPU clock originates from the internal on chip oscillator clock for the E8a emulator 2 Peripheral I Os during a halt During a user program halt the maskable interrupt request cannot be accepted because the emulator disables interrupts However since peripheral I Os continue to run the interrupt request is accep
45. s well as the user program Do not change the value in the memory window etc by other than the user program Note that although the SFRs can be changed during user program execution the changed value cannot be read at the break The SFRs listed in Table 7 2 are not initialized by selecting Debug gt Reset CPU or by using the RESET command If register contents are referred to a value that has been set in the E8a emulator program will be read out Table 7 2 SFRs Used by the E8a Emulator Program 1 Symbol Peripheral clock select register Bit 2 3 6 7 DMAO interrupt control register 004Ch DMA1 interrupt control register DM1IC Bit 3 1 2 01ACh DMA2 control register DM2CON Bit 3 1 Notes 1 DMAC during a user program halt When the user program is halted or when the memory is referred to or modified during user program execution DMA transfer is disabled In such cases the E8a emulator sets the registers below as following Therefore if you refer to the registers below in the memory window etc it shows that DMA is disabled DMAO control register DMOCON DMA enable bit bit 3 0 DMA disabled DMAI control register DM1CON DMA enable bit bit 3 0 DMA disabled DMA2 control register DM2CON DMA enable bit bit 3 0 DMA disabled DMA3 control register DM3CON DMA enable bit bit 3 0 DMA disabled Interrupt control registers Interrupt request bit bit 3 0 Interrupt not requested Do not en
46. s while the E8a emulator is not in use refer to the hardware manual for the MCU R20UT2011EJ0301 Rev 3 01 Page 11 of 42 May 08 2012 CENESAS E8a Emulator 4 Examples of Pin Handling for Connecting the E8a 1 CNVss pin The E8a emulator uses the CNVss pin for MCU control Pull down the E8a emulator and MCU pins and connect the E8a emulator Do not connect a capacitor etc to this pin E8a Connecting Connector MCU Pulled down at 100kQ Figure 4 2 E8a Emulator and CNVss Pin Connection 2 RESET pin The RESET pin is used by the E8a emulator Therefore use an open collector output buffer or a CR reset circuit as the reset circuit for the user system The recommended pull up value is 4 7 kQ or more The MCU can be reset by outputting L from the E8a emulator However if the reset IC output is H the user system reset circuit cannot be set to L As such the E8a emulator will not operate normally E8a Connecting Connector RESET RESET MCU Pulled up at 4 7kQ or more Open collector buffer Figure 4 3 Example of a Reset Circuit 3 Other pins Connect Vss and Vcc to the Vss and Vcc of the MCU respectively The amount of voltage input to Vcc must be within the specified range of the MCU If NMI interrupts are used make sure the NMI pin is pulled up to the Vcc pin through a resistor Pin 14 is used for checking the connection between the E8a and the user system and is not directly conn
47. ser program restarts 7 3 4 MCUs used for debugging When debugging the Flash memory is frequently rewritten by the E8a emulator Therefore do not use an MCU that has been used for debugging in products Also as the E8a emulator program is written to the MCU while debugging do not save the contents of the MCU Flash memory which were used for debugging nor use them as the ROM data for products R20UT2011EJ0301 Rev 3 01 Page 35 of 42 May 08 2012 CENESAS E8a Emulator 7 Notes on Using the E8a Emulator 7 3 5 Flash memory ID code This MCU function prevents the Flash memory from being read out by anyone other than the user The ID code in Table 7 5 written to the flash memory of the MCU must match the ID code displayed in Figure 7 1 ID Code verification Dialog Box at debugger startup otherwise the debugger cannot be launched Note that when the ID code is FFh FFh FFh FFh FFh FFh FFh the ID code is regarded as undefined In this case the ID code is automatically authenticated and the ID Code verification dialog box is not displayed The values written into the ID code area differs depending on the mode Program Flash mode 1 Contents of the user program Modes other than Program Flash mode 2 FFh FFh FFh FFh FFh FFh FFh regardless of the contents of the downloaded user program Table 7 5 ID Code Storage Area FFFDFh First byte of ID code FFFEFh Fourth byte of ID code ID Code verification
48. t window and reset it 4 Note on the CPU clock Do not use the CPU clock at less than 32 768 kHz sub clock 5 Low power consumption mode When debugging in low current consumption read mode slow read mode or the state that the flash memory is stopped do not operate windows until the program stops at the breakpoint by setting the breakpoint at the line of the program which will be executed after each mode or state is cancelled 6 Note on using automatic memory update When the automatic memory update is enabled in the memory or watch window do not execute Step Out or Multiple step Otherwise it will take longer to update memory data and the operation will be delayed R20UT2011EJ0301 Rev 3 01 Page 39 of 42 May 08 2012 2rCENESAS E8a Emulator Additional Document for User s Manual Notes on Connection Publication Date May 08 2012 Rev 3 01 Published by Renesas Electronics Corporation Microcomputer Tool Develooment Department 2 Edited by Renesas Solutions Corp CENESAS SALES OFFICES Renesas Electronics Corporation http www renesas com Refer to http www renesas com for the latest and detailed information Renesas Hectronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 U SA Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Hectronics Canada Limited 1101 Nicholson Road Newmarket Ontario L3Y 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Hectronics Europe Limite
49. ted immediately after the user program execution is started For example a timer interrupt is not accepted although the timer continues to count when a user program is stopped by a break after the timer started 3 Notes on accessing the SFR areas You can reference or set the contents of the SFR areas in the memory window or the IO window Note the followings a When accessing the special registers You may not be able to access some special registers successfully during the user program halt 1 These registers include Access prohibited addresses Registers for which access order is specified from high order byte to low order byte Registers that can be accessed only by a specific instruction Registers whose bus width specification does not match the bus width set in the Memory window Registers that can be accessed on conditions one of which is that fOCO F must be faster than the CPU clock to access the register Note 1 Follow the instructions in the hardware manual of the target MCU to access to the SFR areas 7 6 Final evaluation of the program Before entering the mass production phase be sure to perform a final evaluation of the program singly without the E8a emulator connected R20UT2011EJ0301 Rev 3 01 Page 37 of 42 May 08 2012 CENESAS E8a Emulator 7 Notes on Using the E8a Emulator 7 7 Debug functions 7 7 1 Step execution 1 Exceptional step execution a Software interrupt instruction Step ex
50. tor e When inserting or removing the user system interface cable from the connector section of the user system be sure to hold the connector cover at the head of the cable Removal by pulling the cable portion instead of grasping the cover causes breakage of the cable connection R20UT2011EJ0301 Rev 3 01 Page 9 of 42 May 08 2012 2rCENESAS E8a Emulator Pin 1 mark Connector Pin2 O ae O O O Pin14 Pin1 Oo O O O Oo Pin13 Pin 1 mark 23 0 mm PE 6x2 54 15 24 mm ff gp 2 54 mm gt _ 0 45 mn Pin 1 mark 3 Connecting the E8a Emulator to the User System Pin Communication Communication via NO via CNVss P6 4 P6_5 P6 _6 P6 7 ae MCU Signals 1 P6_5 SCLK P6_5 SCLK 6 Vss Vss 8j Veo Ve 9 NC Pe4BUSY 12 Vss Vss RESET RESET Figure 3 2 E8a Connecting Connector Pin Assignments Notes e Pin 14 is used for checking the connection between the E8a and the user system and is not directly connected to the Vss inside the E8a Make sure pins 2 6 10 12 and 14 are all connected to the Vss e Note the pin assignments for the user system connector e Do not connect anything to the N C pin R20UT2011EJ0301 Rev 3 01 May 08 2012 Page 10 of 42 2rCENESAS E8a Emulator 4 Examples of Pin Handling for Connecting the E8a 4 Examples of Pin Handling for Connecting the E8a 4 1 Examples of pin handling for connecting the E8a 4 1 1 Pin handling for
51. ulator Setting dialog box is displayed with the Wizard The settings you have made here cannot be changed after the emulator is booted up To change the settings you need to cancel the process of booting up and then reboot the emulator Emulator Setting MOU Setting Communication Baud Rate Emulator mode Firmware Location MCU Group M1 6C 6B Group x Device P5F26B3E Mode f Erase Flash and Connect C Keep Flash and Connect i Program Flash C Debugging of CPU rewrite mode Power supply i Power Target from Emulator Max 300mA CERREN Cancel De not show this dialog box again Figure 5 1 Emulator Setting Dialog Box If you check Do not show this dialog box again at the bottom of the Emulator Setting dialog box the Emulator Setting dialog box will not be displayed the next time the debugger is launched You can open the Emulator Setting dialog box using one of the following methods After the debugger is launched select Menu gt Setup gt Emulator gt Emulator Setting Hold down the Ctrl key while launching the debugger When Do not show this dialog box again is checked the E8a does not supply power to the user system R20UT2011EJ0301 Rev 3 01 Page 17 of 42 May 08 2012 2rCENESAS E8a Emulator 5 Emulator Debugger Setting 5 2 Emulator mode tab Device selection mode specification and power supply setting are made from the Emulator mode tab of the Emulator
52. up Available operating modes Single chip mode 2 2 Emulator specifications Table 2 2 shows the specifications of the emulator supported by the M16C E8a Emulator Debugger Table 2 3 shows the E8a emulator specifications when using the target MCU Table 2 2 E8a Emulator Specifications Emulator power supply Unnecessary USB bus powered power supplied from the host machine Applicable emulator debugger M16C E8a Emulator Debugger V 1 03 02 or later Operating Environment Temperatures Active 10 C to 35 C Inactive 10 C to 50 C Humidity Active 35 RH to 80 RH no condensation Inactive 35 RH to 80 RH no condensation Vibrations Active maximum 2 45 m s Inactive maximum 4 9 m s Transportation maximum 14 7 m s Ambient gases No corrosive gases R20UT2011EJ0301 Rev 3 01 Page 5 of 42 May 08 2012 2rCENESAS E8a Emulator 2 E8a Emulator Specifications Table 2 3 E8a Emulator Specifications when Using the Target MCU Power voltages 2 7 3 6 V f BCLK 16MHz hisses For details refer to the hardware manual of the MCU Break functions Address match break 8 points Data access break 2 points Event A Comparison with the address data mask and access condition R W R W can be set Event B Comparison with the address mask and access condition R W R W can be set PC break points maximum 255 points Forced break Trace functions 16 branch instructions branch source destination PC
53. used exclusively by the E8a emulator Connect pins P6_6 and P6_7 to the E8a emulator after pulling up the MCU pins at the Vcc level For P6_4 and P6_5 pull up the pins at the Vcc level or pull down them according to the MCU pin state after disconnecting the E8a emulator P6_4 may be in a Hiz state while the E8a emulator is active Therefore set the pin resistance value so the voltage cannot be at the midpoint potential depending on the voltage dividing of the resistance inside the E8a emulator Figure 4 9 on page 16 Pulled up at 4 7kQ or more E8a Connecting Connector 1 Ps a eee va Figure 4 5 Connection of the SCLK RxD TxD and BUSY pins to the E8a Emulator 2 EPM pin The E8a emulator uses pin P5_5 EPM for MCU control Connect the E8a emulator to the MCU pin For P5_5 pull up the pin at the Vcc level or pull down it according to the MCU pin state after disconnecting the E8a emulator P5_5 may be in a Hiz state while the E8a emulator is active Therefore set the pin resistance value so the voltage cannot be at the midpoint potential depending on the voltage dividing of the resistance inside the E8a emulator Figure 4 9 on page 16 E8a Connecting Connector Figure 4 6 Connection of E8a Emulator and Pin P5_5 R20UT2011EJ0301 Rev 3 01 Page 14 of 42 May 08 2012 2rCENESAS E8a Emulator 4 Examples of Pin Handling for Connecting the E8a 3 CNVss pin The E8a emulator uses the CNVss pin for MCU control Pul
54. v 3 01 Specify an address to detect the data access Specify the bit number to set the address mask The specified lower bits of the specified address are masked If you compare data specify the data and data mask When selecting BYTE for the Access Size you can specify to FF When selecting WORD for the Access Size you can specify to FFFF If you do not compare data leave the Data item empty or enter O in the Mask If you do not use the data mask leave the Mask item empty Select one from BYTE WORD or Not specify for the Access Size If a data access which does not match the specified access size occurs the event is not encountered When specifying WORD for the Access Size specify the even address for the Address item Select an access type R W READ or WRITE READ WRITE Page 25 of 42 2rCENESAS E8a Emulator 6 E8a Emulator Functions Supplement on the User s Manual 2 Event B Set the contents of the Event B You can set the conditions of the address comparison with mask specification for the Event B Table 6 4 Contents of the Event B Address with mask specification Same as the Event A Access Size Same as the Event A Access Type Same as the Event A 3 Break Condition Set the break condition Table 6 5 Break Condition Select a break condition None None specified No break by event Event A Breaks the program when the Event A is encountered Event A or B Breaks the prog
55. when an event is encountered in the order of the Event B and Event A Select an event to record when tracing data Event A Records only data access which encounters the condition of the Event A Event A or B Records only data access which encounters the condition of either the Event A or Event B R20UT2011EJ0301 Rev 3 01 Page 26 of 42 May 08 2012 CENESAS E8a Emulator 6 E8a Emulator Functions Supplement on the User s Manual 6 4 Display contents of the Trace window To display the trace results open the Trace window For each function of the popup menu refer to the E8a User s Manual The items displayed in the sheet are shown in Table 6 7 Type Address Data Instruction Source momom om om m m om om m WOUOOY QUO BRANCH J00083c4 giake To iiaeiai OOO006 O006 DESTINATION Q000E096 LDC 0508H IS lde istack top isp set re fa ee af r k AT 7 mrg i 74 A y L WOU UUU BRANCH UUDELLA 4 A mair Sr a mair DESTINATION OO00E04C MOV B FO 0402H ga 0 BRANCH 0000E05D SR W uncl funcl UO gae DESTINATION dQO00E008 H AANAND UOU J01 BRANCH OOOOEOLE 0000 0000 DESTINATION OO00E060 Ce mny nn Figure 6 3 Trace Window Table 6 7 Trace Display Item Description Displays the pointer numbers in the trace buffer Displays them in ascending order with the trace end position as 0 LIP Displays the instruction pointer Type Displays the type of trace information When the branch trace is
56. y 08 2012 2rCENESAS E8a Emulator 7 Notes on Using the E8a Emulator 10 Registers initialized by the E8a emulator When the system is launched the E8a emulator initializes the general registers and some of the flag registers as shown in Table 7 4 Table 7 4 E8a Emulator Register Initial Values nitial Value E8a PC Reset vector value in the vector address table Emulator RO to R3 bank 0 1 0000h Activation AO A1 bank 0 1 0000h FB bank 0 1 0000h INTB 00000h USP 0000h ISP Work RAM Address for the E8a emulator 80h 1 SB 0000h FLG 0000h 11 Reserved area The addresses not specified in the Hardware Manual of MCUs are reserved area Do not change the contents Otherwise the E8a emulator cannot control the MCU The value of this area is undefined when referenced in the memory window In this area the memory window s search compare and move functions do not work normally 12 On chip oscillator for the E8a emulator The on chip oscillator for the E8a emulator is activated during the debugging by the E8a emulator For this reason functions to reduce power consumption need to be checked using your final products or system for which only the user program is written to the MCU with the E8a emulator disconnected The functions can also be checked by writing only the user program to the MCU in the Program Flash mode ending the debugger then executing the user program In the Emulator Setting dialog box dis
Download Pdf Manuals
Related Search
Related Contents
Mode d`emploi de la Cigarette électronique zEcigarette eGo-T SOFT-STARTER Arrancador Suave, Chave de Partida Soft TW2G01056_00_FR_WTD8074SF_EFE115F-propo 1.qxd REPUBLICA DEL PARAGUAY Transcend T.sonic 820 2 Gb mp3 player LUBE-IT 5 Tutorial - Generation Systems here NÁVOD K POUŽITĺ Use and Care Manual Z-Drive 4500 User Guide Copyright © All rights reserved.
Failed to retrieve file