Home

User`s Manual - Renesas Electronics

image

Contents

1. Current consumption 500 mA max Target interface Target cable length 8 pin cable Supply voltage 5 0 V 0 3V typ Supply current 100 mA max Voltage range 2 7 to 5 5 V 1 4 Firmware Update 1 Installation of the USB driver This USB driver is required to connect the host machine and EZ CUBE Download it from the CD Please install this USB driver at first 2 Connecting the USB cable Connect EZ CUBE to the host machine Do not connect EZ CUBE to the target system The mode LED glows red after connection 3 Startup of EZ CUBE firmware update tool Start the EZ CUBE firmware update tool QBEZUTL exe QBEZUTL exe V1 14 or later must be necessary Hex File CEA ae FW Ver l i User s Manual 10 CHAPTER1 OVERVIEW 4 Select firmware Click the button Select firmware of EZ CUBE hex and click the OK button 5 Update firmware Click the Start button Start to update the EZ CUBE firmware If firmware update is finished the following dialog box appears QBEZUIL success Please exit this program and remove a USB cable 6 Quit EZ CUBE firmware updaie tool Click the Exit button Quit EZ CUBE firmware update tool 7 Unplugging the USB cable Unplug the USB cable from EZ CUBE or the host machine 1 5 Standard configuration Main EZ CUBE emulator YRCNEZCUBE01 unit USB interface cable A pulg mini B plug Target system interface cable 8 pin
2. Note The downloading speed can be increased by replacing this line with the statement monitorromsym to perform a symbol definition only This effect is not applicable if values are filled into a hole area without a code When performing filling the filling value must be OxFF for securing the area e Link directive Add the following code to the link directive file The following shows an example when the internal ROM end address is Ox3ffff and internal RAM end User s Manual 75 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER address is OxSffefff MROMSEG LOAD R VOx03f800 MonitorROM PROGBITS 2A MonitorROM D MRAMSEG LOAD RW VOxO3ffeffO MonitorRAM NOBITS 2AW MonitorRAM p d Securing of communication serial interface 7 2 3 1 2 3 4 UART is used for communication between EZ CUBE and the target system The settings related to the serial interface modes are performed by the debug monitor program but if the setting is changed by the user program a communication error may occur To prevent such a problem from occurring communication serial interface must be secured in the user program How to secure communication serial interface Create the user program observing the following points e Serial interface registers Do not set the registers related to UART in the user program e Interrupt mask register When UART is used do not mask receive end interrupts
3. The LVI setting at address C1H in the internal flash memory during debugging is set as follows When EZ CUBE is connected The LVI default start function is available When EZ CUBE is not connected The LVI default start function is unavailable On chip debugging option byte setting address C3H The on chip debugging option byte setting is rewritten arbitrarily by the debugger Operation at voltage with which flash memory cannot be written If any of the following debugger operations lt 1 gt to lt gt which involve flash memory rewriting is performed while flash memory cannot be rewritten the debugger automatically changes the register setting so as to enable flash memory rewriting and restores the register setting after the operation is completed If any of the following operations lt 1 gt to lt 7 gt is performed while flash memory rewriting has been disabled or operation is performed at a voltage with which flash memory cannot be rewritten however the debugger outputs an error and the operation is ignored To prevent the flash memory from being rewritten select No in permit flash programming in property of debug tool To prevent the frequency from being switched automatically select User in the Monitor clock in property of debug tool lt 1 gt Writing to internal flash memory lt 2 gt Setting or canceling of software breakpoint lt 3 gt Starting execution at the set software breakpoint position lt 4 gt Step ex
4. A timeout error The MCU is in the reset state Is system reset issued is displayed in cases of contention between a reset through a pin from the watchdog timer etc and operations by the emulator system memory reference in the Memory window etc The emulator is initialized and the user program stops After a system reset is issued the trace record is initialized too Debugging can be continued 2 Reset cancellation time of the target system Exceed the VIH voltage within 100ms after cancelling the reset input 3 MCUs that are used in debugging MCUs that are connected to the emulator and used in debugging are placed under stress by repeated programming of flash memory during emulation Do not use MCUs that were used in debugging in mass production for end users 4 High Speed Clock Oscillator HOCO The emulator uses a device s internal high speed clock oscillator hereafter the HOCO to achieve communications with RX200 series and RX100 series MCUs via FINE interface Therefore the HOCO is always in an oscillating state no matter how the HOCO related registers are set If there is a contention between switching of the HOCO frequency and memory access the memory access operation is not guaranteed 5 Final Evaluation of the User Program Before entering the mass production phase be sure to perform a final evaluation of the program which is written to a flash ROM using a flash programmer Be sure to perform the evaluation sing
5. Stops execution of the user program lt 2 gt Step execution of the standby instruction Stops user program after execution instruction lt 3 gt Pseudo real time RAM monitor function Break When Readout lt 4 gt Pseudo Dynamic Memory Modification Break When Write lt 5 gt Breakpoint setting executing of the user program Cautions on using sitep in step execution The value of some SFRs special function registers might remain unchanged while stepping into code If the value of the SFRs does not change while stepping into code operate the microcontroller by continuously executing the instructions instead of executing them in steps Stepping into code Instructions in the user created program are executed one by one Continuous execution The user created program is executed from the current PC value 10 Emulation of flash memory CRC accumulator function Please check the operation of high speed CRC by using IECUBE or using device without EZ CUBE User s Manual 27 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER 3 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a RL78 microcontroller using EZ CUBE 3 3 1 Specifications of programming function Table 3 7 Specifications of Programming Function Functions Host interface Specifications USB 2 0 Target interface Target system voltage UART 1 wire mode 2
6. 7 to 9 bytes as the stack area for debugging Since this area is allocated immediately before the stack area the address of this area varies depending on the stack increase and decrease Figure 5 12 illustrates the case where the stack area is increased when the internal high speed RAM starts from OxFBOO Figure 5 12 Variation of Address of Stack Area for Debugging OxFEEO Yj Be OxFEEO E Stack area for debugging gt ch Blank space in internal i OxFBO7 Yj high speed RAM 0xFB00 0xFB00 0xFB00 The size of this area also varies depending on whether software breaks or pseudo real time RAM monitor is used Table 5 6 Size of Stack Area for Debugging Standard 7 bytes When software breaks are used 9 bytes How to secure areas Refer to the address range shown below and set the stack pointer Example When internal high speed RAM starts from 0xFB00 Standard Within the range 0xFB07 to OxFEEO When software breaks are used also refer to e Within the range OxFBO9 to OxFEEO e Area for software break This area is used for software breaks How to secure areas Refer to the following and secure the area SSS CSEG AT 07EH SSS is any symbol name eight characters or less DB OFFH OFFH User s Manual 54 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER 5 2 3 Cautions on debugging 1 2 3 4 5 6 This section describes cautions on performing on chip debugging for a 7
7. and the reset signal is only generated via resistors or capacitors Design the circuit observing the conditions described below in Remark Figure 5 5 Circuit Connection with Reset Circuit That Contains No Buffers EZ CUBE Target device Reset connector RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more The circuit enclosed by a dashed line is not required when only flash programming is performed User s Manual 47 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER 5 1 4 Cautions on Target system Design Note the following cautions when designing the target system e If possible do not create sections in which the communication lines for debugging run in parallel in the target system If this cannot be prevented shorten the sections as much as possible e Use a GND pattern to shield the communication lines for debugging to reduce their capacitive load because the lines are used for high speed communication e Make the distance between the target connector and the target device as short as possible e Before shipping the product use jumpers or other means to physically separate the X1 OCD1A and X2 OCD1B pins from the target connector in order to ensure normal clock oscillation e To use X1 OCD1A and X2 OCD1B as communication pins for debugging remove elements such as resonator capacitance and feedback resistors so that the signals do not degrade due to capacitive l
8. device E RX210 RX220 group RX111 group Supporting voltage 2 7 3 6V 2 7 5V 2 7 3 6V Maximum operating frequency 100 MHz 50 MHz 32 MHz Operation mode Single chip mode Download to internal ROM Available Execution control Go Stop Step in Step over Return out CPU Reset Restart Software break Maximum 256 points een Maximum 8 points Maximum 4 points Event Data access Maximum 4 points Maximum 2 points Number of passes Maximum 256 times None Pre PC break Maximum 8 points Maximum 4 points On chip Combination of 3 break events OR AND cumulative Sequential Other Trace full break Maximum 64 branches Trace Internal trace Maximum 256 branches Vie GE Maximum 32 branches RX220 Execution cycle Maximum f Performance measurement 2 points or sumber of EE None 32 bit counter x 2 Debug communication pin FINEC MD FINED MD FINED User s Manual 65 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 2 2 Notes on debugging 1 Reset during the User Program Execution If an internal reset occurs during user program execution it becomes impossible to control from the emulator Do not generate an internal reset such as those generated by the watchdog timer When a pin reset has occurred during the execution of the target system user program may hang up If a pin reset input is detected input a reset from the emulator and re execute a user program but it may become a break state to be unable to re execute An error message
9. 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 anticrime 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 8 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 9 Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas Electronics prod
10. euni Zelt tt Aue tal asc ER te ett Mee 65 6 2 2 Notes on debuggmmg ARA 66 6 3 Flash Programming nocione i he cave eel alld oe aie re a ale eerie vais 67 6 3 1 Specifications of programming function 67 6 3 2 Cautions on flash programming cece eeeeaeeeeeeeseeeeeseaeeettaeeneeeeeaes 67 CHAPTER 7 HOWTO USE EZ CUBE WITH V850 MICROCONTROLLER 68 7 1 Target System Desig aeti e aat e aaa ea aaea a See e 69 TAA IL EEN 69 7 1 2 Circuit connection evamples 70 7 1 3 Connection of reset pin ccc cece ceeeee cence eeeaeeeeeeeceeeeesaaeeseaaeseeeeeseeeesaeeseeeeeaes 71 7 2 On Chip DEDUQGING DEE 73 T21 Debug FUNCTIONS EEN 73 7 2 2 Securing of user resources and setting of security ID 73 7 2 3 Cautions ON debugging cece ee andaa aa a aaa aea Se aa aara a aE aaa 76 7 3 ER Programit EE 79 7 3 1 Specifications of programming function 79 7 3 2 Cautions on flash programming 79 User s Manual CHAPTER1 OVERVIEW CHAPTER1 OVERVIEW EZ CUBE Emulator hereinafter referred to as EZ CUBE is an on chip debug emulator with flash programming function which is used for debugging and programming a program to be embedded in on chip flash memory microcontrollers This product can debug with the target microcontroller connected to the target system and can write programs to the on chip flash memory of microcontrollers 1 1 Features e On chip debugging Can debug with the target microcontroller connected to the target system e Flash m
11. is only generated via resistors or capacitors Design the circuit observing the conditions described below in Remark User s Manual 71 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER Figure 7 4 Circuit Connection with Reset Circuit That Contains No Buffers EZ CUBE RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more The circuit enclosed by a dashed line is not required when only flash programming is performed User s Manual 72 7 2 On Chip Debugging This section describes the system configuration startup shutdown procedure and cautions for debugging when on chip debugging is performed with EZ CUBE 7 2 1 Debug functions Table 7 4 lists the debug functions when a V850 microcontroller is the target device and the debugger is used Table 7 4 Debug Functions Functions Specifications Target Device V850 V850ES Jx3 V850ES Jx3 L Security 10 byte ID code authentication Download Available Execution Go Step In Step Over CPU Reset Restart Hardware break 1 point Software break Multiple points RAM monitoring Available Function pins used for debugging RXD TXD 7 2 2 Securing of user resources and setting of security ID The user must prepare the following to perform communication between EZ CUBE and the target device and implement each debug function Refer to the descriptions on the following pages and set these items in t
12. program Caution on downloading a HEX file When downloading a HEX file do not set specify a filling value other than OxFF for the object converter option U Cautions when stepping into code The value of some SFRs special function registers might remain unchanged while stepping into code If the value of the SFRs does not change while stepping into code operate the microcontroller by continuously executing the instructions instead of executing them in steps Stepping into code Instructions in the user created program are executed one by one Continuous execution The user created program is executed from the current PC value Emulation of POC function The POC function of the target device cannot be emulated Make sure that the power to the target system is not shut down during debugging User s Manual 56 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER 5 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a 78KO microcontroller using EZ CUBE 5 3 1 Specifications of programming function Table 5 7 Specifications of Programming Function Functions Specifications Host interface USB 2 0 Target interface UART Target system voltage 2 7 to 5 5 V depends on the target device Clock supply 8MHz clock can be supplied Clock mounted on the target system can be used Power supply 5 0 3 V maximum current rating 100 m
13. selected normally e Whether communication is performed normally e The user resource has not been secured or the security ID has not been set To perform debugging with EZ CUBE the user resource must be secured and the security ID must be set e Unsupported software debugger device file or firmware is used The software used may not support debugging of the target device e Defect of EZ CUBE EZ CUBE may have a defect 2 3 3 System shutdown procedure Terminate debugging and shutdown the system in the following order If the following order is not observed the target system or EZ CUBE may be damaged 1 Close the emulator debugger Close the emulator debugger 2 Turn off the target system Turn off the target system This step is not necessary when power is supplied to the target system from the EZ CUBE emulator 3 Turn off the emulator and disconnect the emulator Disconnect the USB interface cable from the emulator The EZ CUBE emulator is turned off by disconnecting from the USB interface cable 4 Disconnecting the target system Disconnect the user system interface cable from the target system User s Manual 15 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER This chapter describes how to use EZ CUBE when performing on chip debugging and flash programming for a RL78 microcontroller On chip debugging is a method to debug a microcontroller mounted on the ta
14. verify and evaluate the following items before using EZ CUBE emulator Circuits are designed as described in the user s manuals for the device The device and the software are used as described in each user s manual The power supplied to the target system is stable 11 Debugging with real machine running If debugging is performed with a real machine running without using emulator write the user program using the programming software Programs downloaded by the debugger include the monitor program and such a program malfunctions if it is not controlled via EZ CUBE emulator 12 Regarding watchdog timer The watchdog timer is forcibly stopped by the debug monitor program Therefore do not use the option byte to specify that the watchdog timer cannot be stopped For details about the option byte settings see the user s manual of the target device User s Manual 77 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER 13 Regarding external reset A break occurs when an external reset occurs except when resets are masked or an internal reset occurs 14 Regarding reset vector handling Reset vector handling is not supported User s Manual 78 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER 7 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a V850 microcontroller using EZ CUBE 7 3 1 Specifications of programming f
15. 0 EZ Emulator Property D Internal ROM RAM Main clock source Monitor clock System H Flash Security ID FFFFFFFFFFFFFFFFFFFF Main clock source Selects the main clock source to be input to the CPU Debug Tool Settings Download File Settings Hook Transaction Settings User s Manual 49 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER 5 2 On Chip Debugging This section describes the system configuration startup shutdown procedure and cautions for debugging when on chip debugging is performed with EZ CUBE 5 2 1 Debug functions Table 5 4 lists the debug functions when a 78KO microcontroller is the target device Table 5 4 Debug Functions Functions Specifications Target device 78KO 78K0 Kx2 Lx3 Security 10 byte ID code authentication Download Available Execution Go Step In Step Over CPU Reset Restart Hardware break 1 point Software break Multiple points User spaces used for debugging Internal ROM 256 to 400 bytes Internal RAM 7 to 9 bytes depending on the device used Function pins used for debugging X1 X2 5 2 2 Securing of user resources and setting of security ID EZ CUBE uses the user memory spaces shaded portions in Figure 5 8 to implement communication with the target device or each debug functions The areas marked with a dot are always used for debugging and other areas are used for each debug function used Refer to the descriptions of a to e on t
16. 5V or Power output 5V GND Power Ground Geentrom EZ CUBE side User s Manual 59 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 1 2 Recommended Circuit Connection 1 Recommended Circuit Connection for Debugging Figure 6 2 shows the recommended circuit connection for debugging Figure 6 2 Recommended Circuit Connection Pulled up at 4 7 KQ to 10 KQ Vcc Vcc Veco Vec Vcc Vcc Target connector Pulled up at 4 7 KQ MCU FINEC MD FINED TxD1 2 RxD1 RES Reset circuit D Open collector buffer 7 ircuit for e selection of the UB operating mode EMLE Pulled down GND at 4 7 KQ to 10 KQ connected au Connect FINEC pin for debugging RX63T group R5F563T4 5 6 No need connection for debugging RX210 RX220 and RX111 groups This pin can be used as the normal port 2 The output of the reset circuit of the target system must be open collector 3 TxD1 and RxD1 pins are not used for debugging No need connection 4 Beier to Notes on Connection for detailed process of UB and EMLE pins 45 Connected pin of the MCU for debugging is different from for flash programming Connect to MD FINED pin of the MCU and pull up RxD1 pin of the MCU User s Manual 60 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 2 Recommended Connection Circuit for Flash Programming Figure 6 3 shows the recommended circuit connection for f
17. 7 to 5 5 V depends on the target device Clock supply Power supply Internal high speed oscillation clock is used 5 V 0 3 V maximum current rating 100 mA Acquisition of device specific information Parameter file for Renesas Electronics is used Programming software RFP Weis Renesas Flash Programmer Security flag setting Standalone operation Available Unavailable must be connected to host machine Note For detailed usage of the RFP refer to the RFP User s Manual 3 3 2 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of EZ CUBE e To improve the writing quality fully understand verify and evaluate the following items before using EZ CUBE Circuits are designed as described in the user s manuals for the device and EZ CUBE The device RFP and EZ CUBE are used as described in each user s manual The power supplied to the target system is stable User s Manual 28 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER CHAPTER 4 HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER This chapter describes how to use EZ CUBE when performing on chip debugging and flash programming for a 78KOR microcontroller On chip debugging is a method to debug a microcontroller mounted on the target system using a debug function implemented in the device Since debugging is performed with the target device op
18. 8KO microcontrollers Be sure to read the following to use EZ CUBE properly Handling of device that was used for debugging Do not mount a device that was used for debugging on a mass produced product because the flash memory was rewritten during debugging and the number of rewrites of the flash memory cannot be guaranteed Overwriting flash memory during on chip debugging If the following operations are performed during on chip debugging the flash memory in the device is overwritten lt 1 gt Writing to internal flash memory lt 2 gt Program execution after specifying or canceling software breakpoints lt 3 gt Step over execution Return Out execution lt 4 gt Come Here lt 5 gt If Permit is selected in the Target Power off area in the Configuration dialog box the following operations cannot be performed a Specifying changing or canceling hardware breakpoints b Masking unmasking internal resets c Switching peripheral breakpoints d Program execution e Software reset a reset performed by the debugger lt 6 gt Adding changing or deleting the monitor address when using the pseudo real time RAM monitor function lt 7 gt Performing operations without using breakpoints when software breakpoints are specified lt 8 gt When the debugger is started or terminated It takes time from completion of flash memory programming until the control is passed to GUI Software break During program running do not rewrite the data at the addre
19. A Acquisition of device specific Parameter file for Renesas Electronics is used information Programming software RFPN Renesas Flash Programmer Security flag setting Available Standalone operation Unavailable must be connected to host machine Note For detailed usage of the RFP refer to the RFP User s Manual 5 3 2 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of EZ CUBE e To improve the writing quality fully understand verify and evaluate the following items before using EZ CUBE Circuits are designed as described in the user s manuals for the device and EZ CUBE The device RFP and EZ CUBE are used as described in each user s manual The power supplied to the target system is stable User s Manual 57 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER This chapter describes how to use EZ CUBE when performing on chip debugging and flash programming for a RX microcontroller On chip debugging is a method to debug a microcontroller mounted on the target system using a debug function implemented in the device Since debugging is performed with the target device operating on the board this method is suitable for field debugging Flash programming is a method to write a program to the flash memory embedded in a device Erasing writing and verifying the progr
20. APTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Table 3 3 Pin Functions Note Pin Name IN OUT Description RESET_IN IN Pin used to input reset signal from the target system RESET_OUT OUT Pin used to output reset signal to the target device FLMDO OUT Pin used to set the target device to debug mode or programming mode RXD IN OUT Pin used to transmit receive command data between the target device TOOLO IN OUT Pin used to transmit receive command data between the target device CLK IN Pin used to input handshake signal from the target device Note As seen from EZ CUBE 3 1 2 Circuit connection example Refer to Figure 3 2 and Figure 3 3 design an appropriate circuit Caution The constants described in the circuit connection example are reference values If you perform flash programming aiming at mass production thoroughly evaluate whether the specifications of the target device are satisfied Figure 3 2 RL78 G10 G12 20pin 24pin Recommended Circuit Connection Voo User circuit Target connecior er circul User signal Reset KeyReturn Serial Target device GND or Port FLMDO CLK RxD RESET_OUT TOOLO TOOLO GND EZ CUBE Switch Setting For RL78 G10 G12 20pin 24pin SW 1 Select switch to M2 SW 2 Select switch to Int Clock SW 3 Select switch to Debug Mode SW 4 Depend on the target system environment SW 5 Select switch to M KCAUTION SCS Notes on the Target System Pow
21. CC 0x12 0xCD 0x34 2 Setting of the security ID by build tool common options In case of CS CubeSuite Set in device in the common options tab as figure 3 6 Figure 3 6 Security ID Setting Example ES Property 4 CG_main c A CA7SKOR Property Output hex file Yes Output folder for hex file BuildM odeN amex Hex file name ProjectN ame hex Intel expanded hex Tomat ke S F 0123456789ABCDEF1234 Build Method DI Version Select Notes DI Others Device Common Options Compile Options Assemble Options Link Options How to authenticate the security ID at debugger startup When connecting a debugger to the device set the security ID it is necessary to specify the security ID by connection settings in debug tool property Default security ID is set in build tool property User s Manual 22 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER b Setting of On chip debugging option byte This is the area for the security setting to prevent the flash memory from being read by an unauthorized person The debugger manipulates the target device in accordance with the set value as shown below Table 3 6 On Chip Debug Option Byte Setting and Operation Set Value Description Remark Debugging is disabled This setting is available only for flash programming and self programming The on chip flash memory is not erased no matter how many times the security ID code authentication
22. CD ROM User s Manual 11 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE This chapter describes the part names and functions of EZ CUBE and its accessories The part names described in this chapter are used throughout this document This chapter provides an overview of the various functions Reading it through the reader will gain a basic grasp of EZ CUBE While reading this chapter also check if the hardware has a defect 2 1 Part Names and Functions of EZ CUBE Figure 2 1 shows the part names of the EZ CUBE main unit For their functions refer to 1 to 9 below Figure 2 1 Part Names of EZ CUBE Mode LED RENESAS External Xtal socket EZ CUBE Target interface I USB interface connector connector wi Ext Clock Stand alone 5 Vi SW switch 1 SW 1 switch The position of this switch depends on the target devices The detail describes please see the follow chapter This switch is set to M2 at shipment 2 SW 2 switch This switch is used to set clock Table 2 1 describes the setting details This switch is set to Int Clock at shipment Table 2 1 Setting of Clock Select Switch Setting Description Int Clock When this SW 2 is turned to Int Clock position 8MHz fixed freq is to be supplied to the target board Ext Clock If the other freq is required it should be turned to Ext Clock position Ext X tal should be connected in this case 3 SW 3 switch
23. CDEF1234 not case sensitive Table 4 6 Security ID Address Value 0xC4 0x01 0xC5 0x23 0xC6 0x45 0xC7 0x67 0xC8 0x89 0xC9 0xAB 0OxCA 0xCD 0xCB OxEF 0xCC 0x12 0xCD 0x34 2 Setting of the security ID by build tool common options In case of CS CubeSuite Set in device in the common options tab as figure 4 5 Figure 4 5 Security ID Setting Example A CA7SKOR Property Additional include paths Additional include paths 0 System include paths System include paths 0 Macro definition Macro definition 0 E Frequently Used Options for Link Using libraries Using libraries 0 Additional library paths Additional library paths 0 Output folder Output file name a Imf D Frequently Used Options for RO Mization Output ROMized object file No E Frequently Used Options for Object Convert Output hex file Yes Output folder for hex file BuildModeN ame Hex file name ProjectN ame hex Hex file format Intel expanded hex Tomat ke E Deva Security ID FE 123456789ABCDEF123D4 Build Method Version Select mse Build mode Selects the build mode name to be used during build Assemble Options ROMization Process i Compile Options lt Link Options Object Convert Opti User s Manual 35 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER b Setting of On chip debug option byte area This is the area for the security setting to prevent the flash memory
24. E Target device Reset connector RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more The circuit enclosed by a dashed line is not required when only flash programming is performed User s Manual 20 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER 3 2 On Chip Debugging This section describes the system configuration startup shutdown procedure and cautions for debugging when on chip debugging is performed with EZ CUBE 3 2 1 Debug functions Table 3 4 lists the debug functions when a RL78 microcontroller is the target device Table 3 4 Debug Functions Functions Specifications Target device RL78 RL78 G10 12 G13 G14 11A Security 10 byte ID code authentication Download Available Execution Go Step In Step Over CPU Reset Restart Hardware break 1 point Software break Multiple points User spaces used for debugging 1 wire mode Internal ROM 1024 bytes 22 bytes Internal RAM 6 bytes Note Function pins used for debugging TOOLO Note For details refer to 3 2 2 Securing of user resources and setting of security ID and on chip debug option byte 3 2 2 Securing of user resources and setting of security ID and on chip debug option byte debugging resources The user must prepare the following to perform communication between EZ CUBE and the target device and implement each debug function Refer to the descriptions on the following
25. H C3H b On chip debug option byte area 03H 02H a Debug monitor area Area used for on chip debugging Note In debugging reset vector is rewritten to address allocated to a monitor program 1 Securing of debug monitor area This is the area to which the debug monitor program is to be allocated The monitor program performs initialization processing for debug communication interface and RUN or break processing for the CPU This user programs or data must not be placed in an area of 22 bytes near the on chip debug option byte and an area of 1 024 bytes before the internal ROM end address In addition reset vector is rewritten to address allocated to a monitor program How to secure areas It is not necessarily required to secure this area if the user program does not use this area However To avoid problems that may occur during the debugger startup it is recommended to secure this area in advance using the compiler Figure 4 6 shows example for securing the area using the CS CubeSuite Set in device in link options tab as figure 4 6 2 Securing of stack area for debugging This area requires 6 bytes as the stack area for debugging Since this area is allocated immediately before the stack area the address of this area varies depending on the stack increase and decrease That is 6 extra bytes are consumed for the stack area used Figure 4 8 illustrates the case where the stack area is inc
26. HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER During on chip debugging a reset signal from the target system is input to EZ CUBE masked and then output to the target device Therefore the reset signal connection varies depending on whether EZ CUBE is connected For flash programming the circuit must be designed so that the reset signals of the target system and EZ CUBE do not conflict Automatically switching the reset signal via resistor recommended described in recommended circuit connection in the previous section Figure 5 4 illustrates the reset pin connection described in 5 1 2 Circuit connection examples This connection is designed assuming that the reset circuit on the target system contains an N ch open drain buffer output resistance 1009 or less The VDD or GND level may be unstable when the logic of RESET_IN OUT of EZ CUBE is inverted so observe the conditions described below in Remark Figure 5 4 Circuit Connection with Reset Circuit That Contains Buffer EZ CUBE Target device Reset connector RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more Pull up resistor R2 is not required if the buffer of the reset circuit consists of CMOS output The circuit enclosed by a dashed line is not required when only flash programming is performed Figure 5 5 illustrates the circuit connection for the case where the reset circuit on the target system contains no buffers
27. ID and on chip debug option byte The user must prepare the following to perform communication between EZ CUBE and the target device and implement each debug function Refer to the descriptions on the following sections and set these items in the user program or using the build tool property a Setting of Security ID This setting is to prevent the flash memory from being read by an unauthorized person Embed a security ID at addresses 0xC4 to OxCD in the internal flash memory The debugger starts only when the security ID that is set during debugger startup and the security ID set at addresses 0xC4 to OxCD match If the ID codes do not match the debugger manipulates the target device in accordance with the value set to the on chip debug option byte area refer to Table 4 7 If the user has forgotten the security ID to enable debugging erase the flash memory and set the security ID again How to set A setting method of the security ID is following When both 1 and 2 methods are done at a time method 2 has a priority 1 Embed the security ID at addresses 0xC4 to OxCD in the user program 2 Setting of the security ID by build tool common options In case of CS CubeSuite User s Manual 34 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 1 Embed a security ID at addresses 0xC4 to OxCD in the user program For example If the security ID is embedded as follows the security ID set by the debugger is 0123456789AB
28. Nore Note Do not mask receive error interrupts e Port registers When UART is used do not set port registers to make the TxD and RxD pins invalid Cautions on debugging This section describes cautions on performing on chip debugging for a V850 microcontroller Be sure to read the following to use EZ CUBE properly Handling of device that was used for debugging Do not mount a device that was used for debugging on a mass produced product because the flash memory was rewritten during debugging and the number of rewrites of the flash memory cannot be guaranteed Moreover do not embed the debug monitor program into mass produced products Notes on downloading When debugging reset CPU before downloading If DMA transfer to the internal RAM is performed while a program is being downloaded to the flash memory downloading of the program may not be performed normally When breaks cannot be executed Regarding ROM correction function Do not use the ROM correction function or else unexpected breaks will occur Regarding current consumption User s Manual 76 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER The current consumption in the target device increases during debugging compared with that in normal operation mode because the OCD unit of the target device operates during debugging 5 Regarding standby release with debugging functions In case using the RRM function and DMM function the standby mode is released when the mem
29. O DI System libraries System libraries O DI Additional library paths Additional library paths 0 DI System library paths System library paths 0 Device Use on chip debug Debug monitor area size byte 1 byte value Set Hash start address Boot area load module file name Message Ti Geet User option byte value Specifies the user option byte value in hexadecimal without This option corresponds to the qb option Common Options lt lt Compile Options re Assemble Options E User s Manual 52 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER c Security ID area essential This is the area for the security setting to prevent the flash memory from being read by an unauthorized person The security ID functions as a password for starting the debugger The debugger starts only when the security ID that is input during debugger startup and the security ID embedded in this area match If you forget the security ID erase the flash memory and set a new security ID How to set There are the following 2 methods to set a security ID to the internal flash memory If both 1 and 2 are set the setting of 2 has precedence 1 Embedding the security ID in 0x85 O0x8E in the user program Embed the security ID in 0x85 O0x8E in the user program For example if the security ID is embedded as described below the security ID set in the debugger is 0123456789ABCDEF 1234 not case sensitive Example Setting the s
30. This switch is used to set run mode of program Table 2 2 describes the setting details This switch is set to Debug Mode at shipment User s Manual 12 4 5 6 7 8 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE Table 2 2 Setting of Program Run Select Switch Debug Mode On Debug position the user s program will run when RUN command is issued from the debugger GUI Stand Alone On Stand Alone position the user s program is automatically run when the reset is released even the cables from EZ CUBE is connected to the target board SW 4 switch This switch is used to set the power supplied to the target system Table 2 3 describes the setting details This switch is set to bi at shipment Caution Do not change the switch setting while the USB cable is connected Table 2 3 Setting of Power Select Switch Setting Description 5 5 V 0 3V is supplied from EZ CUBE to the target system The supplied power is fed back to EZ CUBE and used only for power detection T Power supply of the target system is used EZ CUBE only detects the power for the target system Note The maximum rating of the current is 100mA so do not use EZ CUBE with the target system with the higher current rating The power is always supplied after EZ CUBE is connected to the host machine SW 5 switch The position of this switch depends on the target devices The detail describes please see the follow chapter This switch
31. am can be performed on board with the device Please update firmware for RX at first Refer to description 1 to 3 on the following order For detail refer to 1 4 Firmware update 1 Connect EZ CUBE to the host machine Do not connect EZ CUBE to the target system 2 Start the EZ CUBE firmware update tool QBEZUTL exe Select firmware of RX RX_OCD_FW hex 3 Click the Start button Start to update the EZ CUBE firmware Read the following chapters if you are using EZ CUBE for the first time with a RX microcontroller as the target device 6 1 Target System Design For communication between EZ CUBE and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors 6 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with EZ CUBE 6 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with EZ CUBE Supporting MCU Table 6 1 shows the supporting MCUs of RX EZ CUBE firmware Table 6 1 Supporting MCUs of RX EZ CUBE firmware a a RX600 series RX63T group R5F563T4 5 6 Supporting MCUs RX200 series RX210 RX220 groups RX_OCD_FW hex Moie RX100 series RX111 group Supporting Operation mode Single chip mode Note RX_OCD_FW_V102 firmware can use combination with CS V3 00 and the later RX_OCD_FW_1 101 firm
32. anual of the MCU MD FINED signal and TxD signal are assigned to the same pin Connect this pin to RxD1 pin of the MCU for internal flash programming with Renesas Flash Programmer 3 About the RES pin The emulator uses the RES pin If the target system includes a user logic reset circuit the output signal from the reset circuit must be connected to the RES pin of the connector via an open collector buffer If there is no reset circuit on the other hand the RES pin of the connector must be directly connected to the RES pin of the MCU 4 About the EMLE pin Only RX63T group R5F563T4 5 6 Pull the levels on the EMLE down at 4 7 KQ to 10 KQ on the target system 5 About the UB pin UB pin is the port for entering the user boot mode and the USB I F mode Which port is the UB pin depends on the MCU Refer to the section on operation modes in the hardware manual of the MCU to be used The handling of pins is not necessary for debugging RX63T group R5F563T4 5 6 because of not having the user boot mode Pull the levels on the UB down at 4 7 KQ to 10 kQ on the target system not to transit to the user boot mode for debugging RX210 and RX220 groups Pull the levels on the UB up at 4 7 KQ to 10 kQ on the target system not to transit to the USB I F mode for debugging RX111 group User s Manual 63 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 About VCC Connect the VCC of the connector to the VCC power supply of the ta
33. aq CA78K0 Property EI Output File Output folder BuildModeN ame Output file name ProjectN ame rt Force linking against error No EI Library Using libraries Using libraries 0 System libraries System libraries 0 Additional library paths Additional library paths 0 System library paths System library paths 0 El Device Use on chip debug Yes go Debug monitor area size byte 256 Set user option byte No Set flash start address No Boot area load module file name Message Stack Link List Error List Others Using link directive fle This is the link directive file to be used for linking The valid link directive file registered to the project is searched and used This option corresponds to the d option Common Options Compile Options Assemble Options fA Object Convert Optio Variables Relocation b Option byte area required This is the area for the security setting to prevent the flash memory from being read by an unauthorized person The target device operates in accordance with the set value as shown below For the detailed settings of the option byte area refer to the user s manual of the device User s Manual 51 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER Table 5 5 Option Byte Setting and Operation Set Value Description 0x00 The debugger cannot be started even if EZ CUBE is connected 0x02 The internal flash memory is not erased regardless of how many times authent
34. ark Refer to the self programming manual for how to secure the stack area for self programming User s Manual 25 3 2 3 1 2 3 4 5 6 7 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Cautions on debugging This section describes cautions on performing on chip debugging for a RL78 microcontroller Be sure to read the following to use EZ CUBE properly Handling of device that was used for debugging Do not mount a device that was used for debugging on a mass produced product because the flash memory was rewritten during debugging and the number of rewrites of the flash memory cannot be guaranteed Moreover do not embed the debug monitor program into mass produced products Flash self programming If a space where the debug monitor program is allocated is rewritten by flash self programming the debugger can no longer operate normally This caution also applies to boot swapping for such an area Operation after reset After an external pin reset or internal reset the monitor program performs debug initialization processing Consequently the time from reset occurrence until user program execution differs from that in the actual device operation Checking operation of a device after debugging After downloading a load module file to the device to for on chip debugging do not check the operation of this device without EZ CUBE A device after debugging contains the specific program for on chip debuggi
35. art the EZ CUBE firmware update tool QBEZUTL exe Select firmware of 78KO 78KO_OCD_FW hex 3 Click the Start button Start to update the EZ CUBE firmware Read the following chapters if you are using EZ CUBE for the first time with a 78KO microcontroller as the target device 5 1 Target System Design For communication between EZ CUBE and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors 5 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with EZ CUBE 5 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with EZ CUBE Supporting MCU Table 5 1 shows the supporting MCUs of 78KO EZ CUBE firmware Table 5 1 Supporting MCUs of 78K0 EZ CUBE firmware a mer 78KO Kx2 Lx3 78K0_OCD_FW hex Supporting MCUs Supporting Operation mode UART mode User s Manual 42 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER 5 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming Figure 5 1 present overviews of the EZ CUBE communication interface For communication between EZ CUBE and the target system communication circuits must be mounted on the target system as shown on the left side of the figure R
36. asic knowledge of electric circuits logical circuits and MCUs When using the emulator 1 The emulator is a development support unit for use in your program development and evaluation stages When a program you have finished developing is to be incorporated in a mass produced product the judgment as to whether it can be put to practical use is entirely your own responsibility and should be based on evaluation of the device on which it is installed and other experiments 2 In no event shall Renesas Electronics Corporation be liable for any consequence arising from the use of the emulator 3 Renesas Electronics Corporation strives to provide workarounds for and correct trouble with products malfunctions However this does not necessarily mean that Renesas Electronics Corporation guarantees the provision of a workaround or correction under any circumstances 4 The emulator covered by this document has been developed on the assumption that it will be used for program development and evaluation in laboratories 5 Renesas Electronics Corporation cannot predict all possible situations and possible cases of misuse that carry a potential for danger Therefore the warnings in this user s manual and the warning labels attached to the emulator do not necessarily cover all such possible situations and cases The customer is responsible for correctly and safely using the emulator 6 The emulator covered by this document has not been through the process
37. cause of interference like external noise do the following to remedy the trouble 1 Exit the emulator debugger and shut OFF the emulator and the target system 2 After a lapse of 10 seconds turn ON the power of the emulator and the target system again then launch the emulator debugger Note Renesas Electronics China does not assume any liability for the user does not follow the user manual for the use of non normal and non practice due to loss of product failure and other related User s Manual CONTENTS CHAPTER 1 OVERVIEW icccccccccccccescccticti ccc ecuccevecdvcceweceveceveccucccveacveceveccucccvsacutccveucvets 8 1 1 KEE eege Eeer Ss Bae Lee EE etc 8 1 2 Notes Before Using EZ CUBE nenn nenn 9 1 3 Hardware Specification isin niere aeran aia a ia aia ideia Vaari 10 1 4 Firmware Update conero a GIS a a uer 10 1 5 Standard COnfiQuratiOn sisipin nisi aii i iiae aiaia e aaia ieaie 11 CHAPTER2 NAMES AND FUNCTIONS OF HARDWARE ccccccesseeeeseeeee 12 2 1 Part Names and Functions of EZ CUBE cccccceceesseceeeeneeeeeeeeeeeesesaeeeeesaeesesenaeeeeseaas 12 2 2 System CONFIQUIATION nasses aun nia eisai aa rad aaa ia ia ae ad a aa a aaia diaaa 14 2 3 E De E 14 2 3 1 Installing Emulator Software ccccceccceceeeeeeeeeceeeeecaeeeeeaeseeeeeseaeessaeeeeeeeeeaees 14 2 3 2 System startup Procedure ccccccccceceeceeeeeceeeeceeeeecaeeeeeeeseeeeeseaeessaeeseeeesaees 14 2 3 3 System shutdown
38. chip debugging a reset signal from the target system is input to EZ CUBE masked and then output to the target device Therefore the reset signal connection varies depending on whether EZ CUBE is connected For flash programming the circuit must be designed so that the reset signals of the target system and EZ CUBE do not conflict Recommend automatically switching the reset signal via series resistor Figure 4 3 illustrates the reset pin connection described in 4 1 2 Circuit connection example This connection is designed assuming that the reset circuit on the target system contains an N ch open drain buffer output resistance 100Q or less The VDD or GND level may be unstable when the logic of RESET_IN OUT of EZ CUBE is inverted so observe the conditions described below in Remark Figure 4 3 Circuit Connection with Reset Circuit That Contains Buffer EZ CUBE Target _device Reset connector RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more Pull up resistor R2 is not required if the buffer of the reset circuit consists of CMOS output The circuit enclosed by a dashed line is not required when only flash programming is performed Figure 4 4 illustrates the circuit connection for the case where the reset circuit on the target system contains no buffers and the reset signal is only generated via resistors or capacitors Design the circuit observing the conditions described be
39. d to the target system is stable User s Manual 67 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER CHAPTER 7 HOWTO USE EZ CUBE WITH V850 MICROCONTROLLER This chapter describes how to use EZ CUBE when performing on chip debugging and flash programming for a V850 microcontroller On chip debugging is a method to debug a microcontroller mounted on the target system using a debug function implemented in the device Since debugging is performed with the target device operating on the board this method is suitable for field debugging Flash programming is a method to write a program to the flash memory embedded in a device Erasing writing and verifying the program can be performed on board with the device Please update firmware at first Follow step 1 3 For detail on update firmware refer to 1 4 Firmware Update 1 Connect EZ CUBE to the host machine Do not connect EZ CUBE to the target system 2 Start the EZ CUBE firmware update tool QBEZUTL exe Select firmware of V850 V850_OCD_FW hex 3 Click the Start button Start to update the EZ CUBE firmware Read the following chapters if you are using EZ CUBE for the first time with a V850 microcontroller as the target device 7 1 Target System Design For communication between EZ CUBE and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors 7 2 On Chip Debugging Th
40. ecurity ID 0123456789ABCDEF 1234 to the addresses 0x85 to 0x8E SSS CSEG AT 85H SSS is any symbol name up to 8 characters DB 01H DB 23H DB 45H DB 67H DB 89H DB ABH DB CDH DB EFH DB 12H DB 34H 2 Setting method with the CS CubeSuite You can also set the security ID with the CS CubeSuite setting In the right field of Security ID in the red rectangle in Figure 5 11 specify the values in hexadecimal successively for the addresses from 85H to 8FH Figure 5 11 Security ID Setting A CA 8KO Property Additional include paths Additional include paths 0 System include paths System include paths 0 Macro definition Macro definition 0 D Frequently Used Options for Link Using libraries Using libraries O Additional library paths Additional library paths 0 Output folder BuildM odeN ame Output file name ProjectN ame Jet Frequently Used Options for Object Convent Output hex file Yes Output folder for hex file BuildM odeN ame Hex file name ProjectN ame hex Hex file format Intel expanded hex Tomat kel DI Device build Method Version Select Notes Others Build mode Selects the build mode name to be used during build Common Options User s Manual 53 Compile Options Assemble Options Link Options Object Convert Optio CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER d Stack area for debugging this area must be secured This area requires
41. ecution at the set software breakpoint position lt 5 gt Step over execution Return Out execution lt 6 gt Come Here lt 7 gt H Yes is selected in Permit flash programming in property of debug tool the following operations cannot be performed a Setting changing or canceling of hardware breaks b Masking unmasking of internal reset c Switching of peripheral breaks 10 Debugging in 1 wire mode Note the following points when debugging is performed in 1 wire mode selected by choosing TOOLO in the Connection with Target Board area in the Communication method dialog box of the debugger When the internal high speed oscillator is used for the CPU operating clock breaks may not occur normally if the frequency variation between debugger startup and break occurrence except for when changing the register is too large This situation may occur when the variation of operating voltage or temperature is too large 11 Relation between Standby function and Break function The break is interrupt function of CPU The standby mode is released by the break for using the following debug function Stops execution of the user program Step execution of the standby instruction Stops user program after execution instruction Pseudo real time RAM monitor function Break When Readout User s Manual 39 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER Pseudo Dynamic Memory Modification Break When Write Breakpoint setti
42. ed usage of the RFP refer to the RFP User s Manual 4 3 2 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of EZ CUBE e To improve the writing quality fully understand verify and evaluate the following items before using EZ CUBE Circuits are designed as described in the user s manuals for the device and EZ CUBE The device RFP and EZ CUBE are used as described in each user s manual The power supplied to the target system is stable User s Manual 41 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER This chapter describes how to use EZ CUBE when performing on chip debugging and flash programming for a 78KO microcontroller On chip debugging is a method to debug a microcontroller mounted on the target system using a debug function implemented in the device Since debugging is performed with the target device operating on the board this method is suitable for field debugging Flash programming is a method to write a program to the flash memory embedded in a device Erasing writing and verifying the program can be performed on board with the device Please update firmware for 78K0 at first Refer to description 1 to 3 on the following order For detail refer to 1 4 Firmware Update 1 Connect EZ CUBE to the host machine Do not connect EZ CUBE to the target system 2 St
43. een EZ CUBE and the target system Table 4 3 lists the pin assignment Table 4 4 describes the functions of each pin The pin assignment varies between 1 wire and 2 wire modes so design the circuit appropriately according to the circuit connection examples described on the following sections Table 4 3 Pin Assignment Pin No Pin name GND RENESAS RESET_IN Vdd FLMDO CLK RxD RESET_OUT Did oO oO N Jj TxD Note Signal names in EZ CUBE Table 4 4 Pin Functions Pin Name Inou T 1 Description RESET_IN IN Pin used to input reset signal from the target system RESET_OUT OUT Pin used to output reset signal to the target device FLMDO OUT Pin used to set the target device to debug mode or programming mode RXD IN OUT Pin used to transmit receive command data between the target device TXD IN OUT Pin used to transmit receive command data between the target device CLK IN Pin used to input handshake signal from the target device Note As seen from EZ CUBE User s Manual 31 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 4 1 2 Circuit connection example Refer to Figure 4 2 and design an appropriate circuit Caution The constants described in the circuit connection example are reference values If you perform flash programming aiming at mass production thoroughly evaluate whether the specifications of the target device are satisfied Notes 1 Fig
44. efer to this section to design circuits appropriately Figure 5 1 Outline of Communication Interface for On Chip Debugging Communication circuits must be mounted on Target device USB communication Target system EZ CUBE Host machine 5 1 1 Pin assignment This section describes the interface signals used between EZ CUBE and the target system Table 5 2 lists the pin assignment Table 5 3 describes the functions of each pin Table 5 2 Pin Assignment Pin No Pin nameN GND RENESAS RESET_IN EZ CUBE FLMDO CLK Target interf RxD RESET_OUT N IJJ A NJ TxD Note Signal names in EZ CUBE User s Manual 43 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER Table 5 3 Pin Functions Pin Name in out Note Description RESET_IN IN Pin used to input reset signal from the target system RESET_OUT OUT Pin used to output reset signal to the target device CLK OUT Pin used to output clock signal to the target device FLMDO OUT Pin used to set the target device to debug mode or programming mode RxD IN Pin used to receive command data from the target device TxD OUT Pin used to transmit command data to the target device Note As seen from EZ CUBE 5 1 2 Circuit connection examples The circuit design on the target system varies depending on the used connector and interface signals The following 1 to 2 are the major purpose of use Confi
45. em EZ CUBE Host machine 7 1 1 Pin assignment This section describes the interface signals used between EZ CUBE and the target system Table 7 2 lists the pin assignment Table 7 3 describes the functions of each pin Table 7 2 Pin Assignment Pin No Pin NameNot 1 GND RESET_IN VDD FLMDO CLK RxD RESET_OUT TxD Note Signal names in EZ CUBE RENESAS EZ CUBE O nNI oO a RI ow p User s Manual 69 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER Table 7 3 Pin Functions Pin Name IN OUT Note Description RESET_IN IN Pin used to input reset signal from the target system RESET_OUT OUT Pin used to output reset signal to the target device CLK OUT Pin used to output clock signal to the target device FLMDO OUT Pin used to set the target device to debug mode or programming mode RxD IN Pin used to receive command data from the target device TxD OUT Pin used to transmit command data to the target device Note As seen from EZ CUBE 7 1 2 Circuit connection examples The circuit design on the target system varies depending on the communication interface mode Refer to the following table and see the relevant circuit connection example Caution The constants described in the circuit connection example are reference values If you perform flash programming aiming at mass production thoroughly evaluate whether the specifications of the target device are satisfied Fi
46. emory programming Can write programs to the on chip flash memory of microcontrollers e USB connection Can be connected to the host machine via USB interface 2 0 Since EZ CUBE operates on power supplied via USB an external power supply is unnecessary e Variety of supported devices and expandability EZ CUBE supports a wide variety of Renesas Electronics 8 bit to 32 bit on chip flash memory microcontrollers RL78 Microcontrollers 78KO Microcontrollers 78KOR Microcontrollers RX Microcontrollers V850 Microcontrollers User s Manual 8 CHAPTER1 OVERVIEW 1 2 Notes Before Using EZ CUBE Chapters 1 and 2 present an overview and the basic specifications of EZ CUBE and the following chapters provide separate descriptions for the target devices and the purpose of use To utilize this manual effectively refer to the following table and see the relevant chapter for your target device and purpose of use Table 1 1 Chapters Corresponding to Usage Target Device RL78 Purpose of Use Relevant Chapter CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Target system design 3 1 Target System Design On chip debugging 3 2 On Chip Debugging Flash memory programming 3 3 Flash Programming 78KOR CHAPTER 4 HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER Target system design 4 1 Target System Design On chip debugging 4 2 On Chip Debugging Flash memory program
47. er Supply 1 Do not change the switch setting after connecting USB cable 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current The power is supplied from EZ CUBE after connecting EZ CUBE to the host machine User s Manual 18 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Figure 3 3 RL78 G12 30pin RL78 G13 RL78 G14 RL78 l11A Recommended Circuit Connection Target connector GND RESET_IN Voo FLMDO CLK RxD RESET_OUT TOOLO EZ CUBE Switch Setting For RL78 G12 30pin RL78 G13 RL78 G14 RL78 I1A SW 1 Select switch to M2 SW 2 Select switch to Int Clock SW 3 Select switch to Debug Mode SW 4 Depend on the target system environment SW 5 Select switch to Other CAUTION Notes on the Target System Power Supply 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current 1 Do not change the switch setting after connecting USB cable The power is supplied from EZ CUBE after connecting EZ CUBE to the host machine 3 1 3 Connection of reset pin This section describes the connection of the reset pin for which special attention must be paid in the circuit connection example shown in the previous section During on chip debugging a reset signal from the target system is input to EZ CUBE masked and then output to the target device Therefore the reset signal connection varies depending on w
48. erating on the board this method is suitable for field debugging Flash programming is a method to write a program to the flash memory embedded in a device Erasing writing and verifying the program can be performed on board with the device Please update firmware for 78KOR at first Refer to description 1 to 3 on the following order For detail refer to 1 4 Firmware update 4 Connect EZ CUBE to the host machine Do not connect EZ CUBE to the target system 5 Start the EZ CUBE firmware update tool QBEZUTL exe Select firmware of 78KOR 78KOR_OCD_FW hex 6 Click the Start button Start to update the EZ CUBE firmware Read the following chapters if you are using EZ CUBE for the first time with a 78KOR microcontroller as the target device 4 1 Target System Design For communication between EZ CUBE and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors 4 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with EZ CUBE A3 Flash Programming This section describes the system configuration and startup method to perform flash programming with EZ CUBE Supporting MCU Table 4 1 shows the supporting MCUs of 78KOR EZ CUBE firmware Table 4 1 Supporting MCUs of 78KOR EZ CUBE firmware Contents Firmware Supporting MCUs 78KOR Kx3 Lx3 78KOR_OCD_FW hex Supporti
49. fails 0x84 All on chip flash memory areas are erased if the security ID code authentication fails Other than above Setting prohibited How to secure areas A setting method of On chip debug option byte is following When setting each other priority is 2 1 Embed the On chip debug option byte at addresses 0xC3 in the user program 2 Set the On chip debug option byte by build tool link options In case of CS CubeSuite 1 Embed the On chip debug option byte at addresses 0xC3 in the user program Embed the On chip debug option byte at addresses 0xC3 in the user program 2 Set the On chip debug option byte by build tool link options In case of CS CubeSuite Set in device in the link options tab as figure 3 7 Example Setting 0x85 for control value Figure 3 7 On Chip Debug Option Byte Setting Example AF Property EI CG_main c A CA7SKOR Property System library paths System library paths 0 Use on chip debug Option byte values for OCD 85 Debug monitor area start address vex FCOO Debug monitor area size byte 512 Set user option byte Yes gb User option byte value p 201220 Specify mirror area MAA O0 mid Set flash start address No Device Link Options Compile Opti Assemble Op ROMization A User s Manual 23 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER C Securing of area for debugging The yellow portions in Figure 3 8 are the areas re
50. file Yes Output folder for hex file BuildM odeN ame Hex file name ProjectN ame hex Hex file format Motorola S type format 32 bit address fs Frequently Used Options for SectionFile Generate Register Mode Flash E Device 256 MB mode No Buld Method Version Select Notes Others Build mode Selects the build mode name to be used during build Compile Section File Dump Opti Hex Conve ieee Link Options ROMization b Reset handler A reset handler includes the jump instruction for the debug monitor program How to secure areas It is not necessary to secure this area intentionally When downloading a program however the debugger rewrites the reset vector in accordance with the following cases If the rewritten pattern does not match the following cases the debugger generates an error e When two nop instructions are placed in succession from address 0 Before writing After writing 0x0 nop gt Jumps to debug monitor program at 0x0 0x2 nop 0x4 XXXX 0x4 Xxxx User s Manual 74 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER e When two OxFFFF are successively placed from address 0 already erased device Before writing After writing 0x0 OxFFFF gt Jumps to debug monitor program at 0x0 0x2 OxFFFF Ox4 XXxx 0x4 xxxx e The jrinstruction is placed at address 0 when using Renesas Electronics compiler CA850 Before writing After writing 0x0 jr disp22 gt Jumps
51. from being read by an unauthorized person The debugger manipulates the target device in accordance with the set value as shown below Table 4 7 On Chip Debug Option Byte Setting and Operation Set Value Description Debugging is disabled This setting is available only for flash programming and self programming The on chip flash memory is not erased no matter how many times the security ID code authentication fails 0x84 All on chip flash memory areas are erased if the security ID code authentication fails Other than above Setting prohibited How to set A setting method of On chip debug option byte is following When setting each other priority is 2 1 Embed the On chip debug option byte at addresses 0xC3 in the user program 2 Set the On chip debug option byte by build tool link options In case of CS CubeSuite 1 Embed the On chip debug option byte at addresses 0xC3 in the user program Embed the On chip debug option byte at addresses 0xC3 in the user program 2 Set the On chip debug option byte by build tool link options In case of CS CubeSuite Set in device in the link options tab as figure 4 6 Example Setting 0x84 for control value Figure 4 6 On Chip Debug Option Byte and Monitor Area Setting Example A Property z Device Pin List SS Device Top View KI Code Generator E Code Generator Preview A CA 8KOR Property Output File Output folder Output file name a lmf Force li
52. gure 7 2 Recommended Circuit Connection VDD VOD Voo Yoo Reset connector Target connector Target device GND Note 1 RESET_IN Note 2 RxD RESET_OUT Note 2 TxD Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 or less For details refer to 7 1 3 Connection of reset pin 2 Connect TxD transmit side of the target device to RxD receive side of the target connector and TxD transmit side of the target connector to RxD receive side of the target device Read the serial interface User s Manual 70 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER pin names on the target device side as those for flash programming supported by the target device EZ CUBE Switch setting SW 1 Select switch to Mi SW 2 Select switch to Int Clock SW 3 Select switch to Debug Mode SW 4 Depend on the target system environment SW 5 Select switch to Other Aeme SSCS Notes on the Target System Power Supply 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current 1 Do not change the switch setting after connecting USB cable The power is supplied from EZ CUBE after connecting EZ CUBE to the host machine 7 1 3 Connection of reset pin This section describes the connection of the reset pin for which special attention must be paid in circuit connection examp
53. he following pages and secure these spaces in the user program or using the compiler options Figure 5 8 Reserved Area Used by EZ CUBE Internal ROM space Internal RAM space bytes Max d Stack area for debugging xxxH 128 bytes Max xxxH a Debug monitor area 256 bytes Min 8FH a Debug monitor area i0bytes Die 84H b Option byte area 85H c Security ID area 2 bytes 7EH e Software break area 02H a Debug monitor area 00H Area that must be reserved User s Manual 50 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER a Debug monitor areas areas must be secured Addresses 0x02 0x03 and area starting from address 0x8F must be secured to embed the debug monitor program Be sure to reserve this area The monitor program performs initialization process for the communication interface for debugging as well as run break processing of the CPU If this area is rewritten by user program or flash self programming on chip debugging can no longer be performed Area reservation method Figure 5 9 shows an example of reserving an area with the CS CubeSuite Figure 5 9 is the setting dialog for link option of the CS CubeSuite In Use on chip debug in the red rectangle in Figure 5 9 set Yes go and specify Debug monitor area size 256 byte This setting reserves the area of 0x02 0x03 and Ox8F and on for the debug monitor Figure 5 9 Link Options Setting Debug Monitor Area
54. he user program or using the compiler options a Security ID setting This setting is required to prevent the memory from being read by an unauthorized person Embed a security ID at addresses 0x70 to 0x79 in the internal flash memory The debugger starts only when the security ID that is set during debugger startup and the security ID set at addresses 0x70 to 0x79 match If bit 7 of address 0x79 is 0 however debugging is disabled In such a case there are no methods to start the debugger Debugging is mainly disabled for mass produced devices If the user has forgotten the security ID or to enable debugging erase the flash memory and set the security ID again How to set security ID Embed a security ID at addresses 0x70 to 0x79 in the user program If the security ID is embedded as follows for example the security ID set by the debugger is 123456789ABCDEF123D4 not case sensitive Address User s Manual 73 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER 0x76 OxDE 0x77 DNF 0x78 0x23 0x79 0xD4 If Renesas Electronics compiler is used the security ID can be set using the Compiler Common Options menu Figure 7 5 Setting Security ID Aa CA850 Property H Frequently Used Options for RO Mizaton Output ROMized object file Yes Xr Jr Output folder for ROMized object file BuildM odeN ame ROMized object file name romp out H Frequently Used Options for Hex Convert Output hex
55. hether EZ CUBE is connected For flash programming the circuit must be designed so that the reset signals of the target system and EZ CUBE do not conflict Recommend automatically switching the reset signal via series resistor Figure 3 4 illustrates the reset pin connection described in 3 1 2 Circuit connection example This connection is designed assuming that the reset circuit on the target system contains an N ch open drain buffer output resistance 100Q or less The VDD or GND level may be unstable when the logic of RESET_IN OUT of EZ CUBE is inverted so observe the conditions described below in Remark User s Manual 19 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Figure 3 4 Circuit Connection with Reset Circuit That Contains Buffer EZ CUBE Target _device Reset connector RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more Pull up resistor R2 is not required if the buffer of the reset circuit consists of CMOS output The circuit enclosed by a dashed line is not required when only flash programming is performed Figure 3 5 illustrates the circuit connection for the case where the reset circuit on the target system contains no buffers and the reset signal is only generated via resistors or capacitors Design the circuit observing the conditions described below in Remark Figure 3 5 Circuit Connection with Reset Circuit That Contains No Buffers EZ CUB
56. icating the security ID code fails 0x03 The entire internal flash memory area is erased if authenticating the security ID code fails Other than above Setting prohibited How to set There are the following 2 methods to set option bytes to the internal flash memory If both 1 and 2 are set the setting of 2 has precedence 1 Setting method with the program Embed option bytes to the user program Add the code to the assembler source by referring to the following example Example Setting 80H 03 81H 00 82H 00 83H 00H 84H 02H SSS CSEG AT 080H SSS is any symbol name eight characters or less DB 03H DB 00H DB 00H DB 00H DB 02H Caution If address 0x84 is overwritten by 0x00 by self programming communication is disabled and debugging and connection can no longer be performed even if the debugger is restarted In such as case erase the memory via flash programming 2 Setting method with the CS CubeSuite You can also set the option byte area with the CS CubeSuite setting In Set user option byte in the red rectangle in Figure 5 10 select Yes gb and specify the option byte values for the addresses from 80H to 84H Figure 5 10 User Option Byte Setting ear Property CA7SKO Property Input File Output File Output folder B uildM odeN ame Output file name SProjectN ame It Force linking against error No Library Using libraries Using libraries
57. is section describes the system configuration and startup method to perform on chip debugging with EZ CUBE 7 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with EZ CUBE Supporting MCU Table 7 1 shows the supporting MCUs of V850 EZ CUBE firmware Table 7 1 Supporting MCUs of V850 EZ CUBE firmware Items Contents V850ES Jx3 Supporting MCUs V850_OCD_FW hex V850ES Jx3 L Supporting Operation mode UART mode User s Manual 68 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER 7 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming Figure 7 1 presents an overview of the EZ CUBE communication interface As shown on the left side of the figure EZ CUBE performs serial communication with the target device on the target system For this communication communication circuits must be mounted on the target system Refer to this section to design circuits appropriately UART are supported as communication modes The pins used for serial communication are basically the same as those of the flash memory programmer such as EZ CUBE but some devices do not support some of them Figure 7 1 Outline of Communication Interface Communication circuits must be mounted on the target system RENESAS Target device EZ CUBE USB communication Target syst
58. is set to Other at shipment USB interface connector This is a connector used to connect EZ CUBE with the host machine via a USB cable A USB 2 0 compliant mini B connector is employed Target interface connector This is a connector used to connect EZ CUBE with the target system via a 8 pin 2 4pin target cable External X tal socket Only for 78KO and RX SW 2 set for Ext Clock Connect an oscillator or oscillation circuit on the External al socket Select for Clock board in the Configuration dialog box of the debugger For the operation this step refer to the user s manual for CS CubeSuite Figure 2 2 Mounting Diagram de Ber me User s Manual 13 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE 9 Mode LED The appearance of the mode LED changes according to the status of hardware and software as shown in Table 2 4 Table 2 4 Mode LED Status Description Mode LED Color USB Connection Not connected Appearance Software Operation Extinguished Not yet started Power or the CPU is in the break mode A debugger has been started Glowing Connected Green Glowing 2 2 System configuration Figure 2 3 illustrates the system configuration for on chip debugging Figure 2 3 System Configuration for On Chip Debugging RENESAS EZ CUBE lt 4 gt lt 3 gt RENESAS Target device lt gt lt 1 gt Host machine Product
59. lash programming Figure 6 3 Recommended Circuit Connection for Flash Programming Pulled up at 4 7 KQ to 10 KQ a ge Vcc Vcc Vcc Vcc Vcc Vcc Target connector Pulled up at 4 7 KQ MCU FINEC b SS KS SSC TxD1 2 RxD1 2 RES Reset circuit D Open collector buffer Circuit for selection of the UB b i operating mode EMLE Pulled down GND at 4 7 KQ to 10 KQ connected 1 FINEC pin is not used for flash programming No need connection 2 RES pin is not used for flash programming No need connection 3 Connect TxD1 and RxD1 pins for flash programming 4 Beier to Notes on Connection for detailed process of UB and EMLE pins ap Connected pin of the MCU for flash programming is different from for debugging Connect to RxD1 pin of the MCU and pull up MD FINED pin of the MCU for flash programming User s Manual 61 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER EZ CUBE Switch setting RX63T group R5F563T4 5 6 SW 1 Select M2 SW 2 Select Ext Clock Need mounting 16MHz oscillator SW 3 Select Debug Mode SW 4 Select T SW 5 Select M3 RX210 RX220 group and RX111 group SW 1 Select M2 SW 2 Select Int Clock SW 3 Select Debug Mode SW 4 Depend on the target system environment SW 5 Select M3 CAUTION Notes on the Target System Power Supply 1 Do not change the switch setting after connecti
60. les shown in the previous section During on chip debugging a reset signal from the target system is input to EZ CUBE masked and then output to the target device Therefore the reset signal connection varies depending on whether EZ CUBE is connected For flash programming the circuit must be designed so that the reset signals of the target system and EZ CUBE do not conflict Automatically switching the reset signal via series resistor recommended described in recommended circuit connection in the previous section Figure 7 3 illustrates the reset pin connection described in 7 1 2 Circuit connection examples This connection is designed assuming that the reset circuit on the target system contains an N ch open drain buffer output resistance 100Q or less The VDD or GND level may be unstable when the logic of RESET_IN OUT of EZ CUBE is inverted so observe the conditions described below in Remark Figure 7 3 Circuit Connection with Reset Circuit That Contains Buffer EZ CUBE Target Device RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 KQ or more Pull up resistor R2 is not required if the buffer of the reset circuit consists of CMOS output The circuit enclosed by a dashed line is not required when only flash programming is performed Figure 7 4 illustrates the circuit connection for the case where the reset circuit on the target system contains no buffers and the reset signal
61. low in Remark Figure 4 4 Circuit Connection with Reset Circuit That Contains No Buffers EZ CUBE Target device Reset connector RESET_OUT RESET_IN Remark Make the resistance of at least R1 ten times that of R2 R1 being 10 kQ or more The circuit enclosed by a dashed line is not required when only flash programming is performed User s Manual 33 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 4 2 On Chip Debugging This section describes the system configuration startup shutdown procedure and cautions for debugging when on chip debugging is performed with EZ CUBE 4 2 1 Debug functions Table 4 5 lists the debug functions when a 78KOR microcontroller is the target device Functions Target device Table 4 5 Debug Functions Specifications 78KOR 78KOR Kx3 Lx3 Security 10 byte ID code authentication Download Available Execution Go Step In Step Over CPU Reset Restart Hardware break 1 point commonly used by execution and access Software break Multiple points User spaces used for debugging 1 wire mode Internal ROM 1036 bytes Internal RAM 6 bytes Note 2 wire mode Internal ROM 100 bytes Internal RAM 6 bytes Note Function pins used for debugging 1 wire mode TOOLO 2 wire mode TOOLO TOOL1 Note For details refer to 4 2 2 Securing of user resources and setting of security ID and on chip debug option byte 4 2 2 Securing of user resources and setting of security
62. ly without the emulator connected User s Manual 66 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a RX microcontroller using EZ CUBE 6 3 1 Specifications of programming function Table 6 5 Specifications of Programming Function Functions Specifications Host interface USB 2 0 Target interface Single chip mode Target system voltage 2 7 to 5 5 V depends on the target device Clock supply Internal high speed oscillation clock is used Power supply 5 V 0 3 V maximum current rating 100 mA Acquisition of device specific Parameter file for Renesas Electronics is used information Programming software RFP Renesas Flash Programmer Security flag setting Available Standalone operation Unavailable must be connected to host machine Note For detailed usage of the RFP refer to the RFP User s Manual 6 3 2 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of EZ CUBE e To improve the writing quality fully understand verify and evaluate the following items before using EZ CUBE Circuits are designed as described in the user s manuals for the device and EZ CUBE The device WriteEZ5 and EZ CUBE are used as described in each user s manual The power supplie
63. ming A3 Flash Programming 78K0 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER Target system design 5 1 Target System Design On chip debugging 5 2 On Chip Debugging Flash memory programming 5 3 Flash Programming RX CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER Target system design 6 1 Target System Design On chip debugging 6 2 On Chip Debugging Flash memory programming 6 3 Flash Programming V850 CHAPTER 7 HOW TO USE EZ CUBE WITH V850 MICROCONTROLLER Target system design 7 1 Target System Design On chip debugging 7 2 On Chip Debugging Flash memory programming 7 3 Flash Programming User s Manual CHAPTER1 OVERVIEW 1 3 Hardware Specifications This section describes the EZ CUBE hardware specifications The specifications related to the on chip debug and flash memory programming functions are described in the following chapters Table 1 2 Hardware Specifications Classification Specifications EZ CUBE Operating power supply Supplied via USB interface 5 V Operating environment Temperature 0 to 40 C conditions Humidity 40 to 80 RH no condensation Storage environment Temperature 15 to 60 C conditions Humidity 40 to 80 RH no condensation External dimensions 60x 36 x 13 mm Weight Approximately 40 g Host machine interface Target host machine IBM Pc AT compatibles Target OS Windows XP 32bit Vista Windows 7 Windows 8 USB 2 0 USB cable 1m
64. n 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 7 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 equipment communications equipment test and measurement
65. ng so it is different from actual operation Current consumption when On chip debugging On chip debugging circuit in the device operates during on chip debugging Therefore current consumption of the device increases When evaluations current consumption of device please do not connect a debugger On chip debugging option byte setting address C3H The on chip debugging option byte setting is rewritten arbitrarily by the debugger Operation at voltage with which flash memory cannot be written If the following debugger operations are executed at voltage with which flash memory cannot be written the debugger outputs an error and the operation is ignored Because these operations are included flash memory rewriting lt 1 gt Writing to internal flash memory lt 2 gt Setting or canceling of software breakpoint lt 3 gt Starting execution at the set software breakpoint position lt 4 gt Step execution at the set software breakpoint position lt 5 gt Step over execution Return Out execution lt 6 gt Come Here lt 7 gt Setting changing or canceling of hardware breaks lt 8 gt Masking unmasking of internal reset lt 9 gt Switching of peripheral breaks User s Manual 26 8 9 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Relation between Standby function and Break function The break is interrupt function of CPU The standby mode is released by the break for using the following debug function lt 1 gt
66. ng Operation mode UART mode User s Manual 29 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 4 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming Figure 4 1 presents an overview of the EZ CUBE communication interface As shown on the left side of the figure EZ CUBE performs serial communication with the target device on the target system For this communication communication circuits must be mounted on the target system Refer to this section to design circuits appropriately Figure 4 1 Outline of Communication Interface Communication circuits must be mounted on the target system RENESAS Target device USB communication Target system EZ CUBE Host machine Note 1 wire mode Single wire UART communication using TOOLO pin 2 wire mode Single wire UART communication using TOOLO and TOOL1 pins Table 4 2 Differences Between 1 Wire Mode and 2 Wire Mode Communication Flash Programming Debugging Function Mode Function 1 wire mode Available e User resources secured for debugging Internal ROM 1036 bytes Internal RAM 6 bytes stack 2 wire mode Available e User resources secured for debugging Internal ROM 100 bytes Internal RAM 6 bytes stack User s Manual 30 CHAPTER 4 HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 4 1 1 Pin assignment This section describes the interface signals used betw
67. ng USB cable 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current The power is supplied from EZ CUBE after connecting EZ CUBE to the host machine 3 RX111 operate voltage up to 3 6V User s Manual 62 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 1 3 Notes on Connection 1 About the FINEC and MD FINED pins For the RX63T Groups FINE interface only supports a 2 wire system using FINEC and MD FINED pins The FINEC and MD FINED pins are exclusively used by the emulator Any functions that are multiplexed on the FINEC pin are not available For the RX210 RX220 and RX111 Groups FINE interface supports a 1 wire system using the MD FINED pin Only the MD FINED pin is exclusively used by the emulator It is not necessary to connect the FINEC pin since this pin is not used The FINEC pin can be used as a port Pull up the FINEC signal at 4 7 KQ to 10 kQ Pull up the MD FINED signal at 4 7 kQ Do not arrange these signal lines in parallel with or across other high speed signal lines MD FINED signal and TxD signal are assigned to the same pin Connect this pin to MD FINED pin of the MCU when debugging 2 About the TxD and RxD pins TxD and RxD signals are NOT required for debugging These are only used for internal flash programming with Renesas Flash Programmer If the MCU has multiple TxD1 or RxD1 pins confirm which one of the respective pins is used in boot mode in the hardware m
68. ng executing of the user program 12 Cautions on using step in step execution The value of some SFRs special function registers might remain unchanged while stepping into code If the value of the SFRs does not change while stepping into code operate the microcontroller by continuously executing the instructions instead of executing them in steps Stepping into code Instructions in the user created program are executed one by one Continuous execution The user created program is executed from the current PC value User s Manual 40 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 4 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a 78KOR microcontroller using EZ CUBE 4 3 1 Specifications of programming function Table 4 8 Specifications of Programming Function Functions Specifications Host interface USB 2 0 Target interface Target system voltage UART 1 wire mode 2 7 to 5 5 V depends on the target device Clock supply Internal high speed oscillation clock is used Power supply 5 V 0 3 V maximum current rating 100 mA Acquisition of device specific Parameter file for Renesas Electronics is used information RFPN e Renesas Flash Programmer Programming software Security flag setting Available Standalone operation Unavailable must be connected to host machine Note For detail
69. nking against error No Library Using libraries Using libraries 0 System libraries System libraries O Additional library paths Additional library paths O System library paths System library paths 0 EI Device Use on chip debug Yes go Option byte values for OCD F 84 Debug monitor area start address p 3FC00 Debug monitor area size byte Set user option byte Yes gb User option byte value F OOFFFF Specify mirror area M4A4 0 mil Set flash start address No Device ROMization Process Object Convert Opti V Common Options Compile Options Assemble Options A Link Options User s Manual 36 C CHAPTER 4 HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER Securing of stack area for debugging The yellow portions in Figure 4 7 are the areas reserved for placing the debug monitor program so user programs or data cannot be allocated in these spaces These spaces must be secured so as not to be used by the user program Moreover this area must not be rewritten by the user program Secure the resources for debugging with the contents explained by 1 and 2 Figure 4 7 Memory Spaces Where Debug Monitor Programs Are Allocated Internal ROM space Internal RAM space Internal ROM end address Internal RAM end address 1024 bytes a Debug monitor area 6 bytes d Stack area for debugging D8H D7H g De a Debug monitor area CEH CDH 10 bytes c Security ID area C4
70. oad 5 1 5 Clock Setting The clock signal generated by the X1 oscillator internal high speed oscillator can be used for the clock signal of the target device during on chip debugging Setting up each is described below a Using the internal high speed oscillator EZ CUBE can supply a clock to be used as the high speed system clock 4 8 or 16 MHz EZ CUBE Select SW 2 is Int Clock Remove the oscillator or oscillation circuit Selected for Generate by emulator in the Configuration dialog box of the debugger For the settings refer to the user s manual for CS CubeSuite Figure 5 6 Clock setting Sl 78K0 EZ Emulator Property DI Internal ROM RAM Generate by emulator H OU Monitor clock System DI Flash Security ID FES FFFFFFFFFFFFFFFFFFFF Security ID Sets the security ID 20 digits in hexadecimal for reading the code in the internal ROM or internal flash memory Fc authentication see the Emulator user s manual Debug Tool Settings Download File Settings Hook Transaction Settings User s Manual 48 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER b Using the External oscillator EZ CUBE Select SW 2 is Ext Clock Connect an oscillator or oscillation circuit on the External al socket Select for Clock board in the Configuration dialog box of the debugger For the operation this step refer to the user s manual for CS CubeSuite Figure 5 7 Clock setting l 78K
71. of checking conformance with UL or other safety standards and IEC or other industry standards This fact must be taken into account when the emulator is taken from Japan to some other country 7 Renesas Electronics Corporation will not assume responsibility of direct or indirect damage caused by an accidental failure or malfunction in the emulator When disposing of the emulator Penalties may be applicable for incorrect disposal of this waste in accordance with your national legislation User s Manual Usage restrictions The emulator has been developed as a means of supporting system development by users Therefore do not use it as an embedded device in other equipment Also do not use it to develop systems or equipment for use in the following fields 1 Transportation and vehicular 2 Medical equipment that has an involvement in human life 3 Aerospace 5 Undersea repeaters eS a be ee Ss 4 Nuclear power control 6 Military related business or development of Weapon of Mass Destruction If you are considering the use of the emulator for one of the above purposes please be sure to consult your local distributor About product changes We are constantly making efforts to improve the design and performance of our product Therefore the specification or design of the emulator or this user s manual may be changed without prior notice About rights 1 We assume no responsibility for any damage or infringemen
72. ogramming the debugger can no longer operate normally This caution also applies to boot swapping for such an area Operation after reset After an external pin reset or internal reset the monitor program performs debug initialization processing Consequently the time from reset occurrence until user program execution differs from that in the actual device operation Debugging with real machine running without using EZ CUBE If debugging is performed with a real machine running without using EZ CUBE write the user program using the RFP Programs downloaded by the debugger include the monitor program and such a program malfunctions if it includes processing to make the TOOLO pin low level Operation when debugger starts When the debugger is started if the Target Device Connection setting in the Configuration dialog box of the debugger is different from the setting for the previous debugging the internal flash memory is erased Debugging after program is written by flash programming User s Manual 38 7 8 9 CHAPTER 4 HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER If a program is written to the internal flash memory using the RFP on chip debugging is disabled even if it is enabled in the on chip debugging option byte setting To perform debugging of the target device after that erase the internal flash memory using the RFP and then download the program using the debugger LVI default start function setting address C1H
73. ory is read or written 6 Notes on flash self programming Do not break in ROM area during flash environment In case of monitoring memory with RRM function a temporary break is executed So do not use RRM function when using flash self programming Do not modify the debug monitor area when using debugging interface 7 Regarding POC function and emulation of turning OFF Make sure that the power to the target system is not shut down during debugging Regarding to check the operation of POC function and tuning OFF perform without the emulator In case the target system is turning OFF instantaneously the debugger may hang up 8 Regarding UO buffer when using reset mask The UO buffer port pin may enter the reset status depending on the target device when a reset is input from the pin even if reset is masked by the mask function 9 When forced break RRM function and DMM function do not operate Forced breaks RRM function and DMM function cannot be executed if one of the following conditions is satisfied Interrupts are disabled Dl Interrupts issued for UART interface are masked Standby mode is entered while standby release by a maskable interrupt is prohibited When using UART interface the main clock has been stopped e When using UART interface a clock different from the one specified in the debugger is used for communication 10 Writing quality of flash programming To improve the writing quality fully understand
74. problems that may occur during the debugger startup it is recommended to secure this area in advance using the compiler Figure 3 9 shows example for securing the area using the CS CubeSuite Set in device in link options tab as figure 3 9 Figure 3 9 Example for securing the debug monitor area Property f CG_main c Aa CA78KOR Property DI System Ebrary paths System library paths 0 Di Device Use on chip debug Yes go Option byte values for OCD ex 85 Debug monitor area start address Con Debug monitor area size byte 512 Set user option byte Yes gb User option byte value E 201220 Specify mirror area M44 D miD _ Set flash start address 24 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER 2 Securing of stack area for debugging This area requires 4 bytes as the stack area for debugging Since this area is allocated immediately before the stack area the address of this area varies depending on the stack increase and decrease That is 4 extra bytes are consumed for the stack area used Figure 3 10 illustrates the case where the stack area is increased when the internal high speed RAM starts from OxFCFOO Figure 3 10 Variation of Address of Stack Area for Debugging How to secure areas Set the stack pointer by estimating the stack area consumed by the user program 4 bytes Make sure that the stack pointer does not extend beyond the internal high speed RAM start address Rem
75. procedure nt 15 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER 16 3 1 Target System Design iiini iei ihe e ae ete 17 SEL Piassignme nt aAA ATT AE AOS 17 3 1 2 Circuit connection example cccccccccececeeeeeeeeee seer eecaeeeeaeeseeeeeseaeeesaeeseeeenaees 18 3 1 3 Connection of reset pn 19 3 2 On Chip Debugoimg EE 21 32 1 Debug tuntonsa iiei n EEEE AEAEE EAEE E ieee iets 21 3 2 2 Securing of user resources and setting of security ID and on chip debug option byte debugging resources seit eect cece enter ee eaaeeeeeeaaeeeeeeaaeeeeeeaaeeeeteaaeeeeneaas 21 3 2 3 Cautions on debugging cece ceeee tent eeeeaeeeeeee ceases eaaeeeeaaeseeeeseaeeesaeeseneeeeaees 26 g3 Flash Programmi EE 28 3 3 1 Specifications of programming funchton ee eeeeceeeee cee eeeaeeeeeeeeees 28 3 3 2 Cautions on flash programming 28 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 29 4 1 Target System Design aseeni Ee ee ee ata ais 30 4 1 1 Pin ASSIQHIMONE 2 552 uereg wees aces eege Ee teva teenies 31 4 1 2 Circuit connection example eseeeeeeeeeeeeeeer reer rssirssrrsstnssrnsstnssrnsstntstnnstnnsnnnsrnn ee 32 4 1 3 Connection of reset pn 33 4 2 On GChip Debugging sariani e EIERE eee eee 34 4 2 1 DOBUGTUNCEONS 5 22 iiis feccence88 clas cceeben seed daset cc satan scdccubee nc Sensdeed deus edvapanvedidvvieet Aasstedeastt 34 4 2 2 Securing of user resources and setting of secu
76. r connecting EZ CUBE to the host machine User s Manual 45 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER Figure 5 3 When Programming is Performed DO foo DO DD iko 3k Q 10kQ Reset connector RESET Target connector T A GND arget device ote 1 RESET_IN 10kO Voo Vo jpop Re em RESET_OUT al TxD Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 or less For details refer to 5 1 3 Connection of reset pin 2 Connect TxD transmit side of the target device to RxD receive side of the target connector and TxD transmit side of the target connector to RxD receive side of the target device EZ CUBE Switch setting SW 1 Select switch to M1 SW 2 Depend on the target system environment SW 3 Select switch to Debug Mode SW 4 Depend on the target system environment SW 5 Select switch to Other CAUTION Notes on the Target System Power Supply 1 Do not change the switch setting after connecting USB cable 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current The power is supplied from EZ CUBE after connecting EZ CUBE to the host machine 5 1 3 Connection of reset pin This section describes the connection of the reset pin for which special attention must be paid in circuit connection examples shown in the previous section User s Manual 46 CHAPTER 5
77. reased when the internal high speed RAM starts from OxFCFOO Note When the self programming is executed it will be 12 bytes User s Manual 37 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER Figure 4 8 Variation of Address of Stack Area for Debugging lt 1 gt lt 2 gt lt 3 gt Stack area OxFFEDF OxFFEDF 6 bytes Stack area for debugging gt gt Available space OxFCF06 2 In internal high i OxFCF00 eren du OxFCF00 oxF CF09 4 2 3 1 2 3 4 5 6 How to secure areas Set the stack pointer by estimating the stack area consumed by the user program 6 bytes Make sure that the stack pointer does not extend beyond the internal high speed RAM start address Remark Refer to the self programming manual for how to secure the stack area for self programming Cautions on debugging This section describes cautions on performing on chip debugging for a 78KOR microcontroller Be sure to read the following to use EZ CUBE properly Handling of device that was used for debugging Do not mount a device that was used for debugging on a mass produced product because the flash memory was rewritten during debugging and the number of rewrites of the flash memory cannot be guaranteed Moreover do not embed the debug monitor program into mass produced products Flash self programming If a space where the debug monitor program is allocated is rewritten by flash self pr
78. rget system Use the emulator within the power supply voltage of 2 7V to 5 5V and within the operating voltage range of the MCU EZ CUBE can supply 5V power to a simple evaluation system Up to 100 mA current can be supplied In case of supplying 5V power from the emulator set SW 4 to 5 When using the power supply function of EZ CUBE check the voltage supplied to the target system The voltage may drop 0 5V or more since it depends on the USB VBUS power supply voltage 7 About GND The pins of the connector marked GND must be at the same ground level as the VSS pin of the MCU CAUTION Warning for Turning the Power On Off When supplying power ensure that there are no shorts between Vcc and GND Only connect the EZ CUBE after confirming that there are no mismatches of alignment on the target system port connector Incorrect connection will result in the host machine the emulator and the target system emitting smoke or catching fire User s Manual 64 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 2 On Chip Debugging This section describes the system configuration startup shutdown procedure and cautions for debugging when on chip debugging is performed with EZ CUBE 6 2 1 Debug functions Table 6 4 shows the debugging functions list Table 6 4 Debugging functions list Specifications Functions RX600 series RX200 series RX100 series Target
79. rget system using a debug function implemented in the device Since debugging is performed with the target device operating on the board this method is suitable for field debugging Flash programming is a method to write a program to the flash memory embedded in a device Erasing writing and verifying the program can be performed on board with the device Please update firmware for RL78 at first Refer to description 1 to 3 on the following order For detail refer to 1 4 Firmware update 1 Connect EZ CUBE to the host machine Do not connect EZ CUBE to the target system 2 Start the EZ CUBE firmware update tool QBEZUTL exe Select firmware of RL78 RL78G10_OCD_FW hex or RL78_OCD_FW except G10 hex 3 Click the Start button Start to update the EZ CUBE firmware Read the following chapters if you are using EZ CUBE for the first time with a RL78 microcontroller as the target device 3 1 Target System Design For communication between EZ CUBE and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors 3 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with EZ CUBE 3 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with EZ CUBE Supporting MCU Table 3 1 shows the supporting MCUs of RL78 EZ CUBE firm
80. rity ID and on chip debug option E EE EE EE 34 4 2 3 Cautions on debugging cece ceeeeeceeeeeeeaeeeeaeeceaeeeceaeeeeaaeseneeeseaeeesaeeseaeeeeaees 38 43 Flash Programming EE 41 4 3 1 Specifications of programming funchton ee eeee cess ee eeeeeenaeeeeeeeetaees 41 4 3 2 Cautions on flash programming 41 User s Manual CHAPTER5 HOW TO USE EZ CUBE WITH 78KO MICHROCONTROLLER 42 Gu RN Ee En BR ET 43 5 1 1 Pinassigjoment ele veces EENENNEN ENEE EENS ENEE ENEE Eden 43 5 1 2 Circuit connection evamples nnt 44 5 1 3 Connection of reset pin cece cece ceeee cece eeeaaeceeeeeceeeecaaeeseaaeseneeeseaeeesaeeneeeesaes 46 5 1 4 Cautions on Target system Design cccccceceeeeceeeeeceaeeeeeeeeeneeeseaeeesaeeseneeeeaes 48 B15 lt COCK Seti g DEE 48 5 2 On Chip Debugging EE 50 KZ Debug TOUR tetas eve aed eee dae 50 5 2 2 Securing of user resources and setting of security ID 50 5 2 3 Cautions On debugging kes a eeta an aa aa aaa a a ae aa aaraa EEEa 55 5 3 ER Progr ariii e DEE 57 5 3 1 Specifications of programming function 57 5 3 2 Cautions on flash programming 57 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 58 G Target System Design EE 59 6 1 1 Pin assignment 2 22 cei secei beset Ledeen ea eh pone e ced ealedee pease ee ets peaeeenedee ddr pes 59 6 1 2 Recommended Circuit Connectton 60 EN Notes on CONMOCHON EE 63 6 2 Om Chip DEBUGGING WEE 65 62 1 Debug TUNCHIONS
81. rm the purpose refer to Table 5 2 and see the relevant circuit connection example for specifications Caution The constants described in the circuit connection example are reference values If you perform flash programming aiming at mass production thoroughly evaluate whether the specifications of the target device are satisfied 1 Used to perform on chip debugging 2 Used to perform flash programming User s Manual 44 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER Figure 5 2 When Debugging is Performed Voo Voo Voo Reset connector Target connector Target device FLMDO CLK RxD RESET_OUT TxD Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100Q or less For details refer to 5 1 3 Connection of reset pin 2 OCD1A may be a different name depending on the device used For details refer to the user s manual for the target device EZ CUBE Switch setting SW 1 Select switch to M SW 2 Depend on the target system environment SW 3 Select switch to Debug Mode SW 4 Depend on the target system environment SW 5 Select switch to Other CAUTION Notes on the Target System Power Supply Q 1 Do not change the switch setting after connecting USB cable 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current The power is supplied from EZ CUBE afte
82. roperty rights of Renesas Electronics or others 3 You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part 4 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 5 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 6 Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not warrant that such informatio
83. s Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majorityowned subsidiaries Note 2 Renesas Electronics product s means any anggusti developed or manufactured by or for Renesas Electronics Preface The EZ CUBE emulator YRCNEZCUBE01 is designed for use with the MCU s made by Renesas Electronics You can download the latest manuals from the Renesas Tools homepage http cn renesas com Important Before using the emulator be sure to read this users manual carefully Keep this user s manual and refer to it when you have questions about the emulator Emulator Emulator in this users manual collectively refers to the EZ CUBE emulator manufactured by Renesas Electronics Corporation Emulator herein encompasses neither the customer s target system nor the host machine Purpose of use of the emulator This emulator is a device to support the development of systems that uses the Renesas microcomputers It provides support for system development in both software and hardware The emulator is not guaranteed for use in the production line Be sure to use the emulator correctly according to said purpose of use Please avoid using the emulator other than for its intended purpose of use For those who use the emulator The emulator can only be used by those who have carefully read the user s manual and know how to use it Use of the emulator requires b
84. s with USB ports lt 2 gt Software Includes CS CubeSuite firmware update tool and so on lt 3 gt USB cable accessory lt 4 gt EZ CUBE this product lt 5 gt 8 pin user system interface cable accessory 2 3 Setup 2 3 1 Installing Emulator Software Install the development software CS CubuSuite into the host machine CubeSuite V2 00 or later must be necessary 2 3 2 System startup procedure Turn the power of the EZ CUBE emulator and the target system following the procedure below User s Manual 14 CHAPTER2 NAMES AND FUNCTIONS OF HARDWARE 1 Check the power is off Check that the target system is turned off 2 Connect the target system Connect the emulator and the target system with a user system interface cable 3 Connect the host machine and turn on the emulator Connect the emulator and the host machine with a USB interface cable The EZ CUBE emulator is turned on by connecting the USB interface cable 4 Turn on the target system Turn on the target system This step is not necessary when power is supplied to the target system from the EZ CUBE emulator 5 Launch the emulator debugger Launch the emulator debugger For the operation after this step refer to the user s manual for CuebSuite If the debugger does not start normally or the operation is unstable the possible causes may be the following Communication error between EZ CUBE and target system e Whether firmware is update e Whether switch is
85. sCENESAS EZ CUBE On Chip Debug Emulator with Programming Function G de d ge E o lt D 5 Cl 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 Corp without notice Please review the latest information published by Renesas Electronics Corp through various means including the Renesas Electronics Corp website http www cn renesas com Renesas Electronics China www cn renesas com Rev 3 00 Oct 2014 Notice 1 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 2 Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents copyrights or other intellectual p
86. sections and set these items in the user program or using the build tool property a Setting of security ID This setting is required to prevent the memory from being read by an unauthorized person Embed a security ID at addresses 0xC4 to OxCD in the internal flash memory The debugger starts only when the security ID that is set during debugger startup and the security ID set at addresses 0xC4 to OxCD match If the ID codes do not match the debugger manipulates the target device in accordance with the value set to the on chip debug option byte area refer to Table 3 6 If the user has forgotten the security ID to enable debugging erase the flash memory and set the security ID again How to set security ID A setting method of the security ID is following When both 1 and 2 methods are done at a time method 2 has a priority 1 Embed the security ID at addresses 0xC4 to OxCD in the user program 2 Setting of the security ID by build tool common options In case of CS CubeSuite 1 Embed a security ID at addresses 0xC4 to OxCD in the user program For example If the security ID is embedded as follows the security ID set by the debugger is 0123456789ABCDEF1234 not case sensitive User s Manual 21 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER Table 3 5 Security ID Address Value 0xC4 0x01 0xC5 0x23 0xC6 0x45 0xC7 0x67 0xC8 0x89 0xC9 0xAB OxCA 0xCD 0xCB OxEF 0x
87. served for placing the debug monitor program so user programs or data cannot be allocated in these spaces These spaces must be secured so as not to be used by the user program Moreover this area must not be rewritten by the user program Secure the resources for debugging with the contents explained by 1 and 2 Figure 3 8 Memory Spaces Where Debug Monitor Programs Are Allocated Internal POM space Internal RAM spece Intemel ROM end address hiternel RAM end address a Debug monitor area b Stack area for debuzene DSH a a Debug monitor area CEH lt Security ID area O4H Orechip debug option byte area CH a Zei Debue monitor area 0 Note 1 In debugging reset vector is rewritten to address allocated to a monitor program 2 When the self programming is executed it will be 12 bytes 1 Securing of debug monitor area This is the area to which the debug monitor program is to be allocated The monitor program performs initialization processing for debug communication interface and RUN or break processing for the CPU This user programs or data must not be placed in an area of 22 bytes near the on chip debug option byte and an area of 1024 bytes before the internal ROM end address In addition reset vector is rewritten to address allocated to a monitor program How to secure areas It is not necessarily required to secure this area if the user program does not use this area However To avoid
88. ss where a software break is set This includes self programming and rewriting to RAM If performed the instruction placed at the address may be invalid Self programming If the space where the monitor program for debugging is rewritten by flash self programming the debugger does not operate correctly This also holds true when boot swapping is executed Boot swapping during self programming The boot swapping function cannot be emulated This is because boot swapping moves the memory spaces used for debugging and thus the debug communication can no longer be performed Break function for stack pointer initialization failure This function executes a break when an interrupt occurs or a PUSH instruction is executed while the initial setting has not been made for the stack pointer If the manipulation or instruction shown below is executed immediately after a reset operation the break function for stack pointer initialization failure becomes invalid e Setting a software break e Write to the stack pointer from the Register window e Write to the flash memory from the Memory window etc User s Manual 55 7 8 9 CHAPTER 5 HOW TO USE EZ CUBE WITH 78K0 MICROCONTROLLER If a software break occurs while the initial setting has not been made for the stack pointer the message Uninitialized Stack Pointer is displayed on the status bar The subsequent operations are not performed normally so make sure to set the SP value in the user
89. t on patent rights or any other rights arising from the use of any information products or circuits presented in this user s manual 2 The information or data in this user s manual does not implicitly or otherwise grant a license to patent rights or any other rights belonging to Renesas or to a third party 3 This user s manual and the emulator are copyrighted with all rights reserved by Renesas This user s manual may not be copied duplicated or reproduced in whole or part without prior written consent from Renesas About diagrams Some diagrams in this user s manual may differ from the objects they represent Terminology The meanings of the terms used in this manual are described in the table below Term Meaning EZ CUBE Generic name of EZ CUBE Target device _ This is the device to be emulated Target system __ This is the system to be debugged user created system It includes software and hardware created by the user cs It is an integrated development environment CubeSuite _ It is an integrated development environment Firmware Program embedded in the device for controlling EZ CUBE RFP Renesas Flash Programmer GUI software used to perform flash programming Note The product name of CubeSuite an integrated development environment from Renesas has been changed to CS from V3 00 00 User s Manual CAUTION Caution to Be Taken for System Malfunctions If the emulator malfunctions be
90. to debug monitor program at 0x0 0x4 jr disp22 4 e The jump instruction for the debug monitor program is placed at address 0 Before writing After writing Jumps to debug monitor program at 0x0 gt No change c Securing of area for debugging The area for debugging is for performing initialization processing for debug communication interface and RUN or break processing for the CPU The internal ROM area must be filled with OxFF This area must not be rewritten by the user program How to secure areas It is not necessarily required to secure this area if the user program does not use this area To avoid problems that may occur during the debugger startup however it is recommended to secure this area in advance using the compiler The following shows examples for securing the area using the Renesas Electronics compiler CA850 Add the assemble source file and link directive code as shown below e Assemble source Add the following code as an assemble source file Secures 2 KB space for monitor ROM section section MonitorROM const space 0x800 Offs Secures interrupt vector for debugging section DBGO space 4 Oxff Secures interrupt vector for serial communication Change the section name according to serial communication mode used section INTCSIO0 space 4 Oxff Secures 16 byte space for monitor ROM section section MonitorRAM bss comm monitorramsym 16 4 defines monitorramsym symbol
91. ucts 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 10 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 11 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics 12 Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if you have any other inquirie
92. unction Table 7 5 Specifications of Programming Function Functions Specifications Host interface USB 2 0 Target interface UART Target system voltage 2 7 to 5 5 V depends on the target device Clock supply 8MHz clock can be supplied Clock mounted on the target system can be used Power supply 5 V 0 3V maximum current rating 100 mA Acquisition of device specific Parameter file for Renesas Electronics is used information Programming software RFP Renesas Flash Programmer Security flag setting Available Standalone operation Unavailable must be connected to host machine Note For detailed usage of the RFP refer to the RFP User s Manual 7 3 2 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of EZ CUBE e To improve the writing quality fully understand verify and evaluate the following items before using EZ CUBE Circuits are designed as described in the user s manuals for the device and EZ CUBE The device RFP and EZ CUBE are used as described in each user s manual The power supplied to the target system is stable User s Manual 79
93. ure 4 2 Recommended Circuit Connection Voo Voo Voo Voo Target connector GND jete RESET_IN Voo FLMDO FLMDO CLK Too 1 RxD RESET_OUT TxD This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 1009 or less For details refer to 4 1 3 Connection of reset pin The circuit enclosed by a dashed line is not required when only flash programming is performed This connection is required for 2 wire communication but not for 1 wire communication This pin is left open when EZ CUBE is not connected so connect a pull up or pull down resistor to this pin before using EZ CUBE Switch Setting SW 1 Select switch to M2 SW 2 Select switch to Int Clock SW 3 Select switch to Debug Mode SW 4 Depend on the target system environment SW 5 Select switch to Other Notes on the Target System Power Supply 1 Do not change the switch setting after connecting USB cable Q 2 The EZ CUBE can supply power up to 100 mA current Do not exceed the maximum supply current The power is supplied from EZ CUBE after connecting EZ CUBE to the host machine 7KXERUTION User s Manual 32 CHAPTER A HOW TO USE EZ CUBE WITH 78KOR MICROCONTROLLER 4 1 3 Connection of reset pin This section describes the connection of the reset pin for which special attention must be paid in the circuit connection example shown in the previous section During on
94. ware Table 3 1 Supporting MCUs of RL78 EZ CUBE firmware mee Ee RL78 G10 RL78G10_OCD_FW hex Supporting MCUs RL78 G12 G13 G14 11A RL78_OCD_FW except G10 hex Supporting Operation mode UART mode User s Manual 16 CHAPTER 3 HOW TO USE EZ CUBE WITH RL78 MICROCONTROLLER 3 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming Figure 3 1 presents an overview of the EZ CUBE communication interface As shown on the left side of the figure EZ CUBE performs serial communication with the target device on the target system For this communication communication circuits must be mounted on the target system Refer to this section to design circuits appropriately Figure 3 1 Outline of Communication Interface Communication circuits must be mounted on the target system RENESAS Target device EZ CUBE USB UART commurication communication Target system EZ CUBE 3 1 1 Pin assignment Host machine This section describes the interface signals used between EZ CUBE and the target system Table 3 2 lists the pin assignment Table3 3 describes the functions of each pin Table 3 2 Pin Assignment Pin No Pin nameN GND RESET_IN Vdd FLMDO CLK RxD RESET_OUT Did OO To IM TOOLO Note Signal names in EZ CUBE User s Manual RENESAS CH
95. ware can use combination with CubeSuite V2 02 and the older User s Manual 58 CHAPTER 6 HOW TO USE EZ CUBE WITH RX MICROCONTROLLER 6 1 Target System Design Figure 6 1 shows the outline of EZ CUBE communication interface Figure 6 1 Outline of Communication Interface Communication circuits must be mounted on Target device communication Target system EZ CUBE Host machine Note Single chip mode 6 1 1 Pin assignment Table 6 2 shows the pin assignments of EZ CUBE Table 6 3 shows the pin functions Table 6 2 Pin Assignment Pin name 1 Pin No asrs63T4 5 6 a RENESAS T GND GND EZ CUBE 2 RES DESS 3 VCC VCC 4 N C N C Target interfag 5 FINEC 2 NC SEH 6 RxD 3 RxD 3 7 ic NC 8 MD FINED TxD 3 MD FINED TxD 3 1 Signal name on EZ CUBE 2 Mount the 16MHz three terminal oscillator on EZ CUBE and set SW 2 to Ext Clock 23 TxD and RxD pins are necessary for flash programming by flash programmer Table 6 3 Pin Functions IN OUT Explanation Communication clock output Only RX63T group R5F563T4 5 6 Pin name FINEC OUT Debugger communication data input output MD FINED or Flash programmer MD FINED TxD IN OUT communication data oputput TxD RxD IN Flash programmer communication data input RES IN OUT Reset signal input output VCC Power Power input 2 7V

Download Pdf Manuals

image

Related Search

Related Contents

RANCHecker 2 for Maxwell Render Windows  Hx600 - QTC  HBAC2 Service Manual - Western Enterprises  bZiZgh - Crest Audio  GUIA PRÁTICO DE UTILIZAÇÃO  ZOLL M Defibrillator Service Manual  GE 25942GE1 Cordless Telephone User Manual  MODEL S8VM  RoadRunner L6  SGVT-01 GPS Vehicle tracker`s User Manual  

Copyright © All rights reserved.
Failed to retrieve file