Home
QB-MINI2 User`s Manual
Contents
1. cccccseecccceeseeeceseceeceeeeeeceaeeeesegeeecsaueeeseueeessaueeessaeeessaneeessenseessseeess 102 4 3 6 Cautions on flash Programming cccsecccccseseecceeeceeceeeececsueeeeseueeecsuceeeseuseeeseueeessueeeesaeeeesseeeesessaeees 102 CHAPTER 5 HOW TO USE MINICUBE2 WITH 78KO0OS MICROCONTROLLER eees 103 5 1 Target System DESIGN aans en cei cece ens eitewieec tence ieee ees 104 le tes UMN SI UMMM aeea seieastinersasaimseemieataare antes tetera aclsinnaeteede Basuaeecileteeaatnane eases 105 5 12 GIPCUIECOMNNEGHON example heissce aes ch ane e E N 106 5 1 3 Connection of reset pin sceeccd eieecenedadecbin edness vcnce vente cawodenalaveladewssvndswyesl di anediauladecesvedwectvenidoesszeseusiedess 107 5 14 Connection O INTP DIM wens icsense alee Geeta oes cate eee idee nen eee eee 110 5 1 5 CONMECHON OF X tand X2 DIN 0 cicowsextcemtinteaceincdseus a ade euecost chub eden E eee gies 112 9 1 6 MOUNTING connector onto target SVStCIM vec sapictic sees eeiieteed ease r a a a E S 113 5 2 On Chip DEDUGGING aiiis aa eG teeweenn baton atete dette nerteutayy i 114 52 1 Debug TUINECIOM Siscicaaeitei ate vaseracatiteedsOasemncattceiade a O 114 Die ee OVSE mn COMTOUN ATION sisean E beisnamseumemeeeaeaatenc erent iemasiemnevaaieete 115 5 2 9 Oystem starnup DI OCC CUIN Gi occ cee saseranck oesae E ge ce eect eden Soares 116 5 2 4 System shutdown procedure iss wus entice aalasu nsineuahadeu eb cazedncda vale wsieayibedia
2. ccccceseeceeseecenseecensescensesennsesenseesenneess 11 2 1 Names of Supplied Hardware sssusa aaan aaa aada aaan da aaae ada aaa aaa 11 2 2 Part Names and Functions of MINICUBE2 aassnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnna 12 2 3 Part Names and Functions of 78K0 OCD Board cccccccssssssssseeseeeeeeseeeeeeeeeeeeeeeeeeeoeeeeeeesnness 14 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER cccceeeseeeseeeeeees 15 3 1 Target System DESION assos b e a a a vcs aE a raaa ai 16 Skt Pimassionmnme Mesan e a A E E Matte aeeaetens 17 3 1 2 Circuit connection examples ccccccseseccceseeccceeseecceueeecseeeeceuseeeseseeesaueeecsaseeessaeeeesaueeesssseeessaeees 18 3 1 3 Connection OF LESCU PINs ged oars ese a a eed ech O E cee 21 3 1 4 Mounting connector Onto target system cccccccceeceeeeeeeeeeeeseeeeseeeeesaeeeesaeeesaeeeseeeeseueeeseeessaeeeseeeesaes 24 3 2 ON CHIp DEDUGGIG wicos oreo aa a ceccteuvcati test ieee a a NS 25 3 2 Debug TUCO S cascada ea a r cattns pace TE a a a kates pee nseesdaeanceagnece taxes 25 2A DSV SIGN CONNgUra lOs E E a N 26 3 2 3 System startup procedure a 52c5c6ac2acsensabsadtcscniasdesahsnacacasiesensas sed nies densaiseaeesaseesebian tose miaiteDenthocasaiesse 27 3 2 4 System shutdown PrOCeCUre ccccccccsescecceseecceeeeeeeceeeeceeueeeceuseeeseuseeeseueeessageeessueeessaeeessnaseeeseeeees 29 3 2 5 Securing of user resources and setting
3. Figure 4 9 When Both Debugging and Programming Are Performed with X1 X2 oscillator is used with TOOLC0O TOOLDO communication Target connector Target device GND RESET _OUT RESETN e 1 TOOLDO x2 3 R F U R F U R F U o jo IN Ioa lo sA lt w s same eee oe cCLKN e 2 R F U TOOLCO0 X1 e 1 0 kQNote 4 R F U FLMD1 DATA 1 kQNote 4 Vpop FLMDO Reset connector 4 RESET_INN 4 RESET 16 R F U Notes 1 If there are capacitance elements such as capacitors on chip debugging might not operate normally 2 A clock signal provided on the 78KO OCD board a 4 8 or 16 MHz clock signal generated in MINICUBE2 or the clock signal generated by the internal high speed oscillator of the device can be used for the clock signal of the target device during on chip debugging Only the internal high speed oscillator of the device can be used during flash programming 3 During on chip debugging the settings specified by the user program are ignored because these pins are used as pins dedicated to on chip debugging However if the pins are specified as input pins the pins must be processed because they are left open when MINICUBE2 is not connected 4 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin 5 Never connect an oscillation circuit to the 78KO OCD
4. R20UT0049EJ0600 Rev 6 00 ae Page 67 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 2 Automatically switching the reset signal via selector logic Only for devices that have no FLMDPUP register but have a FLMDO pin Figure 4 17 illustrates the circuit connection for the case where the reset signal is switched automatically using the selector logic with or without MINICUBE2 connected When using flash self programming refer to Figure 4 18 lt R gt Caution The reset circuit is disconnected if flash self programming is performed FLMDO HI without MINICUBE2 connected so no signals can be input to the RESETpin Figure 4 17 Circuit Connection for Automatically Switching Reset Signal with Selector Logic When Not Using Flash Self Programming Target connector Vpop 1to10kQ Selector Target device A RESET_OUT T FLMDONete HI Side A LOW Side B Reset connector 1 to 10 kQ RESET signal Note FLMDO is high level when MINICUBE2 is connected and FLMDO is pulled down when MINICUBE2 is not connected Figure 4 18 Circuit Connection for Automatically Switching Reset Signal with Selector Logic When Using Flash Self Programming Target connector Vp 10 kQ Target device RESET_OUT ADO RESET _IN FLMD LOW Side B 10 KQ Reset connector RESET signal Note This circuit is designed for flash self programming which controls the FLMDO pin vi
5. 256 bytes When using Renesas Electronics compiler CC78KO the area used for pseudo real time RAM monitoring can be secured using the linker option go Figure 4 36 shows the Linker Options dialog box of the project manager Add the size of the area for RAM monitor to the area specified in a For details about the RAM monitoring area refer to the document QB MINI2 Operating Precautions Figure 4 36 Linker Option Setting When Pseudo RAM Monitor and Software Break Are Used Linker Options Output Output Library Others Load Module File o Output File Name rnc Inf Browse i Output Symbol Information g Create Error List File e Pe Sins W On Chip Debugl go W SIZE 51 2 bytes W Security D qi ID FFFFFFFFFFFFFFFFFFFF H Command Line Options o5 2 gillFFFFFFFFFFFFFFFFFFFEh dlk dr s Cancel Apply Help Page 88 of 178 QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 2 7 Cautions on debugging 1 2 3 4 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS This section describes cautions on performing on chip debugging for a 78KO microcontroller Be sure to read the following to use MINICUBE2 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 me
6. 3 Short 1 to 3 and 2 to 4 of JP1 during on chip debugging Short 1 to 2 of JP1 and leave 3 to 4 of JP1 open during flash programming Leave JP1 open when using the target device when MINICUBE2 is not connected 4 The name of the pin shared with OCD1A might be invalid or might not exist depending on the device For details refer to the user s manual for the target device 5 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 4 1 3 Connection of reset pin 6 The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports Connect any port that can output data to FLMDO via a resistor When not using flash self programming process the pins according to the device specifications 7 This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device R20UTO049EJ0600 Rev 6 00 ae Page 56 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Notes 1 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Caution The following figure shows the recommended circuit Be sure to design the circuit considering
7. C OD D me o lt S C D QB MINI2 On Chip Debug Emulator with Programming Function User s Manual Target Devices V850 Microcontrollers 78KOR Microcontrollers 78KO Microcontrollers 78KOS Microcontrollers 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 renesas com Renesas Electronics www renesas com Rev 6 00 Mar 2011 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in thi
8. 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 assembler RA78KOS Add the assemble source code as shown below e Assemble source example that securse INTP interrupt vector sss CSEG AT 0018h SSS is an arbitrary symbol name eight characters or less DB Offh Offh Remark Describe the INTP interrupt vector address to the portion of 0018h The following shows examples of the 78KOS Kx1 When using 78KOS KU1 or 78KOS KY 1 INTP1 O00ah When using 78KOS KA1 or 78KOS KB1 INTP3 0018h e Assemble source example that secures an area for software break SSS CSEG AT 007eh SSS is an arbitrary symbol name eight characters or less DB Offh Offh e Assemble source example that secures monitor program area lower than internal ROM end address SSS CSEG AT OedOh SSS is an arbitrary symbol name eight characters or less DB Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh DB Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh 19 lines DB Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh Offh R20UT0049EJ0600 Rev 6 00 Page 120 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER Remark Describe the address
9. 1 00 Device Setup Parameter File Read PASS Device Hame Firmware Parameter file Name OF S732 prm Version 1 00 Load file Mame Date Chksum Area Connection to device Fort SI0 H75 Fule 11 Speed MHz Range Chip Freg 5 00MHz Multiply 4 00 R20UT0049EJ0600 Rev 6 00 Page 45 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 2 Selection of program file Select the program file following the steps lt 1 gt to lt 3 gt described below lt 1 gt Click the File menu on the menu bar and then click Load lt 2 gt The program file select dialog box appears Figure 3 23 Program File Select Dialog Box File name teg s hex Files of type 5 rec Hex files rec 3 hex Cancel lt 3 gt Select the program file for the target device and then click the button Figure 3 24 Completion of Program File Selection ia OB Programmer Eile Device Help pau bOB Frogrammer startup Programmer gt Command standby QB Progrmmer 1 00 gt Firmware 1 00 Device Setup Parameter File Read PASS r Device Hame k 0pen Load File Firmware Success read HE file gt Parameter file Name fOF 3 32 prm Version 1 00 Load file Name gt SA amp MPLE HEX Date 2006 02 24 21 13 08 Chksum E23E Area OOOO00h 007FFFh Connection to device Fort 5SI0 H75 Pulse 11 Speed MHz
10. Buffer RESET IN lt lt 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 MINICUBE2 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 R20UT0049EJ0600 Rev 6 00 ae Page 22 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 2 Manually switching the reset signal with jumper Figure 3 6 illustrates the circuit connection for the case where the reset signal is switched using the jumper with or without MINICUBE2 connected This connection is simple but the jumper must be set manually Figure 3 6 Circuit Connection for Switching Reset Signal with Jumper Target connector Target device RESET OUT Reset connector RESET_IN RESET
11. Program Checksum commands are executed for the target device sequentially The mode LED on MINICUBE2 flashes yellow during execution When the command execution is completed normally the mode LED glows green and the following window appears Figure 5 27 Completion of Autoprocedure EPV Command Execution ia QB Programmer File Device Help pall bAutoProcedure E py Blank check Chip Mot blank Erase need Erasing Erase Chip FASS Truncate the HE File Program Chip 10 20 0 40 AOS Device Checksum 041842 QBP Checksum 0x1342 Checksum compare FASS AutoProcedure E py PASS k R20UT0049EJ0600 Rev 6 00 Mar 31 2011 sQENESAS Frogrammer QB Programmer 1 00 Firmware W2 00 Device Name UPD 8F9234 Firmware 0 00 Parameter file Name MOF 9254 prm Version 1 02 Load file Name SAMPLE HEX Date 2006 02 24 21 13 08 Chksum E23Eh Area QO0000h 007FFFA Connection to device Fort UART ch Pulse Speed 115200bp Range Chip Freg amp U0MHz2 Multiply 1 00 Page 134 of 178 QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 3 5 System shutdown procedure Terminate flash programming and shutdown the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Terminating the QB Programmer Terminate the QB Programmer if you are not going to perform programming to
12. areas in accordance with your programming environment The following figure shows an example Figure 4 43 Advanced Tab of Device Setup Dialog Box Device Setup Standard Advanced Command options W Blank check before Erase Security flag after Program Checksum after Program Security fag settings Disable Chip Erase Disable Block Erase End Boot black 003 Disable Program Show Address Disable Boot block cluster reprogramming R20UT0049EJ0600 Rev 6 00 ae Page 98 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt 6 gt By clicking the button the programming environment is set and the Device Setup dialog box is closed The main window appears as follows Figure 4 44 Completion of Programming Environment Setting ri OB Programmer File Device View Help 2 FlashOpennine Flash Open OK Name PPOOMMAND Device Setup Device File Read Ok Firm Wersion ExtGode Vendor PRM Device file Name FEF ORS orm Format O41 4 Version WO Processor Wer 0200 Load file Name Date CHESUIT Area Connection to device Port UART speed 600 Range Ghip Freq 20 00 Multiply 1 00 c R20UT0049EJ0600 Rev 6 00 Page 99 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 2 Selection of program file Select the program file following the steps
13. lt 1 gt to lt 3 gt described below lt 1 gt Click the File menu on the menu bar and then click Load lt 2 gt The program file select dialog box appears Figure 4 45 Program File Select Dialog Box File name a rec a zA Files of type 5 rec t Hes files rec hex had Cancel lt 3 gt Select the program file for the target device and then click the button Figure 4 46 Completion of Program File Selection OB Programmer File Device View Help PAD gt FlashOpennine Flash Open OF gt 2COMMAND Device Setup Device File Read OF gt COMMAND Open Load File success read HE file R20UTO049EJ0600 Rev 6 00 Mar 31 2011 CENESAS Name Firm Wersion ExtGode Vendor PRM Device file Name F8FORSS orm Format O41 4 Version WTO Processor wer O00 Load file Name SAMPLE HEX Date 2005 04 05 16 52 18 Chksum E23Eh Area QOO000h O07F F Fh Connection to device Port UART Speed Range Freq Multiply ms Page 100 of 178 QB MINI2 3 Execution of Autoprocedure EPV command Click the Device menu on the menu bar and then click Autoprocedure EPV The Blank Check Erase if the flash memory in the target device is not blank Program Verify are executed for the target device sequentially The mode LED on MINICUBE2 flashes yellow during execution When the CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER command
14. 6 00 Page 137 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 1 1 Pin assignment This section describes the interface signals used between MINICUBE2 and the target system Table 6 2 lists the pin assignment Table 6 3 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 6 2 Pin Assignment fe u fe AruSSSSSOS S C 13 Note Signal names in MINICUBE2 TOP VIEW WBOOODOOW 9OYQOOOO Pin assignment of target connector to be mounted on target system Table 6 3 Pin Functions aru Trenn ereua solve toner OOO OOOO O OOOO Notes 1 As seen from MINICUBE2 2 The RxD and TxD pins are internally shorted by setting the mode select switch to M1 R20UT0049EJ0600 Rev 6 00 Mar 31 2011 stENESAS Page 138 of 178 QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 1 2 Circuit connection example Refer to Figure 6 2 and design an appropriate circuit Caution 1 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 lt R gt 2 The following figure shows the recommended circuit Be sure to design the
15. Circuit Connection Diagrams Usage Connector Programming Debug X1 oscillator circuit Refer to Used Interface Interface 16 pin UART OCDOA X Figure 4 4 TOOLDO Figure 48 TOOLG1 TOOLD a en Figure 410 10 pin OCDOA X Figure 4 11 OCDOB X OCD1A P Figure 4 12 OCD1B P32 puaRTM P Figure 4 13 4 13 TOOLCD TOOLDO ewan Figure 46 TOOLC1 TOOLD O e Tn Notes 1 Refer to the target device s users manual to confirm whether an FLMD1 pin is provided 2 The debug interface pin name varies depending on the target device For details confirm the target device s users manual 3 Ifthe security ID is lost including when the area is corrupt it can only be recovered by erasing the flash memory of the device R20UT0049EJ0600 Rev 6 00 6 Page 54 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER Figure 4 3 Flow Chart for Selecting the Circuit Which pins do you want to use to communicate with TOOLDx OCDxA B UART Which pins do you want to use to communicate with MINICUBE2 TOOLDO What do you want to use MINICUBE2 for On Chip Debug amp Do not use flash programming flash programming Figure 4 8 Figure 4 13 Which pins do you want to use to communicate with MINICUBE2 Do you want to use On Chip Debug the X1 and X2 oscillators Use Figure 4 9 Which pins do you want to use to
16. Programmer if you are not going to perform programming to other devices Remark When the QB Programmer is terminated the setting information is saved in the qbp ini file Due to this file the same setting is maintained when the QB Programmer is started the next time 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to ioe or eu 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine When the power select switch is set to T the step of 4 Unplugging the target cable can be performed before this step 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system 6 3 6 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of MINICUBE2 e To improve the writing quality fully understand verify and evaluate the following items before using MINICUBE2 Circuits are designed as described in the user s manuals for the device and MINICUBE2 The device QB Programmer and MINICUBE2 are used as described in each user s manual The power supplied to the target system is stable R20UT0049EJ0600 Rev 6 00 ae Page 166 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 7 SELF TESTING CHAPTER 7 SELF TESTING This section describes the method to perform self testing with MINICUBE2 The MINICU
17. Rev 6 00 Page 78 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt 4 2 5 Clock setting The clock signal generated by the X1 oscillator internal high speed oscillator or subsystem clock oscillator can be used for the clock signal of the target device during on chip debugging Setting up each is described below Remark MINICUBE2 can supply the clock signal for the target device instead of the X1 oscillator Supplying a clock signal to the subsystem clock is not supported 1 Using the high speed system clock a Using the clock provided in the target system only when OCD1A and OCD1B or TOOLD1 and TOOLC1 are used b Using the clock generated in MINICUBE2 only when OCDOA and OCDOB or TOOLDO and TOOLCO are used c Using the oscillator connected to the 78KO OCD board only when OCDOA and OCDOB or TOOLDO and TOOLCO are used d Using the oscillator circuit connected to the 78KO OCD board only when OCDOA and OCDOB or TOOLDO and TOOLCO are used 2 Using the internal high speed clock when no restrictions are applied by the occupied pins 3 Using the subclock when no restrictions are applied by the occupied pins The settings for 1 to 3 are described below 1 Using the high speed system clock a Using the clock provided in the target system only when OCD1A and OCD1B or TOOLD1 and TOOLC1 are used Remove the 78K0 OCD board oscillator or the oscillation circuit Sys
18. SI IN TxD SO UT H S Pin used to output reset signal to the target device Pin used to output clock signal to the target device Pin used to set the target device to debug mode or Pin used to set programming mode iN Pin used to receive command data from the target device O Pin used to transmit command data to the target device C Pin used to output clock signal for 3 wire serial communication 7 Pin used to input handshake signal from the target device This pin is reserved For the connection of the reserved pins see each circuit related to the pins Note As seen from MINICUBE2 CENESAS Page 17 of 178 QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 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 Table 3 3 Corresponding Circuit Connection Diagrams Communication Interface Mode UART Figure 3 2 CSI H S Figure 3 3 Page 18 of 178 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt R gt Caution The following figure shows the recomm
19. Setup lt 2 gt The Device Setup dialog box appears in which the Standard tab is active Figure 4 40 Standard Tab of Device Setup Dialog Box Device Setup standard Advanced Farameter File FRAM File Read Target Device Connection Supply Oscillator r Fort ao Speed Operation Mode f Start a Enel rc lt 3 gt Click the PRM File Read button to open the Parameter File Select dialog box Select the parameter file for the target device and then click the button Figure 4 41 Parameter File Select Dialog Box Look in B PAM 78F0547D File name 78F0547D Files of type PRM Files PRM Cancel Page 97 of 178 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt 4 gt Set the items in the Target Device Connection Operation Mode and Supply Oscillator areas in accordance with your programming environment The following figure shows an example Figure 4 42 Standard Tab of Device Setup Dialog Box After Setting Device Setup Standard Advanced Parameter File 8F0547D prm PRM File Read Target Device Connection Supply Oscillator F Fort UART Est OSC Frequency 20 00 MH Speed 115200bps Multiply rate 1 00 Operation Mode f Chip Start C Block End cr lt 5 gt Switch to the Advanced tab Set the items in the Command options and Security flag settings
20. The following products are recommended e HIF3FC 16PA 2 54DS right angle type made by Hirose Electric Co Ltd e HIF3FC 16PA 2 54DSA straight type made by Hirose Electric Co Ltd e 7616 5002PL right angle type made by Sumitomo 3M Ltd e 7616 6002PL straight type made by Sumitomo 3M Ltd Compact connectors and loose wire cables are also available as options For more information on these products access the MINICUBE2 information site URL http www2 renesas com micro en development asia minicube2 minicube2 html Figure 5 12 2 54 mm Pitch 16 Pin General Purpose Connector Pin Layout TOP VIEW Pin assignment when MINICUBE2 is connected in this direction WHOMOYODOO 194 2OOOO Pin assignment of target connector to be mounted on target system R20UT0049EJ0600 Rev 6 00 Page 113 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 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 MINICUBE2 5 2 1 Debug functions Table 5 3 lists the debug functions when a 78KOS microcontroller is the target device and the ID78KOS QB is used If a debugger other than the ID78KOS QB made by partner manufacturer is used the available functions may differ so check the specifications of the debugger used Table 5 3 Debug Functions DMM writing to memory durin
21. USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 4 7 When Both Debugging and Programming Are Performed Communicating by using the OCD1A and OCD1B pins or using the X1 oscillator Vpop Wen Target connector Target device 3 k to 10 ka GND RESET_OUT RxpNote 1 is is Vpop Txpete 1 R F U R F U 1k to 10 kQN O IN Io a A O wy lt oOcD1A 1kto 1 0 kQNote 6 Reset connector RESET Notes 1 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 2 OCD1A OCD1B may be a different name such as P31 depending on the device used Check the pin name with the user s manual for the target device Since this pin is dedicated to debugging during debugging port settings made by the user program are ignored If this pin is assigned to an input port the pin must be connected as shown in this figure because it is open when MINICUBE2 is not connected 3 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin 4 The circuit enclosed by a dashed
22. aii dexerben avectil wacostlodeetienvaas eae 118 D2 5 DECUNIMG Oh USOT KESOUICSS omean acts eed E eesanty N A 119 5 2 6 Debugging of alternate functions Of X1 ANd X2 PINS cece eeeeeee cece cette cess eee eeeeeeaaaeeeeeseaaeeeeeeeeas 123 5AT CGAUMONS OM EDUC ING sisene tancen tae eet at ise ce a a Ga tan a ittaten see ae tate 124 5 3 Hash Programmi seccitieeesteicede stort a a eer ernencu dite h 126 5 3 1 Specifications of programming FUNGON e a Ee i A i E 126 53 2 SV SICH COM GMEA OM sena E A aTi 126 53 9 OyVstemsStarnup pDroced le cs ei E E deta suten dovaaebsaes 127 5 3 4 Usage examples eterna seer ate steeper eerste tires etn nets Stceronsde eanee eee rene nerigasd Geert waned reacted erected nennen 129 51320 SYSICM SMUTGOWIM DFOCCOUN E ronpi A a poeta semnedte N 135 5 3 6 Cautions on flash PrOgralniiiinG sescnnccsrisaceteceaaasencausietenatew signe tacaxeasanse ene teceendieeecsamaaereaiee tee eseaeeineel 135 CHAPTER 6 HOW TO USE MINICUBE2 WITH 78KOR MICROCONTROLLER ccceeeeeeeees 136 6 1 Target System DOSION 2 acces a nee tan tect ie al are ines 137 eile s UMN SI UNM sete tect aetet rte a oalbacte oeieastectat sion emiealeeis ah deiheg casio gas uae ense aaubane etaeeet taeaeenaemuaren aimee 138 6 1 2 GCireCuitCOnNGGlON example tisstesksctesn ch scavensssia ct oeates eo aseteavesesateeiasa heise ened seca eia ities bets 139 6 1 3 Connection Of reset pin sccc ccs cewenchices cece esnecevcnce sensi cev
23. and is waiting for execution processing Alternatively execution processing has been completed A debugger for 78KOS microcontrollers has been started and A debugger for 78KOR microcontrollers has been started and A debugger for 78KOR microcontrollers has been started and the CPU is running or a program is being downloaded A command from the QB Programmer is being executed for the flash memory A command from the QB Programmer is ended abnormally results in error R20UT0049EJ0600 Rev 6 00 Page 13 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE 2 3 Part Names and Functions of 78K0 OCD Board The 78K0 OCD board is used for debugging a 78KO microcontroller not used for flash programming Figure 2 3 illustrates the external view of the 78KO OCD board The name of each part is printed on the 78KO OCD board For each function refer to 1 to 4 below Figure 2 3 Part Names of 78KO OCD Board Cw vi mall mond i ni gt mene ce B u 4 1 CLK1 For clock supply to the target device a 14 pin DIP socket is implemented as CLK1 A 14 pin type oscillator 5 V or a parts board that can configure an oscillation circuit can be mounted on the 14 pin DIP socket A parts board such as the 160 90 314 manufactured by PRECI DIP can be used with this socket to configure oscillation circuit 2 CN1 This is a connector used to connect MINICUBE2 with th
24. breaks or pseudo real time RAM monitor is used Table 4 10 Size of Stack Area for Debugging When hardware breaks are used 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 OxFBOO When hardware breaks are used Within the range OxFBO7 to OxFEDF When software breaks are used also refer to e Within the range OxFB0O9 to OxFEDF Note Because the area OxFEDF is used by MINICUBE2 during a break set the initial value of the stack pointer to OxFEDF not OxFEEO when the initial value is set to OxFEDF the actual value used for the stack is OxFEDE so there will be no problems Furthermore OxFEDF is prohibited for use as stack area but it can be used as variable area R20UT0049EJ0600 Rev 6 00 Page 87 of 178 Mar 31 2011 stENESAS lt R gt QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER e Software break area f R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS This area is used for software breaks How to secure areas Refer to the following and secure the area SSS CSEG AT O7EH SSS is an arbitrary symbol name eight characters or less DB OFFH OFFH Pseudo real time RAM monitor RRM area To use pseudo real time RAM monitoring an area of Debug monitor area see a up to 128 bytes is required How to secure debug monitor area
25. cable Connect MINICUBE2 to the host machine as shown in Figure 5 15 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection Figure 5 15 Connecting MINICUBE2 to Host Machine MINICUBE2 USB cable Host machine 5 Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after power application 6 Debugger startup Start the debugger The mode LED glows green after debugger startup For the operation after this step refer to the user s manual for the debugger If the debugger does not start normally or the operation is unstable the possible causes may be the following e Communication error between MINICUBE2 and target system Whether communication is performed normally can be checked using the OCD Checker For details refer to the user s manual for the OCD Checker e The user resource has not been secured To perform debugging with MINICUBE2 the debug monitor area must be secured For details refer to 5 2 5 Securing of user resources Unsupported software debugger device file or firmware is used The software used may not support debugging of the target device Refer to the document QB MINI2 Operating Precautions and check the supported
26. debugging and flash programming Figure 5 1 presents an overview of the MINICUBE2 communication interface As shown on the left side of the figure MINICUBE2 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 5 1 Outline of Communication Interface Communication circuits must be mounted on the target system Target device Serial communication INTP communication MINICUBE2 Host machine Target system R20UT0049EJ0600 Rev 6 00 Page 104 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 1 1 Pin assignment This section describes the interface signals used between MINICUBE2 and the target system Table 5 1 lists the pin assignment Table 5 2 describes the functions of each pin The pin assignment varies depending on whether the operation is debugging or programming so design the circuit appropriately according to the circuit connection examples described on the following sections Table 5 1 Pin Assignment fe u fe Ws SSS fe joe i 13 R F U RESET_IN R F U Note Signal names in MINICUBE2 TOP VIEW WBOOMVYMVOOOD 948M OOO Pin assignment of target connector to be mounted on target system Table 5 2 Pin Functions RESET_IN Pin used to input reset signal from the tar
27. function MINICUBE2 has a self testing function which is used to detect faults in MINICUBE2 and perform maintenance R20UT0049EJ0600 Rev 6 00 Page 8 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 1 GENERAL 1 2 Notes Before Using MINICUBE2 Chapters 1 and 2 present an overview and the basic specifications of MINICUBE2 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 Purpose of Use Relevant Chapter CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER CHAPTER 4 HOW TO USE MINICUBE2 WITH CHAPTER 5 HOW TO USE MINICUBE2 WITH Target system design 5 1 Target System Design CHAPTER 6 HOW TO USE MINICUBE2 WITH i MINICUBE2 self testing CHAPTER 7 SELF TESTING os Expansion of supported devices CHAPTER 8 FIRMWARE UPDATE 1 3 Supported Devices Access the following MINICUBE2 information site or refer to the document for details on the devices that support debugging and flash programming with MINICUBE2 The document describes the development tools that are required as the support conditions serial interface and operating precautions so be sure to read the document in addition to this manual e MINICUBE2 information site URL http www2 renesas com micro en development asia
28. memory from being read by an unauthorized person R20UT0049EJ0600 Rev 6 00 Page 149 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER a Securement 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 Note It is an area of 88 bytes when the pseudo RRM function is not used during debugging in 2 wire mode If the internal ROM end address is OxSFFFF a monitor program of 88 bytes is allocated to the area from Ox3FFA8 to Ox3FFFF How to secure areas The following shows an example for securing the area when using Renesas Electronics assembler RA78KOR or compiler CC78KOR Select the On Chip Debug Option Bytes go check box as shown in the figure below An area of 22 bytes is thus secured near the on chip debug option byte An area of 1 024 bytes before the internal ROM end address is also secured by setting the start address and size Example Internal ROM end address is OxSFFFF Figure 6 12 Securement of Debug Monitor Area Linker Options Output Output Library
29. minicube2 minicube2 html e Document Document name QB MINI2 Operating Precautions Remark The above mentioned document is posted on the MINICUBE2 information Web site R20UT0049EJ0600 Rev 6 00 Page 9 of 178 Mar 31 2011 2CENESAS g lt R gt lt R gt R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS QB MINI2 CHAPTER 1 GENERAL 1 4 Hardware Specifications This section describes the MINICUBE2 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 MINICUBE2 Operating power supply Supplied via USB interface 5 V Operating environment Temperature 0 to 40 C conditions Humidity 10 to 80 RH no condensation Storage environment Temperature 15 to 60 C conditions Humidity 10 to 80 RH no condensation External dimensions 48 x 48 x 13 9 mm Weight Approximately 40 g Host machine interface Target host machine PC98 NX Series IBM PC AT compatibles Target OS Windows XP Windows Vista Windows7 S 2 0 1 1 compatible Current consumption 500 mA max Target interface Target cable length 16 pin cable 10 cm 10 pin cable 10 cm Supported connector 2 54 mm pitch general purpose connector Supply voltage 3 1 V typ or 5 0 V typ Supply current 100 mA max Current consumption 8 mA typ Voltage range 1 65 to 5 5 V When the power is supplied from MINIC
30. normally 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 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 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 Page 90 of 178 QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 8 Software break 2 If the debugger does not terminate normally due to a factor such as a freeze while a software break is set the instruction for which the software break is set and that has been substituted by a debug instruction remains as is To avoid this select Object in the Download dialog box and download the load module In particular take care regarding this point when starting the debugger u
31. of the circuit etc Figure 4 11 When Only Debugging Is Performed with OCDOA OCDOB communication Vpop Vpop Vop 1kQ Reset connector RESET signal 10kQ Target device Target connector RESET _IN RESET OUT ee OCDOA X1 I 10kKQ Port X 1 Note 4 l I OCD1AN gt GND 1k to 1 okonN te 6 Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin 2 For debugging mount no clock circuit For flash programming mount a clock circuit 3 The clock signal provided on the 78K0 OCD board or a 4 8 or 16 MHz clock signal generated in MINICUBE2 can be used for the clock signal of the target device during on chip debugging 4 The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports This circuit is used to control the port during flash programming Connect any port that can output data to FLMDO via a resistor When not using flash self programming process the pins according to the device specifications 5 The name of the pin shared with OCD1A OCD1B might be invalid or might not exist depending on the device For details refer to the user s manual for the target device 6 This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected
32. other devices Remark When the QB Programmer is terminated the setting information is saved in the gbp ini file Due to this file the same setting is maintained when the QB Programmer is started the next time 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to ioe or eu 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine When the power select switch is set to T the step of 4 Unplugging the target cable can be performed before this step 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system 5 3 6 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of MINICUBE2 e To improve the writing quality fully understand verify and evaluate the following items before using MINICUBE2 Circuits are designed as described in the user s manuals for the device and MINICUBE2 The device QB Programmer and MINICUBE2 are used as described in each user s manual The power supplied to the target system is stable R20UT0049EJ0600 Rev 6 00 ae Page 135 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH 7 MICROCONTROLLER CHAPTER 6 HOW TO USE MINICUBE2 WITH 78KOR MICROCONTROLLER This chapter describes how to use MINICUBE2 when performing on chip debugging and fla
33. reset signal from the target system is input to MINICUBE2 masked and then output to the target device Therefore the reset signal connection varies depending on whether MINICUBE2 is connected For flash programming the circuit must be designed so that the reset signals of the target system and MINICUBE2 do not conflict Select one of the following methods and connect the reset signal in the circuit The details of each method are described on the following pages 1 Automatically switching the reset signal via series resistor recommended described in recommended circuit connection in the previous section 2 Manually switching the reset signal with jumper 3 Resetting the target device by power on clear POC only R20UT0049EJ0600 Rev 6 00 ae Page 21 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 1 Automatically switching the reset signal via series resistor Figure 3 4 illustrates the reset pin connection described in 3 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 1008 or less The VDD or GND level may be unstable when the logic of RESET _ IN OUT of MINICUBE2 is inverted so observe the conditions described below in Remark Figure 3 4 Circuit Connection with Reset Circuit That Contains Buffer MINICUBE2 Target device Reset connector RESET OUT VDD
34. shown in Figure 6 10 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection Figure 6 10 Connecting MINICUBE2 to Host Machine Sw MINICUBE2 USB cable Host machine 5 Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after power application 6 Debugger startup Start the debugger The mode LED glows yellow after debugger startup For the operation after this step refer to the user s manual for the debugger If the debugger does not start normally or the operation is unstable the possible causes may be the following e Communication error between MINICUBE2 and target system Whether communication is performed normally can be checked using the OCD Checker For details refer to the users manual for the OCD Checker The user resource has not been secured or the security ID and on chip debug option byte have not been set To perform debugging with MINICUBE2 the debug monitor area must be secured and the security ID and on chip debug option byte must be set For details refer to 6 2 5 Securing of user resources and setting of security ID and on chip debug option byte Unsupported software debugger device file or firmware is used The s
35. side of the figure MINICUBE2 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 6 1 Outline of Communication Interface Communication circuits must be mounted on the target system USB RENESAS communication Target device Single wire UART communication 1 wire 2 wire mode Note MINICUBE2 Host machine Target system Note 1 wire mode Single wire UART communication using TOOLO pin 2 wire mode Single wire UART communication using TOOLO and TOOL1 pins For serial communication 1 wire mode single wire UART communication using the TOOLO pin or 2 wire mode using the TOOLO and TOOL1 pins is used Use 1 wire mode when performing flash programming Use 1 wire mode or 2 wire mode when performing on chip debugging Differences between 1 wire mode and 2 wire mode are as shown below There are no functional differences Table 6 1 Differences Between 1 Wire Mode and 2 Wire Mode Communication During Flash During Debugging Mode Programming 1 wire mode No differences e User resources secured for debugging Internal ROM 1036 bytes Internal RAM 6 bytes stack 2 wire mode e User resources secured for debugging Internal ROM 100 bytes RAM monitor used 1036 bytes lt R gt RAM monitor not used Internal RAM 6 bytes stack R20UT0049EJ0600 Rev
36. signal Jumper setting When MINICUBE2 is connected 1 2 shorted When MINICUBE2 is not connected 2 3 shorted 3 Resetting the target device by power on clear POC only Figure 3 7 illustrates the circuit connection for the case where the target device is only reset via POC without using the reset pin RESET OUT is valid only when the debugger is running or during flash programming The operation is not guaranteed if the power to the target system is shut down during debugging Note that the POC function cannot be emulated Figure 3 7 Circuit Connection for the Case Where Target Device Is Only Reset via POC Vbp 1 to 10 kQ Target connector Target device RESET OUT RESET_IN R20UT0049EJ0600 Rev 6 00 Page 23 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 1 4 Mounting connector onto target system The connector must be mounted on the target system for connecting MINICUBE2 with the target system A 2 54 mm pitch 16 pin general purpose connector can be used The following products are recommended e HIFSFC 16PA 2 54DS right angle type made by Hirose Electric Co Ltd e HIF3FC 16PA 2 54DSA straight type made by Hirose Electric Co Ltd e 7616 5002PL right angle type made by Sumitomo 3M Ltd e 7616 6002PL straight type made by Sumitomo 3M Ltd Compact connectors and loose wire cables are also available as options For more information on these products ac
37. specifications of the target devices noise characteristic of the circuit etc Figure 4 5 When Both Debugging and Programming Are Performed Communicating by using the OCDOA and OCDOB pins or using the X1 oscillator Vop Vou Target connector Target device 3 k to 10 kQ RESET_OUT 1k to 1 0 kQNote 8 OCDOA X1 1kto Note 4 OCD1A Oko OCDOB X2 R F U Reset connector RESET 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 The X1 oscillator of the target system cannot be used to generate the clock signal for the target device during on chip debugging Use the clock signal supplied from MINICUBE2 The clock signal generated by an oscillator provided on the 78KO0 OCD board or a 4 8 or 16 MHz clock that can be selected as the system clock can also be used Short the jumper pins and disconnect the clock circuit during on chip debugging Leave the jumper pins open and connect the clock circuit when the target device operates when MINICUBE2 is not connected during flash programming OCD1A may be a different name such as P31 depending on the device used For details refer to the user s manual for the target device This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details
38. specifying it in the Find what field To know the manipulations command functions and other software related settings of MINICUBE2 See the user s manual of the debugger to be used Note Footnote for item marked with Note in the text Caution Information requiring particular attention Remark Supplementary information Numeric representation Binary XXXX Or XxxxB Decimal Xxxx Hexadecimal xxxxH Prefix indicating power of 2 address space memory capacity K kilo 2 1 024 M mega 2 1 024 lt R gt lt R gt lt R gt Terminology The meanings of the terms used in this manual are described in the table below MINICUBE2 Generic name of QB MINI2 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 OCD unit OCD is an abbreviation of On Chip Debug The OCD unit means the debug function block embedded in the target device Firmware Program embedded in the device for controlling MINICUBE2 QB Programmer GUI software used to perform flash programming Related Documents Please use the following documents in conjunction with this manual The related documents listed below may include preliminary versions However preliminary versions are not marked as such Documents Related to Development Tools User s Manuals Document Name Document Number QB MINI2 On
39. the following order is not observed the target system or MINICUBE2 may be damaged 1 Terminating the QB Programmer Terminate the QB Programmer if you are not going to perform programming to other devices Remark When the QB Programmer is terminated the setting information is saved in the qbp ini file Due to this file the same setting is maintained when the QB Programmer is started the next time 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to man or Koi 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine When the power select switch is set to T the step of 4 Unplugging the target cable can be performed before this step 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system 4 3 6 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of MINICUBE2 e To improve the writing quality fully understand verify and evaluate the following items before using MINICUBE2 Circuits are designed as described in the user s manuals for the device and MINICUBE2 The device QB Programmer and MINICUBE2 are used as described in each user s manual The power supplied to the target system is stable R20UT0049EJ0600 Rev 6 00 Page 102 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5
40. to the portion of OedOh in accordance with the flash memory capacity of the target device see the following table Flash Memory Capacity of Value Described in Target Device Assembler Source 2 Securement of stack area for debugging In the internal RAM space of the target device the shaded portion in Figure 5 16 are the area where the debug monitor program uses as the stack area 5 bytes Since this area is allocated immediately before the stack area that is used by the user program the address of this area varies depending on the stack increase and decrease Therefore the stack pointer must be set by making allowances for the stack size 5 bytes used for debugging The following figure illustrates the case where the stack area is increased when the internal high speed RAM starts 5 bytes lt 1 gt lt 2 gt OxFEFF Ce Stack area OxFEFF 7 OxFEFF uae O 5 bytes OxFE05 OxFEO0O Available space speed RAM OxFE00 OxFEOO How to secure areas Refer to the address range shown below and set the stack pointer Example When internal high speed RAM starts from OxFEOO Within the range OxFEO5 to OxFEFF R20UT0049EJ0600 Rev 6 00 Page 121 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 Securement of communication serial interface The INTP pin is used for communication between MINICUBE2 and the target system The settings related to the INTP pin are perform
41. version When using software provided by a Renesas Electronics partner refer to the documents prepared by the partner company e Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 7 SELF TESTING R20UT0049EJ0600 Rev 6 00 ae Page 117 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 2 4 System shutdown procedure Terminate debugging and shutdown the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Debugger termination Terminate the debugger 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to Uae or 5 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system R20UT0049EJ0600 Rev 6 00 Page 118 of 178 Mar 31 2011 RENESAS CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER QB MINI2 5 2 5 Securing of user resources The user must prepare the following to perform communication between MINICUBE2 and the target device and implement each debug function Refer to the descriptions on the following pages and set these items in the user program or using the compiler options When C SPY manufactured by IAR Systems is used read also the following material IAR C SPY H
42. 0 us from execution start to break Max measurement time Approximately 100 hours lt R gt User spaces used for debugging Internal ROM 256 to 400 bytes Internal RAM 7 to 9 bytes Differs depending on the device For details refer to the document QB MINI2 Operating Precautions lt R gt Function pins used for debugging The pin shared with OCDxA and OCDxB the pin shared with TOOLCx and TOOLDx or the pin shared with RESET R20UT0049EJ0600 Rev 6 00 Page 73 of 178 Mar 31 2011 2CENESAS g lt R gt QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 2 2 System configuration Figure 4 24 illustrates the system configuration for on chip debugging Figure 4 24 System Configuration for On Chip Debugging lt 6 gt or i A lt 3 gt lt 1 gt NEG ELEGTRONIGS lt 2 gt Target system lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the debugger USB driver device files and so on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 78K0 OCD board accessory ote lt 6 gt 10 pin target cable accessory lt 7 gt 16 pin target cable accessory lt 8 gt Target connector sold separately Note On chip debugging using TOOLCx and TOOLDx can be performed without using the 78K0 OCD board R20UT0049EJ0
43. 1 6887 7858 7898 Renesas Electronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 852 2886 9318 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 7F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Electronics Singapore Pte Ltd 1 harbourFront Avenue 06 10 keppel Bay Tower Singapore 098632 Tel 65 6213 0200 Fax 65 6278 8001 Renesas Electronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jin Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955 9510 Renesas Electronics Korea Co Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 http www renesas com 2011 Renesas Electronics Corporation All rights reserved Colophon 1 0 QB MINI2 CENESAS Renesas Electronics Corporation R20UT0449EJ0600
44. 2 WITH V850 MICROCONTROLLER 1 Setting of programming environment Set the programming environment following the steps lt 1 gt to lt 6 gt described below lt 1 gt Click the Device menu on the menu bar and then click Setup lt 2 gt The Device Setup dialog box appears in which the Standard tab is active Figure 5 20 Standard Tab of Device Setup Dialog Box Device Setup Standard Advanced Farameter File FRAM File Read Target Device Connection Supple Oscillator a pot SO mo Speed Operation Mode G Start 2 End lt 3 gt Click the PRM File Read button to open the Parameter File Select dialog box Select the parameter file for the target device and then click the button Figure 5 21 Parameter File Select Dialog Box Filename 78F9234 prm Files of type PRM Files PRM Cancel R20UT0049EJ0600 Rev 6 00 ae Page 130 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt 4 gt Set the items in the Target Device Connection Operation Mode and Supply Oscillator areas in accordance with your programming environment The following figure shows an example Figure 5 22 Standard Tab of Device Setup Dialog Box After Setting Device Setup Standard Advanced Parameter File FOF 9234 prem PAM File Read Target Device Connection Supple Oscillator Part UART chO Frequency SMHz MHz S
45. 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a 78KO microcontroller using MINICUBE2 4 3 1 Specifications of programming function Table 4 11 Specifications of Programming Function Clock supply 16 8 or 4 MHz clock can be supplied Clock mounted on the target system can be used Power supply 3 or 5 V maximum current rating 100 mA Acquisition of device specific Parameter file for Renesas Electronics MINICUBE2 is used information Security flag setting Available Standalone operation Unavailable must be connected to host machine 4 3 2 System configuration Figure 4 37 illustrates the system configuration for flash programming Figure 4 37 System Configuration for Flash Programming HS lt 5 gt lt 4 gt lt 3 gt g So Target system lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the QB Programmer USB driver parameter files and so on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 16 pin target cable accessory lt 6 gt Target connector sold separately Remark Flash programming using the TOOLDx and TOOLCx pins c
46. 600 Rev 6 00 Page 74 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 2 3 System startup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform on chip debugging For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e Debugger e USB driver e Device file may be unnecessary when using a partner manufacture s debugger 2 Switch setting Set the mode select switch to M2 Set the power select switch by referring to Table 4 7 Caution Do not change the switch setting while the USB cable is connected Table 4 7 Setting of Power Select Switch ie 4 3 V is supplied from MINICUBE2 to the target lai C 5 V is supplied from MINICUBE2 to the target system Power supply of the target system is used MINICUBE2 detects the power for the target system The detected power is also used as the power supply for the communication interface Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 78KO OCD board setting The settings of the 78KO OCD board vary depending on how clock is supplied to the target device A 20 MHz oscillator is mounted on the 78K
47. 850 MICROCONTROLLER 1 Automatically switching the reset signal via series resistor Figure 6 3 illustrates the reset pin connection described in 6 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 MINICUBE2 is inverted so observe the conditions described below in Remark Figure 6 3 Circuit Connection with Reset Circuit That Contains Buffer MINICUBE2 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 6 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 below in Remark Figure 6 4 Circuit Connection with Reset Circuit That Contains No Buffers MINICUBE2 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 pr
48. BE2 diagnostic tool can be used to find if the reason that the debugger does not operate normally derives from a MINICUBE2 defect or from other hardware 7 1 System Configuration Figure 7 1 illustrates the system configuration for self testing Figure 7 1 System Configuration for Self Testing re a re lt 4 gt lt 3 gt NEG ELECTRONICS lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the USB driver and MINICUBE2 diagnostic tool These software can be installed when a Renesas Electronics debugger or QB Programmer is installed Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product R20UT0049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Page 167 of 178 QB MINI2 CHAPTER 7 SELF TESTING 7 2 Self Testing Procedure 1 Preparation and installation of software 2 3 4 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS The following software is required to perform self testing For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e MINICUBE2 diagnostic tool e USB driver Switch setting The mode select switch can be set to M1 or M2 Set the power select switch to 3 or 5 Connecting the USB cable Connect MINICUBE2 to the host machine Do not connect MINICUBE2
49. C SPY Hardware Debugger Systems User Guide issued by IAR Systems lt R gt Figure 4 32 Reserved Area Used by MINICUBE2 Internal ROM space Internal RAM space 9 bytes Max d Stack area for debugging XXXH 128 bytes Max xxxH f Pseudo RRM area 256 bytes Min 8FH a Debug monitor area 10 bytes 85H c Security ID area 1 byte 84H b Option byte area 2 bytes 7EH e Software break area 2byies 02H a Debug monitor area pt 00H Area that must be reserved lt R gt Note When ID78K0 QB Ver 3 00 or later is used be sure to check following the cautions For the products having the internal extended RAM By allocating the area F7FOH to F7FFH in the internal extended RAM the pseudo PRM function can be used For the products not having the internal extended RAM The pseudo PRM function cannot be used R20UT0049EJ0600 Rev 6 00 Page 83 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER a Debug monitor area this area must be secured Addresses 0x02 0x03 and area starting from address Ox8F must be secured to embed the debug monitor program lf this area is rewritten by flash self programming on chip debugging can no longer be performed How to secure areas When using Renesas Electronics compiler CC78KO addresses 0x02 0x03 and area starting from address can be secured for debug monitoring using the linker option go Figure 4 33 shows the
50. Chip Debug Emulator with Programming Function ID850QB Ver 3 40 integrated Debugger ID78KO OB Ver 3 10 Integrated Debugger ID78KOS QB Ver 2 90 Integrated Debugger ID78KOR QB Ver 3 20 Integrated Debugger QB Programmer Programming GUI Operation MINICUBE2 Diagnostic Tool MINICUBE OCD Checker Caution The related documents listed above are subject to change without notice Be sure to use the latest version of each document for designing etc Documents Related to Development Tools Documents except User s Manuals Document Name Document Number QB MINI2 Operating Precautions ZUD CD 07 1212 E Caution The related documents listed above are subject to change without notice Be sure to use the latest version of each document for designing etc IECUBE is a registered trademark of Renesas Electronics Corporation in Japan and Germany Windows is either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries PC AT is a trademark of International Business Machines Corporation CONTENTS CHAPTER T GENE PA iccisiccecasecseecaves vecace vee cs nseescacestcascsciceascencseitcecs tess av cadzanseacuacassesccees eesincetsaieesseusccesieesst 8 ti Features crn E a a a cee nueeweesdueneecvuensiaets 8 1 2 Notes Before Using MINICUBE2 sssini aaa aaa 9 t3 SUPDOTtEd DEVICES inini a aa e a a a a 9 14 Hardware SPECIICAllONS asb aae aa aaa Aaaa aa 10 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE
51. ENESAS Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 3 16 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection The power is always supplied after MINICUBE2 is connected to the host machine with the USB cable Caution Do not change the switch setting while the USB cable is connected Figure 3 16 Connecting MINICUBE2 to Host Machine MINICUBE2 USB cable Host machine Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after power application QB Programmer startup Start the QB Programmer from the Start menu of Windows The mode LED glows green after QB Programmer Startup A series of basic operations after this step is described in the following section For detailed usage of the QB Programmer refer to the QB Programmer Programming GUI Operation User s Manual Page 41 of 178 QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 3 4 Usage examples This section describes a series of basic operations using the QB Programmer using the wPD70F3732 as an example The operations from execution of the Autoprocedure EPV command to programming for the target device are described F
52. EQUIVALENT CIRCUIT APPENDIX A EQUIVALENT CIRCUIT The equivalent circuit in MINICUBE2 which is related to the communication interface between MINICUBE2 and the target system is shown below Although an example of the target system circuit connections is presented in this document refer to it when determining the parameters during substrate designing Figure A 1 MINICUBE2 Equivalent Circuit MINICUBEZ2 interior Target system side target connector pin number TC7SZ125FU 2 7 9 12 14 47Q SN74LVC1T45DCKR 100kQ SN74LVC2T45DCUR 3 8 16 SN74LVC2T45DCUR 100kQ Remark With 78KOS and 78KOR microcontrollers pins 3 and 5 are shorted out During on chip debugging of 78KO microcontrollers the following routing is performed when connecting the 78K0 OCD board e Pins 3 and 5 are shorted out and assigned to the target system side as DATA pins pins 13 e Pins 12 and 14 are shorted out and assigned to the target system side as FLMD pins lt R gt R20UT0049EJ0600 Rev 6 00 Page 171 of 178 Mar 31 2011 RENESAS REVISION HISTORY Revisions up to the previous edition are shown below The Applied to column indicates the chapter in each edition to which the revision was applied 1 4 edition 5th edition Change of Table 3 2 Pin Functions Addition of Caution in Figure 3 2 Recommended Circuit Connection When UART Is Used for Communication Interface Addition of Caution in Figure 3 3 Re
53. G2 uwPD70F3733 V850ES IE2 2 Available with restrictions For details refer to 3 2 6 Cautions on debugging R20UT0049EJ0600 Rev 6 00 Page 25 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 2 2 System configuration Figure 3 9 illustrates the system configuration for on chip debugging lt 1 gt lt 2 gt lt 3 gt lt 4 gt lt 5 gt lt 6 gt R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Figure 3 9 System Configuration for On Chip Debugging an lt 3 gt NEG ELEGTRONIGS lt 2 gt Target system Host machine Products with USB ports Software Includes the debugger USB driver device files and so on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html USB cable accessory MINICUBE2 this product 16 pin target cable accessory Target connector sold separately Page 26 of 178 QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 2 3 System startup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform on chip debugging For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e Debugger e USB driver e Device file may be unnecessary when using a par
54. HOW TO USE MINICUBE2 WITH 78K0S MICROCONTROLLER CHAPTER 5 HOW TO USE MINICUBE2 WITH 78KOS MICROCONTROLLER a 78KOS microcontroller To perform on chip debugging for a 78KOS microcontroller a specific program debug function must be downloaded to the device and then debug the device mounted on the target system 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 and writing the program can be performed on board with the device Read the following chapters if you are using MINICUBE2 for the first time with a 78KOS microcontroller as the target device e 5 1 Target System Design For communication between MINICUBE2 and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors e 5 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with MINICUBE2 e 5 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with MINICUBE2 R20UT0049EJ0600 Rev 6 00 Page 103 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 1 Target System Design This section describes the target system circuit design required for on chip
55. KO OCD 78K0 OCD board is not required for programming Board GND RESET_OUT 2 S soo feu e C C aru eek BOOODOOW 94H OOOO Pin assignment of target connector to be mounted on target system R F U Note Signal names in MINICUBE2 Table 4 2 Pin Functions FLMDO OUT Pin used to set the target device to debug mode or programming mode This pin is used by only the devices that have OCDxA and OCDXB pins FLMD1 Pin used to set programming mode RD INS Pin used to receive command data from the target device wo or Pin used to transmit command data to the target device R F U This pin is reserved For the connection of the reserved pins see each circuit related to the pins ine e This pin is not used so leave it open Notes 1 As seen from MINICUBE2 2 Not used in some devices R20UT0049EJ0600 Rev 6 00 Page 52 of 178 Mar 31 2011 2CENESAS g lt R gt QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER Table 4 3 lists the pin assignment when a 10 pin target cable is used The 10 pin target cable uses the OCDxA and OCDxB pins and is dedicated to debugging Use this cable if the target system is designed for MINICUBE QB 78KOMINI or in order to limit the usage of the connector mounted on the target system only for debugging Table 4 3 Pin Assignment When Using 10 Pin Target Cable TOP view ve Note Signal names in MINICUBE2 OOOO OJOIOJOJ O
56. Linker Options dialog box of the project manager Select the On Chip Debug check box as shown in the figure below If the pseudo RRM function is not used set the size of the debug monitor area in actuality 257 bytes from Ox8F to Ox18F are lt R gt secured For the required size of the debug monitor area see the document QB MIN2 Operating Precautions The area to allocate differs depending on the target device If the pseudo RRM function is used refer to f Figure 4 33 Linker Option Setting Debug Monitor Area Linker Options Output Output Library Others Load Module File o Output File Hame rnc Irn Browse i Output Symbol Information g Create Error List File e Pe sems W On Chip Debugl go W SIZE 256 bytes W Security D gi ID FFFFFFFFFFFFFFFFFFFF H Command Line Options A go256 giDFFFFFFFFFFFFFFFFFFFFh dlk dr s Cancel Apply Help R20UT0049EJ0600 Rev 6 00 Page 84 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER b Option byte area essential 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 Table 4 8 Option Byte 84H Settings and Descriptions Products that have _ The debugger cannot be started even if MINICUBE2 is connected an option byte Th
57. NESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 9 FLMDO pin output status while debugger is running In accordance with the setting in the Flash Programming area in the Configuration dialog box of the debugger the FLMDO pin output status while the debugger is running changes as follows Rewriting by flash self programming is not possible when the output status is low level When Permit is selected High level low level for about 100 ws after reset release When Not Permit is selected Low level 10 Operation at voltage with which flash memory cannot be written If any of the following debugger operations lt 1 gt to lt 7 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 Not Permit in the Flash Programming area in the ID78KOR QB Configuration dialog box To prevent the frequency from being switched automatically select User in the Monitor Clock area in the Flash Programmin
58. NTROLLER 2 Selection of program file Select the program file following the steps lt 1 gt to lt 3 gt described below lt 1 gt Click the File menu on the menu bar and then click Load lt 2 gt The program file select dialog box appears Figure 5 25 Program File Select Dialog Box File name rec 3 hex Files of type S tec Hex files rec 3 hex Cancel lt 3 gt Select the program file for the target device and then click the button Figure 5 26 Completion of Program File Selection ig OB Programmer File Device Help Prada bOB Frogrammer startup Programmer gt Command standby QB Programmer 1 00 2 Firmware W200 gt Device Setup Parameter File Read PASS Device Mame k gt Open Load File Firmware Success read HE file gt Parameter file Name OF 9254 orm Version 41 02 Load file Name SA amp MPLE HEX Date 2006 02 24 21 13 08 Chkeum EAsEh Area gt OOO000h 007FFFA Connection to device Fort UART ch Pulse Speed 115200bp Range Chip Freg 8 00MHz Multiply 1 00 R20UT0049EJ0600 Rev 6 00 Page 133 of 178 Mar 31 2011 RENESAS lt R gt QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 Execution of Autoprocedure EPV command Click the Device menu on the menu bar and then click Autoprocedure EPV The Blank Check Erase if the flash memory in the target device is not blank
59. O OCD board at shipment If either of the following conditions applies the factory setting must be changed Refer to 4 2 5 Clock setting and set the clock e The target device does not operate with a 20 MHz clock or the target voltage that does not operate with 20 MHz clock is used e A clock frequency other than 20 MHz is needed as the high speed system clock R20UT0049EJ0600 Rev 6 00 6 Page 75 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 4 25 Select a 10 or 16 pin target cable according to the target system circuit refer to Remark below Perform connection before the power to the target system is turned on Figure 4 25 Connecting MINICUBE2 to Target System RENESAS lt gt 10 16 pin target cable 78K0 OCD MINICUBE2 g board Target system lt R gt Caution On chip debugging using TOOLCx and TOOLDx can be performed without using the 78K0 OCD board When TOOLCO and TOOLDO are used a 4 8 or 16 MHz clock signal generated by MINICUBE2 can be used for the clock signal of the microcontroller Remark Connect the 78KO OCD board and the 10 16 pin target cable as shown below Do not connect both the 10 pin target cable and 16 pin target cable With 10 pin cable Connect CN2 on the 78KO OCD board to the 10 pin target cable Figure 4 26 With 16 pin cable Connect CN3 on th
60. OIN o JO A WO N N gt O I Reset connector RESET signal Notes 1 The RESETpin is used to download the monitor program at debugger startup or to implement forced reset Therefore a pin that alternately functions as the RESETpin cannot be used For reset pin connection refer to 5 1 3 Connection of reset pin 2 This is the pin connection when the X1 and X2 pins are not used in the target system When using the X1 and X2 pins refer to 5 1 5 Connection of X1 and X2 pins The X2 pin is gently pulled down in the device during the reset period With MINICUBE2 it is pulled up at 1 5 kQ so use a resistance of about 100 kQ when pulling it down on the substrate 3 No problem will occur if the dashed line portions are connected 4 This pin is connected to enhance the accuracy of time measurement between run and break during debugging Debugging is possible even if this pin is left open but measurement error occurs in several ms units 5 The INTP pin is used for communication between MINICUBE2 and the target device during debugging When debugging is performed with MINICUBE2 therefore the INTP pin and its alternate function pin cannot be used For INTP pin connection refer to 5 1 4 Connection of INTP pin For details on the INTP pin to be used refer to the document indicated in 1 3 Supported Devices 6 This is for pin processing when not used as a device To change this value to another resistance value see APPENDIX A EQUIVALEN
61. OOLCO and TOOLDO as communication pins for debugging remove elements such as resonator capacitance and feedback resistors so that the signals do not degrade due to capacitive load Figure 4 22 Reference Diagram of Target System Target device X1 X2 Make the pattern where X1 and X2 are next to each other as short as possible or make the space wider Connect to the connector by using tin plating when debugging Shield both sides of the line to reduce noise To debug connector GND pattern R20UT0049EJ0600 Rev 6 00 Page 71 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 1 5 Mounting connector onto target system The connector must be mounted on the target system for connecting MINICUBE2 with the target system A 2 54 mm pitch 10 or 16 pin general purpose connector can be used The following products are recommended e HIF3FC 10PA 2 54DS 10 pin right angle type made by Hirose Electric Co Ltd e HIF3FC 10PA 2 54DSA 10 pin straight type made by Hirose Electric Co Ltd e HIF3FC 16PA 2 54DS 16 pin right angle type made by Hirose Electric Co Ltd e HIF3FC 16PA 2 54DSA 16 pin straight type made by Hirose Electric Co Ltd e 7616 5002PL 16 pin right angle type made by Sumitomo 3M Ltd e 7616 6002PL 16 pin straight type made by Sumitomo 3M Ltd Compact connectors and loose wire cables are also available as options For more inform
62. Others Load Module File o Output File Hame KOR_TEST Browse iM Output Symbol Information a Create Error List File e a emes On Chip Debug Option Bytes go Security ID gi Control Yalue H Start Address 3FC00 H Size 1 D24 bytes W Allow E4Kbptes Boundary ccezal Command Line Options o go 3FC00h 1 024 pa map Cancel Apply Help R20UT0049EJ0600 Rev 6 00 ae Page 150 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER b On chip debug option byte area 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 6 6 On Chip Debug Option Byte Setting and Operation Debugging is disabled even if an on chip debug This setting is available only emulator such as MINICUBE2 is connected for flash programming and self programming 0x85 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 setingpronbtes O OO OOOO O S S Caution Values can be set only to bits 7 and 0 OCDENSET and OCDERSD Be sure to write 000010B to bits 6 to 1 Remark Values set to bits 3 to 1 are changed during on chip debugging so val
63. PU clock For such devices an internal clock is switched to an external clock during UART communication The PLL and frequency division are the same as during operation of a program created by the user Caution With MINICUBE2 an internal clock is not supported during UART communication The internal low speed clock when the clock has been stopped is also not supported during UART communication Both clocks can be used in CSI lt 3 gt Changing settings to enable serial communication according to debugger communication pin settings For example in the case of UART the settings of UART control the data format and the baud rate are changed and the alternate function ports are changed to control mode Also masking of UART receive interrupts is released Caution When the values of the registers related to the communication pins are changed from those set by the monitoring program the debugger may hang up because a communication failure will occur In this case use the debugger to perform a CPU reset and restore the CPU R20UT0049EJ0600 Rev 6 00 Page 38 of 178 Mar 31 2011 2CENESAS g lt R gt lt R gt QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a V850 microcontroller using MINICUBE2 3 3 1 Specifications of programming function Table 3 6 Specifications
64. Pin assignment of target connector to be mounted on target system Table 4 4 Pin Functions DATA IN OUT Pin used to input output for data communication during debugging FLMDO Pin used to set the target device to debug mode or programming mode R F U This pin is reserved For the connection of the reserved pins see each circuit related to the pins E e o Note As seen from MINICUBE2 R20UT0049EJ0600 Rev 6 00 6 Page 53 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 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 8 are the major purpose of use Confirm the purpose refer to Table 4 5 and see the relevant circuit connection example for specifications Figure 4 3 Flowchart for Selecting the Circuit also shows a 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 1 Used to perform on chip debugging and flash programming via one 16 pin connector 2 Used to perform on chip debugging via a 10 pin connector This type of circuit connection can be used with on chip debugging emulator QB 78KOMINI 3 Used to perform flash programming Table 4 5 Corresponding
65. RA78KOR or compiler CC78KOR is used the items can be set by using linker options Refer to the descriptions on the following pages and set these items When C SPY manufactured by IAR Systems is used read also the following material IAR C SPY Hardware Debugger Systems User Guide issued by IAR Systems Securement of memory space The shaded portions in Figure 6 11 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 Figure 6 11 Memory Spaces Where Debug Monitor Programs Are Allocated Internal ROM space Internal RAM space Internal ROM end address Internal RAM end address 1024 bytes or 88 bytes a Debug monitor area 6 bytes d Stack area for debugging D8H 10 bytes dd a Debug monitor area CEH CDH 10 bytes c Security ID area C4H C3H b On chip debug option byte area 03H 02H a Debug monitor area Area used for on chip debugging Note 1 When the pseudo RRM function is not used during 2 wire mode it will be 88 bytes 2 In debugging reset vector is rewritten to address allocated to a monitor program e Setting of security ID and on chip debug option byte The security ID or on chip debug option byte must be embedded in the area filled with yellow OxC3 and 0xC4 to OxCD in Figure 6 11 to prevent the
66. Range Chip Freg 5 00MHz Multiply 4 00 R20UT0049EJ0600 Rev 6 00 Page 46 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 Execution of Autoprocedure EPV command Click the Device menu on the menu bar and then click Autoprocedure EPV The Blank Check Erase if the flash memory in the target device is not blank Program Verify are executed for the target device sequentially The mode LED on MINICUBE2 flashes yellow during execution When the command execution is completed normally the mode LED glows green and the following window appears Figure 3 25 Completion of Autoprocedure EPV Command Execution ig OB Programmer File Device Help pall 40 oles BOs Set Security Flags AutoProcedure E py FASS gt R20UT0049EJ0600 Rev 6 00 Mar 31 2011 CENESAS Programmer QB Programmer 1 00 Firmware Mame Firmware Mame Version Name Date Chk surm Area Fort Pulse Speed Range Freq Multiply 1 00 Device gt DPD FORA as 2 00 Farameter file POF S732 prm 1 00 Load file SAMPLE HEA 2006 0224 21 13 08 E2sEh OOOQOO0h O07FFFR Connection to device SIO HAS 11 MHz Chip OOMH z 4 00 Page 47 of 178 QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 3 5 System shutdown procedure Terminate flash programming and shutdow
67. Securement of area for debug monitor program The shaded portions in Figure 3 12 are the areas where the debug monitor program is allocated The monitor program performs 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 Oxff Secures interrupt vector for debugging section DBGO space 4 Oxff Secures interrupt vector for serial communication for receive Secures vector for receive error interrupt and receive status interrupt if any Change the section name according to serial communication mode used section INTCSIOO space 4 Oxff Secures 16 byte space for monitor ROM section section MonitorRAM bss comm monitorramsym 16 4 defines monitorramsym symbol Note The downloading speed ca
68. T CIRCUIT R20UT0049EJ0600 Rev 6 00 6 Page 106 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 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 MINICUBE2 masked and then output to the target device Therefore the reset signal connection varies depending on whether MINICUBE2 is connected For flash programming the circuit must be designed so that the reset signals of the target system and MINICUBE2 do not conflict Select one of the following methods and connect the reset signal in the circuit The details of each method are described on the following pages 1 Automatically switching the reset signal via series resistor recommended described in recommended circuit connection in the previous section 2 Manually switching the reset signal with jumper 3 Resetting the target device by power on clear POC only R20UT0049EJ0600 Rev 6 00 ae Page 107 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 1 Automatically switching the reset signal via series resistor Figure 5 3 illustrates the reset pin connection described in 5 1 2 Circuit connection example This connection is designed assuming that the rese
69. UBE2 to the target system the host machine is required to have 500 mA current supply capability Page 10 of 178 QB MINI2 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE This chapter describes the part names and functions of MINICUBE2 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 MINICUBE2 and the self check board that will facilitate reading of subsequent chapters While reading this chapter also check if the hardware has a defect 2 1 Names of Supplied Hardware Figure 2 1 shows the names of hardware supplied with MINICUBE2 Figure 2 1 Names of Supplied Hardware ee amp a MINICUBE2 USB cable 10 pin target cable 78K0 OCD board A 20 MHz oscillator mounted R20UT0049EJ0600 Rev 6 00 Page 11 of 178 Mar 31 2011 m RENESAS QB MINI2 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE 2 2 Part Names and Functions of MINICUBE2 Figure 2 2 shows the part names of the MINICUBE2 main unit For their functions refer to 1 to 5 below Figure 2 2 Part Names of MINICUBE2 USB interface Target interface connector connector Mode LED AOIIOOIIONIOODIOOIIODIIOOIIOOIUODIOOIIOOIUOOIONOIIODIONOIOONIOONIO0IIONIOOOII0IIOON0ONIN M 7 m Mode select switch MI M2 3 T 5 Power selec
70. When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device R20UT0049EJ0600 Rev 6 00 Page 63 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 4 12 When Only Debugging Is Performed with OCD1A OCD1B communication Vpop Vpop Vpop Vop 3k to 1kQ Reset connector 1 okonN te 5 RESET signal Target connector RESET INNO 10kQ Target device RESET OUT sine ae OcD1B a OCD IAN 1k to 1 OkQ ete 5 Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin 2 The name of the pin shared with OCD1A OCD1B might be invalid or might not exist depending on the device For details see the users manual for the target device During on chip debugging the settings specified by the user program are ignored because these pins are used as pins dedicated to on chip debugging However if the pins are specified as input pins the pins must be processed because they are left open when MINICUBE2 is not connected 3 The clock signal generated by the
71. When using C SPY manufactured by IAR Systems IAR C SPY Hardware Debugger Systems User Guide issued by IAR Systems Securement of memory space The shaded portions in Figure 3 12 are the areas reserved for placing the debug monitor program so user programs and data cannot be allocated in these spaces These spaces must be secured so as not to be used by the user program Figure 3 12 Memory Spaces Where Debug Monitor Programs Are Allocated Internal RAM space Internal ROM end address JO tode bites Internal RAM end address Internal ROM space Note CSI or UART eceive interrupt vector 10 bytes 0x70 security ID area 4 bytes C 0x60 interrupt vector for debugging 4 bytes 0x0 reset vector E Debugging area Note The vectors for the receive error interrupt or receive status interrupt if any must be secured e Securement of serial interface for communication The register settings concerning UART or CSI H S used for communication between MINICUBE2 and the target device performed by the debug monitor program must not be changed e Security ID setting The ID code must be embedded in the area filled with yellow 0x70 to 0x79 in Figure 3 12 to prevent the memory from being read by an unauthorized person R20UT0049EJ0600 Rev 6 00 ae Page 30 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER a Reset vector A reset vector includes the jump instruction for t
72. X A EQUIVALENT CIRCUIT CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 2 4 Edition Description Applied to 5th Addition of Caution CHAPTER 4 HOW TO edition Change of 4 1 Target System Design USE MINICUBE2 WITH 78KO Addition of Note in Figure 4 1 Outline of Communication Interface for On Chip MICROCONTROLLER Debugging Change of Note in Figure 4 2 Outline of Communication Interface for Flash Programming Change of Table 4 1 Pin Assignment When Using 16 Pin Target Cable Change of Table 4 2 Pin Functions Change of Table 4 3 Pin Assignment When Using 10 Pin Target Cable Change of Table 4 4 Pin Functions Change of Table 4 5 Corresponding Circuit Connection Diagrams Addition of Figure 4 3 Flow Chart for Selecting the Circuit Change of Figure 4 12 When Only Debugging Is Performed with OCD1A OCD1B communication to Figure 4 4 When Both Debugging and Programming Are Performed Not communicating by using the OCDOA and OCDOB pins or not using the X1 oscillator Addition of Caution in 4 1 3 Connection of reset pin Addition of Figure 4 14 Cautions for using the RESET OUT pin Change of 4 1 3 2 Automatically switching the reset signal via selector logic Change of Description in 4 1 3 4 Resetting the target device by power on clear POC only Change of Description in 4 1 4 Cautions on target system design Change of Table 4 6 Debug Functions Addition of Note in Figure 4 24 System Configuration for On Chip D
73. a 4 8 or 16 MHz clock signal generated in MINICUBE2 or the clock signal generated by the internal high speed oscillator of the device can be used for the clock signal of the target device during on chip debugging Only the internal high speed oscillator of the device can be used during flash programming 3 During on chip debugging the settings specified by the user program are ignored because these pins are used as pins dedicated to on chip debugging However if the pins are specified as input pins the pins must be processed because they are left open when MINICUBE2 is not connected 4 This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected Output setting or an oscillator circuit is not used When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device 5 This connection is designed assuming that the Reset connector is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin R20UT0049EJ0600 Rev 6 00 Page 60 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER Zhe Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc
74. a ports R20UT0049EJ0600 Rev 6 00 ae Page 68 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 3 Manually switching the reset signal with jumper Figure 4 19 illustrates the circuit connection for the case where the reset signal is switched using the jumper with or without MINICUBE2 connected This connection is simple but the jumper must be set manually Figure 4 19 Circuit Connection for Switching Reset Signal with Jumper Target connector Target device RESET OUT Reset connector RESET_IN RESET signal Jumper setting When MINICUBE2 is connected 1 2 shorted When MINICUBE2 is not connected 2 3 shorted When a 10 pin connector is used pins 1 and 2 of the target connector can also be used as the jumper as shown in Figure 4 20 Figure 4 20 Jumper Connection When 10 Pin Connector Is Used Target connector Target device RESET_IN Reset connector RESET signal RESET OUT R20UT0049EJ0600 Rev 6 00 Page 69 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 Resetting the target device by power on clear POC only Figure 4 21 illustrates the circuit connection for the case where the target device is only reset via POC without using the reset pin RESET_OUT becomes active when power is applied to MINICUBE2 Even if power supply to the target system is turned off during debugging pseudo POC function emulatio
75. again R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Page 153 of 178 QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER d Securement 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 6 15 illustrates the case where the stack area is increased when the internal high speed RAM starts from 6 bytes Figure 6 15 Variation of Address of Stack Area for Debugging lt 1 gt lt 2 gt OX FF EE i EE Stack area YY 77 OxFFEDF a S 7 7 6 bytes OxFCF06 0xFCF00 Available space In internal high speed RAM 0xFCF00 0xFCF00 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 R20UT0049EJ0600 Rev 6 00 Page 154 of 178 Mar 31 2011 RENESAS lt R gt QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 2 6 Cautions on debugging 1 2 3 4 5 6 7 8 R20UT0049EJ0600 Rev 6 00 Mar 31 2011 RENESAS This section describes cautions on performing on c
76. an be performed even if the 78KO OCD board is connected R20UTO049EJ0600 Rev 6 00 Page 93 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 3 3 System startup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform flash programming For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e QB Programmer e USB driver e Parameter file 2 Switch setting Set the mode select switch to M2 Set the power select switch by referring to the following table Caution Do not change the switch setting while the USB cable is connected Table 4 12 Setting of Power Select Switch ia 3 V is supplied from MINICUBE2 to the target system ai 5 V is supplied from MINICUBE2 to the target system Power supply of the target system is used MINICUBE2 detects the power for the target system The detected power is also used as the power supply for the communication interface Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 4 38 before the power to the target syste
77. ardware Debugger Systems User Guide issued by IAR Systems e Securement of memory space The shaded portions in Figure 5 16 are the areas reserved for placing the debug monitor program so user programs cannot be allocated in these spaces Figure 5 16 Memory Spaces Where Debug Monitor Programs Are Allocated Internal RAM space Internal ROM space Internal ROM end address Internal RAM end address 304 bytes 5 bytes Stack area for debugging 2 bytes 0x7E for software break 2 bytes Ox0A or 0x18 INTP interrupt vector E Debug monitor program area e Securement of serial interface for communication The register settings concerning the INTP pin used for communication between MINICUBE2 and the target device performed by the debug monitor program must not be changed Page 119 of 178 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 1 Securement of area for debug monitor program In the internal ROM space of the target device the shaded portions in Figure 5 16 are the areas where the debug monitor program is allocated The monitor program performs 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
78. are in preparing the information included in this document but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein 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
79. ared by the partner company Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 7 SELF TESTING R20UT0049EJ0600 Rev 6 00 Page 28 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 2 4 System shutdown procedure Terminate debugging and shutdown the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Debugger termination Terminate the debugger 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to Me or 5 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system R20UT0049EJ0600 Rev 6 00 Page 29 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 2 5 Securing of user resources and setting of security ID The user must prepare the following to perform communication between MINICUBE2 and the target device and implement each debug function Refer to the descriptions on the following pages and set these items in the user program or using the compiler options When a partner tool is used read also the following material O When using MULTI manufactured by Green Hills Software QB MINI2 Setup Manual User s Manual Partner Tool U19158E O
80. aseecscseeesaseeeseaseeessusessssaseesssaes 166 6 3 6 Ca tions on flash programming asses E TE E E 166 CHAPTER 7 SELF TESTING isnkenutimmianna a a a ecto aeaeenncies Gee 167 TA System CONQUAT ON asusissneisani casina aiai aaaea iaa aa aa aaa ai aaRS 167 T2 DSEMATESUMG PROCCQUNG ssia E 168 CHAPTER 8 FIRMWARE UPDA UE sussunnonnnnnnannsnnnnnnnnnnnnnnnnnannnnnnnnnnnnnnannnnnnnnnnnnnnnnnnnnannannnnannnnnnnnnannannnn 169 6 1 System COMMGUPAUON sisisi aaa aaia aaa iaaa aaaea ahaaa iaaa aa 169 8 2 Firmware Update Proce Que sarios a a ES 170 APPENDIX A EQUIVALENT CIRCUIT trenne aoa aa aae a 171 QB MINI2 CHAPTER 1 GENERAL CHAPTER 1 GENERAL MINICUBE2 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 1 1 Features e On chip debugging Can debug with the target microcontroller connected to the target system e Flash memory 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 or 1 1 Since MINICUBE2 operates on power supplied via USB an external power supply is unnecessary e Variety of supported devices and expandability MINICUBE2 supports a wide variety of Renesas Electronics 8 to 32 bit on chip flash memory microcontrollers More devices can be supported by upgrading firmware embedded in MINICUBE2 e Self testing
81. ation on these products access the MINICUBE2 information site URL http www2 renesas com micro en development asia minicube2 minicube2 html Figure 4 23 2 54 mm Pitch 10 16 Pin General Purpose Connector Pin Layout TOP VIEW Pin assignment when MINICUBE2 is connected in this direction Target system 10 pin v OIOIDIOIOI OJOO YVOOOW 194 2OOOW MOOWO Pin assignment of target connector to be mounted on target system R20UT0049EJ0600 Rev 6 00 ae Page 72 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO 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 MINICUBE2 4 2 1 Debug functions Table 4 6 lists the debug functions when a 78KO microcontroller is the target device and the ID78KO QB is used If a debugger other than the ID78KO QB made by partner manufacturer is used the available functions may differ so check the specifications of the debugger used Table 4 6 Debug Functions Go amp Go Start from Here Come Here Restart step execution Hardware break Break before execution 1 point unavailable when using software break Access break 1 point Software break 2 000 points Forced break Available Pseudo real time RAM monitoring Available DMM writing to memory during RUN Available Time measurement Resolution 10
82. ations without using breakpoints when software breakpoints are specified It takes a while from the completion of flash memory programming until control is passed to the GUI Software break 1 During program running do not rewrite the data at the address 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 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 Page 89 of 178 QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 5 6 7 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Emulation in self programming mode For self programming the mode is switched from normal mode to self programming mode MOV PFCMD 0A5H MOV FLPMC 1H lt 1 MOV FLPMC 0FEH MOV FLPMC 1H CEE From this position CALL 08100H lt 2 T MOV PFCMD 0A5H MOV FLPMC 0H Mode A1 MOV FLPMC 0FFH MOV FLPMC 0H lt 3 4 E To this position The section between 2 and 3 is in self programming mode A1 Step execution or debug operations such as stopping program execution cannot be performed in this section In addition do not set a software break in the section between 1 and 3 otherwise the execution continues without a break but emulation is not performed
83. between MINICUBE2 and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors e 3 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with MINICUBE2 e 3 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with MINICUBE2 R20UT0049EJ0600 Rev 6 00 ae Page 15 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 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 MINICUBE2 communication interface As shown on the left side of the figure MINICUBE2 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 and CSI H S are supported as communication modes Note that CSI H S is not available if there is no H S pin connection The H S pin is the name of the pin for the programmer and this pin might not be described as an alternate function pin in the user s manual of the device In such a case connect the relevant port that is assigned to the H S pin In the V850ES Ju for example the PCMO pin is assig
84. board during on chip debugging and flash programming To prevent an oscillation circuit from not oscillating due to wiring capacitance when the target device operates when MINICUBE2 is not connected also consider countermeasures such as disconnecting the oscillation circuit from the target connectors by setting the jumpers A program that was downloaded using the debugger does not operate when MINICUBE2 is not connected Caution The red paths in the figure TOOLDO and TOOLCO must be designed so that the device pins are less than 30 mm from the MINICUBE2 connectors or the paths must be shielded by connecting them to GND R20UT0049EJ0600 Rev 6 00 ae Page 61 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 4 10 When Both Debugging and Programming Are Performed with TOOLCO TOOLDO communication Target connector 3kto 10kQ Target device GND RESET OUT RESET TOOLD1 t DD R F U R F U R F U o j N jo io lt Cik 2 TOO LC1 Note 3 10 R F U 1 0 kQNote 5 R F U Vpop FLMD1 vote 1 kQhote DATA FLMDO Reset connector 5 RESET_INN RESET R F U Notes 1 If there are capacitance elements such as capacitors on chip debugging might not ope
85. bsite ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 16 pin target cable accessory lt 6 gt Target connector sold separately R20UT0049EJ0600 Rev 6 00 6 Page 157 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 3 3 System startup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform flash programming For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e QB Programmer e USB driver e Parameter file 2 Switch setting Set the mode select switch to M1 Set the power select switch by referring to the following table Caution Donot change the switch setting while the USB cable is connected Table 6 8 Setting of Power Select Switch ie 4 3 V is supplied from MINICUBE2 to the target lai C 5 V is supplied from MINICUBE2 to the target system Power supply of the target system is used MINICUBE2 detects the power for the target system The detected power is also used as the power supply for the communication interface Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is conne
86. cally be downloaded In this case terminate PM and then start the debugger Remark The next time the debugger is started perform the procedure from step 7 However if the program is written via the QB Programmer and the monitor program is erased the procedure must be performed from step 1 again R20UT0049EJ0600 Rev 6 00 Page 123 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 2 7 Cautions on debugging 1 2 3 4 5 6 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS This section describes cautions on performing on chip debugging for a 78KOS microcontroller Be sure to read the following to use MINICUBE2 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 Cases where debugger operation speed is degraded The debugger operation speed may be degraded when too many contents of the memory or registers are displayed in a debugger window particularly when using a host machine with a USB 1 1 interface The debugger response is also slowed while the flash memory is being overwritten This phenomenon may be improved to some extent by raising the CPU operation clock frequency by setting the PCC or PPCC register Reset processing If the RESET pin of th
87. cally switching the reset signal via resistor Figure 4 15 illustrates the reset pin connection described in 4 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 MINICUBE2 is inverted so observe the conditions described below in Remark Figure 4 15 Circuit Connection with Reset Circuit That Contains Buffer MINICUBE2 Target device Reset connector V RESET_OUT n2 Buffer RESET_IN lt 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 16 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 4 16 Circuit Connection with Reset Circuit That Contains No Buffers MINICUBE2 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
88. cation circuits must be 16 pin connectorte mounted on the target system Target device C gt E a Communication for 78K0 OCD debugging board MINICUBE2 Host machine Target system Note To reduce the footprint of the target system SICA can be used to reduce the size of connectors When replacing QB 78KOMINI obsolete product with MINICUBE2 a 10 pin connector dedicated to debugging can be used SICA is made by Tokyo Eletech Corporation Figure 4 2 Outline of Communication Interface for Flash Programming Communication circuits must be mounted on the target system 16 pin connector Target device Communication for communication programming MINICUBE2 Host machine Target system R20UT0049EJ0600 Rev 6 00 Page 51 of 178 Mar 31 2011 2CENESAS g lt R gt lt R gt lt R gt lt R gt lt R gt lt R gt QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 1 1 Pin assignment This section describes the interface signals used between MINICUBE2 and the target system Table 4 1 lists the pin assignment when a 16 pin target cable is used Table 4 2 describes the functions of each pin The pin assignment varies depending on whether the operation is debugging or programming so design the circuit appropriately according to the circuit connection examples described on the following sections Table 4 1 Pin Assignment When Using 16 Pin Target Cable For Debugging For Programming with 78
89. ce side as those for flash programming supported by the target device 2 This pin may be used to supply an external clock during flash programming 4 8 or 16 MHz For the connection refer to the user s manual for the target device 3 The alternate function of this pin can be used because this pin changes to input unused when debugging In MINICUBE2 it is pulled down at 100 kQ 4 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 3 1 3 Connection of reset pin 5 The circuit enclosed by a dashed line is not required when only flash programming is performed 6 The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports Use the port for inputting or outputting the high level When flash self programming is not performed a pull down resistance for the FLMDO pin can be within 1 to 10 kQ 7 This is for pin processing when not used as a device To change this value to another resistance value see APPENDIX A EQUIVALENT CIRCUIT R20UT0049EJ0600 Rev 6 00 Page 20 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 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 During on chip debugging a
90. cess the MINICUBE2 information site URL http http www2 renesas com micro en development asia minicube2 minicube2 html Figure 3 8 2 54 mm Pitch 16 Pin General Purpose Connector Pin Layout TOP VIEW Pin assignment when MINICUBE2 is connected in this direction WOOMOOOOW 9M BO OOW Pin assignment of target connector to be mounted on target system R20UT0049EJ0600 Rev 6 00 ae Page 24 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 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 MINICUBE2 3 2 1 Debug functions Table 3 4 lists the debug functions when a V850 microcontroller is the target device and the ID850QB is used Ifa debugger other than the ID850QB made by partner manufacturer is used the available functions may differ so check the specifications of the debugger used Table 3 4 Debug Functions Download Software break 2 000 points Forced break Available RAM monitoring Available DMM writing to memory during RUN Available Available reset pin only Time measurement Measurement resolution 100 us from execution start to break Max measurement time Approximately 100 hours Internal RAM 16 bytes max CSI H S selected SI SO SCK H S Notes 1 The following devices are not yet supported V850ES KE2 V850ES KF2 V850ES K
91. circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 6 2 Recommended Circuit Connection Target connector Target device 3k to 10kQ e5 Clock R F U circuit R F U R F U 1k to 10kQNote 5 R F U R F U TOOL1 Note2 R F U FLMDO RESET_IN CLK_IN Reset connector RESET signal Notes 1 With MINICUBE2 the circuit enclosed by a dashed line is not necessary because the RxD and TxD pins are internally shorted If any other flash programmer is used these pins must be shorted on the target system because these pins may not be able to be shorted in the programmer 2 This connection is required for 2 wire communication but not for 1 wire communication This pin is left open when MINICUBE2 is not connected so connect a pull up or pull down resistor to this pin before using The TOOL1 pin becomes the pin that supplies a clock from the target device to MINICUBE2 Digital noise that is synchronized with this clock may interfere with the GND power supply Take general countermeasures against noise such as inserting a dumping resistor as required Take a general lt R gt countermeasure for noise such as inserting a dumping resistor or performing shielding by connecting to GND as required 3 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 6 1 3 Connection
92. commended Circuit Connection When CSI H S Is Used for Communication Interface Change of Table 3 6 Specifications of Programming Function Change of Table 4 1 Pin Assignment When Using 16 Pin Target Cable Change of Table 4 2 Pin Functions Change of Table 4 4 Pin Functions Change of Figure 4 32 Reserved Area Used by MINICUBE2 Change of 4 2 6 a Debug monitor area this area must be secured f Pseudo real time RAM monitor RRM area Change of 4 2 7 15 Cautions when debugging with only the real device without using MINICUBE2 16 Cautions when reading the location and the reserved area where SW HW breaks are set Change of Table 5 5 Specifications of Programming Function Change of Table 6 1 Differences Between 1 Wire Mode and 2 Wire Mode Change of 6 1 2 Circuit connection example Change of 6 2 6 Cautions on debugging Change of Table 6 7 Specifications of Programming Function Change of Remark Change of Figure 3 2 Recommended Circuit Connection When UART Is Used for Communication Interface Change of Figure 3 3 Recommended Circuit Connection When CSI H S Is Used for Communication Interface C 1 Change of Table 1 2 Hardware Specifications CHAPTER 1 GENERAL CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER CHAPTER 6 HOW TO USE MINICUBE2 WITH 78KOR MICROCONTROLLER APPENDI
93. communicate with MINICUBE2 OCDOA OCD1A OCDOA Figure 4 11 OCD1A Figure 4 12 Do you want to use the X1 and X2 oscillators Do you want to use the X1 and X2 oscillators Do not use Figure 4 6 Do not use Use Figure 4 4 Figure 4 7 Use Figure 4 5 R20UT0049EJ0600 Rev 6 00 Page 55 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc lt R gt Figure 4 4 When Both Debugging and Programming Are Performed Not communicating by using the OCDOA and OCDOB pins or not using the X1 oscillator Vpop vo Target connector Target device 3 k to kQNt _ GND RESET OUT RxpNote 1 VoD Txp ote 1 R F U R F U R F U oE a i OCDOA X1 R F U 1k to Note 4 R F U aa 10 KQ R F U RESET_IN R F U Reset connector RESET Notes 1 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 2 Circuits other than the X1 oscillator can be used to generate the clock signal for the target device during on chip debugging Only a 4 8 or 16 MHz clock signal generated in MINICUBE2 can be used during flash programming
94. cted to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 6 17 before the power to the target system is turned on When the power select switch is set to T the step of 4 Connecting the USB cable can be performed before this step Figure 6 17 Connecting MINICUBE2 to Target System f eh n 16 pin target cable MINICUBE2 g Target system R20UT0049EJ0600 Rev 6 00 6 Page 158 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 4 5 6 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 6 18 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection The power is always supplied after MINICUBE2 is connected to the host machine with the USB cable Caution Do not change the switch setting while the USB cable is connected Figure 6 18 Connecting MINICUBE2 to Host Machine MINICUBE2 USB cable Host machine Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after power application QB Programmer startup Start the QB Programme
95. d option of the linker is set Cancel Apply Help R20UT0049EJ0600 Rev 6 00 ae Page 35 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 2 6 Cautions on debugging This section describes cautions on performing on chip debugging for a V850 microcontroller Be sure to read the following to use MINICUBE2 properly 1 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 2 When breaks cannot be executed Forced breaks cannot be executed if one of the following conditions is satisfied e Interrupts are disabled DI e Interrupts issued for the serial interface which is used for communication between MINICUBE2 and the target device are masked e Standby mode is entered while standby release by a maskable interrupt is prohibited e Mode for communication between MINICUBE2 and the target device is UART and the main clock has been stopped 3 When pseudo real time RAM monitor RRM function and DMM function do not operate The pseudo RRM function and DMM function do not operate if one of the following conditions is satisfied e Interrupts are disabled DI e Interrupts issued for the serial interface which is
96. dition of Checksum command Change of Note 2 in Figure 6 2 Recommended Circuit Connection Change of Table 6 4 Debug Functions Addition of Description of lt 3 gt in 6 2 6 12 Pseudo real time monitor function Change of Figure 6 2 in 6 1 2 Circuit connection example CHAPTER 6 HOW TO edition USE MINICUBE2 WITH 78KOR MICROCONTROLLER Change of Figure A 1 in APPENDIX A EQUIVALENT CIRCUIT APPENDIX A EQUIVALENT CIRCUIT 3rd Change of Figures 3 2 and 3 3 in 3 1 2 Circuit connection example CHAPTER 3 HOW TO edition USE MINICUBE2 WITH V850 MICROCONTROLLER Change of Figure 5 2 in 5 1 2 Circuit connection example CHAPTER 5 HOW TO USE MINICUBE2 WITH 78KOS MICROCONTROLLER Change of Figure 6 2 in 6 1 2 Circuit connection example CHAPTER 6 HOW TO USE MINICUBE2 WITH 78KOR MICROCONTROLLER 2nd Change of Related Documents in INTRODUCTION INTRODUCTION GOOR 1 3 Supported Devices CHAPTER 1 e Deletion of Remark in MINICUBE2 information site OVERVIEW USE MINICUBE2 WITH e Addition of Remark in Document Note 3 of Figures 3 2 and 3 3 in 3 1 2 Circuit connection example corrected Note 7 CHAPTER 3 HOW TO added n I I n a a V850 MICROCONTROLLER 3 2 5 Securing of user resources and setting of security ID e Description of material when partner tool is used added e Addition of Note in Figure 3 12 e Change of Assemble source in b Securement of area for debug monitor program e Change of Note in c Securement of commu
97. e PRM File Read button to open the Parameter File Select dialog box Select the parameter file for the target device and then click the button Figure 3 18 Parameter File Select Dialog Box File name FOF S732 Files of type PRM Files PRM Cancel R20UT0049EJ0600 Rev 6 00 Page 43 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt 4 gt Set the items in the Target Device Connection Operation Mode and Supply Oscillator areas in accordance with your programming environment The following figure shows an example Figure 3 19 Standard Tab of Device Setup Dialog Box After Setting Device Setup Standard Advanced Parameter File FOF 3732 prem PAM File Read Target Device Connection Supply Oscillator W On Target Fort SiO H s Frequency 5 00 MHz Speed MHz Multiply rate 4 00 Operation Mode f Chip Start f Block End lt 5 gt The wPD70F3732 can use the Get Security Settings command so click the button to return to the main window click the Device menu and then click Get Security Settings After execution of this command the security functions and boot area settings for the target device can be checked in the Security flag settings area on the Advanced tab in the Device Setup dialog box For details refer to the QB Programmer Programming GUI Operation User s Manual Figure 3 20 Advanced Tab of Device Setu
98. e in CLK1 of the 78K0 OCD board as shown in Figure 4 29 TXC 1 manufactured by Tokyo Quartz Co Ltd is recommended as an oscillator Figure 4 29 Mounting Oscillator 5V pi CLK 14 pin type Clock O 0000000 0000000 R20UT0049EJ0600 Rev 6 00 Page 80 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER d Using the oscillator circuit connected to the 78KO OCD board only when OCDOA and OCDOB or TOOLDO and TOOLCO are used Connect an oscillator or oscillation circuit to CLK1 on the 78KO OCD board Clock Board is automatically selected for Main Clock in the Configuration dialog box of the debugger The same frequency as that of the target device can be used Main Glock f Glock Board Ext C i fa i M Refer to Figure 4 30 and mount an oscillator in CLK1 of the 78K0 OCD board Figure 4 27 shows the appearance after mounting the oscillator 160 90 314 made by PRECI DIP can be used as the parts board to be mounted in the socket Figure 4 30 78K0 OCD Board Mounting Diagram and CLK1 Equivalent Circuit 1M2 CLOCK OUT Parts Mounting Diagram CLK1 Equivalent Ce sw Figure 4 31 Appearance After Mounting Oscillator R20UT0049EJ0600 Rev 6 00 Page 81 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 2 Using the internal high speed clock when
99. e 78KO OCD board to the 16 pin target cable Figure 4 27 Figure 4 26 With 10 Pin Connector Figure 4 27 With 16 Pin Connector Caution Connect the 78K0 OCD board to the target cable so that pin 1 position A on each side match R20UT0049EJ0600 Rev 6 00 Page 76 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 5 Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 4 28 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection Figure 4 28 Connecting MINICUBE2 to Host Machine MINICUBE2 USB cable Host machine 6 Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after connection after power application 7 Debugger startup Start the debugger The mode LED glows orange after debugger startup For the operation after this step refer to the user s manual for the debugger If the debugger does not start normally or the operation is unstable the possible causes may be the following e Communication error between MINICUBE2 and target system Whether communication is performed normally can be checked using the OCD Checker For details refer to t
100. e Change of 7 LVI default start function setting address C1H e Change of 10 Operation at voltage with which flash memory cannot be written e Change of 11 Debugging in 1 wire mode e Change of 12 Pseudo real time monitor function Addition of APPENDIX A EQUIVALENT CIRCUIT APPENDIX A EQUIVALENT CIRCUIT CA QB MINI2 User s Manual Publication Date Rev 6 00 Mar 31 2011 Published by Renesas Electronics Corporation CENESAS SALES OFFICES Renesas Electronics Corporation Refer to http www renesas com for the latest and detailed information Renesas Electronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 U S A Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Electronics Canada Limited 1101 Nicholson Road Newmarket Ontario LY 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Electronics Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 585 100 Fax 44 1628 585 900 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 Dusseldorf Germany Tel 49 211 65030 Fax 49 211 6503 1327 Renesas Electronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China Tel 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Unit 204 205 AZIA Center No 1233 Lujiazui Ring Rd Pudong District Shanghai 200120 China Tel 86 21 5877 1818 Fax 86 2
101. e The product may become hot depending on the status of use Be careful of low temperature burns and other dangers due to the product becoming hot e Be careful of electrical shock There is a danger of electrical shock if the product is used as described above in 1 Circumstances not covered by product guarantee e Do not use a device that was used for on chip debugging as the official product Readers Purpose Organization How to Read This Manual Conventions How to Use This Manual This manual is intended for users who wish to perform debugging using the QB MINI2 generic name MINICUBE 2 The readers of this manual are assumed to be familiar with the device functions and usage and to have knowledge of debuggers and flash programming This manual is intended to give users an understanding of the basic specifications and correct use of MINICUBE2 This manual is divided into the following sections e General e Names and functions of hardware e Self testing e Firmware update It is assumed that the readers of this manual have general knowledge in the fields of electrical engineering logic circuits and microcontrollers This manual describes the basic setup procedures To understand the basic specifications and usages of MINICUBE2 Read this manual according to the CONTENTS The mark lt R gt shows major revised points The revised points can be easily searched by copying an lt R gt in the PDF file and
102. e connector can be used The following products are recommended e HIF3FC 16PA 2 54DS right angle type made by Hirose Electric Co Ltd e HIF3FC 16PA 2 54DSA straight type made by Hirose Electric Co Ltd e 7616 5002PL right angle type made by Sumitomo 3M Ltd e 7616 6002PL straight type made by Sumitomo 3M Ltd Compact connectors and loose wire cables are also available as options For more information on these products access the MINICUBE2 information site URL http www2 renesas com micro en development asia minicube2 minicube2 html Figure 6 7 2 54 mm Pitch 16 Pin General Purpose Connector Pin Layout TOP VIEW Pin assignment when MINICUBE2 is connected in this direction WOOMOOOOW 9M BO OOW Pin assignment of target connector to be mounted on target system R20UT0049EJ0600 Rev 6 00 Page 143 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 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 MINICUBE2 6 2 1 Debug functions Table 6 4 lists the debug functions when a 78KOR microcontroller is the target device and the ID78KOR QB is used Table 6 4 Debug Functions lt R gt 1 wire mode TOOLO or 2 wire mode TOOLO TOOL1 Download Available lt R gt Pseudo real time RAM monitoring Available RRM lt R gt DMM writing t
103. e internal flash memory is not erased regardless of how many times authenticating the security ID code fails The entire internal flash memory area is erased if authenticating the security ID code fails Products that do not L o0H The entire internal flash memory area is erased if MINICUBE2 is connected have an option byte 02H The internal flash memory is not erased regardless of how many times authenticating the security ID code fails The entire internal flash memory area is erased if authenticating the security E Note 2 ID code fails Other than the above Setting prohibited Notes 1 This value is to be specified in the assembler source code of a user created program When the program is downloaded by the debugger the debugger changes the value as required 2 If the value at address 83H of the option bytes is illegal the entire internal flash memory area is erased and then the debugger starts If authenticating the security ID code fails after the debugger starts the entire internal flash memory area is specified to be erased Table 4 9 Option Byte 84H Settings and Descriptions Products that have OOH Be sure to set 0083H to OOH because it is a reserved area an option byte Products that do not Device dependent Specify a value according to the on chip debugging specifications in the device i Note 2 have an option byte users manual Notes 1 This value is to be specified in the assembler source code o
104. e is generated in this area using the linker option gi Figure 4 34 shows the Linker Options dialog box of the project manager Select the Security ID check box as shown in the figure below and set an arbitrary ID code 10 bytes Figure 4 34 Linker Option Setting Security ID Linker Options Output Output Library Others Load Module File o Output File Name ndt Imt Browse i Output Symbol Information g Create Error List File 2 Pe sins W Orn Chip Cebug go W SIZE 256 bytes W Security D gi ID FFFFFFFFFFFFFFFFFFFF H ommand Line Uptiorns i o256 giDFFFFFFFFFFFFFFFFFFFFh dlk dr s Cancel Apply Help R20UT0049EJ0600 Rev 6 00 Page 86 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER d Stack area for debugging this area must be secured This area requires 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 4 35 illustrates the case where the stack area is increased when the internal high speed RAM starts from OxFBOO Figure 4 35 Variation of Address of Stack Area for Debugging lt 1 gt lt 2 gt lt 3 gt Available space in internal high speed RAM OxFBOO OxFBO7 amp OxFBOO0 OxFBOO The size of this area also varies depending on whether software
105. e programming mode Once the debugger starts restoring the original multiply rate will not affect the debugging operation e V850ES IE2 V850ES IK1 V850E IA3 V850E IA4 V850E IF3 and V850E IG3 Note the following point when debugging the V850ES IE2 V850ES IK1 V850E IA3 or V850E IA4 as the target microcontroller lt 1 gt When the target interface is CSI set the Multiply rate in the Configuration dialog box to 8 and then start the debugger This process is required because the clock is fixed to one multiplied by 8 in the device specifications for the instance of writing the debug monitor program in the programming mode Once the debugger starts restoring the original multiply rate will not affect the debugging operation 13 Processing of monitoring program for debugging An overview of the processing of the monitoring program for debugging when MINICUBE2 has been connected and the debugger has been started including after the debugger has been used to perform a CPU reset and related cautions are described below lt 1 gt Stopping watchdog timer that starts operating immediately after reset Caution When an operation has been started in a user program for a watchdog timer whose operation is not started immediately after reset the debugger may hang up In this case use the debugger to perform a CPU reset and restore the CPU lt 2 gt Clock operations The V850ES Fx3 V850ES Fx3 L and V850ES Hx3 can use an internal oscillator as the C
106. e target device alternately functions as a port enable the RESET pin by the user program settings such as option byte setting When breaks cannot be executed Forced breaks cannot be executed if one of the following conditions is satisfied e Interrupts are disabled DI e Interrupts issued for the INTP pin which is used for communication between MINICUBE2 and the target device are masked e The alternate function port corresponding to the INTP pin is not set to the input mode e The external interrupt edge corresponding to the INTP pin is not set to the rising edge e Standby mode is entered while standby release by a maskable interrupt is prohibited Flash self programming lf a space where the debug monitor program is allocated is rewritten by flash self programming the debugger can no longer operate normally 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 Page 124 of 178 QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 7 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 8 Debugging with real machine running without using MINICUBE2 If debugging is performed with a real machine running with
107. e target interface connector of MINICUBE2 To prevent the 78KO OCD board from being inserted by mistake a dummy pin is mounted in the place of pin 11 in CN1 3 CN2 This is a connector used to connect MINICUBE2 with the target system via a 10 pin target cable A 10 core 2 54 mm pitch general purpose connector TSM 105 01 L DV is employed 4 CN3 This is a connector used to connect MINICUBE2 with the target system via a 16 pin target cable A 16 core 2 54 mm pitch general purpose connector TSM 108 01 L DV is employed R20UT0049EJ0600 Rev 6 00 ae Page 14 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER This chapter describes how to use MINICUBE2 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 Read the following chapters if you are using MINICUBE2 for the first time with a V850 microcontroller as the target device e 3 1 Target System Design For communication
108. ebugging Addition of Caution in Figure 4 25 Connecting MINICUBE2 to Target System Change of 4 2 5 Clock setting Change of Figure 4 32 Reserved Area Used by MINICUBE2 Change of 4 2 6 a Debug monitor area this area must be secured Change of Table 4 8 Option Byte 84H Settings and Descriptions Addition of Table 4 9 Option Byte 84H Settings and Descriptions Change of 4 2 6 d Stack area for debugging this area must be secured Change of Description in 4 2 6 f Pseudo real time RAM monitor RRM area Change of Description in 4 2 7 2 Overwriting flash memory during on chip debugging Change of Caution in 4 2 7 9 Cautions when stepping into code C 2 3 4 Change of Caution in 4 2 7 10 Cautions when using pseudo real time RAM CHAPTER 4 HOW TO ae monitor function USE MINICUBE2 Addition of Description in 4 2 7 12 Emulation of POC function WITH 78KO MICROCONTROLLER Change of Table 4 11 Specifications of Programming Function Addition of Remark in 4 3 2 System configuration Deletion of Security command in 4 3 4 3 Execution of Autoprocedure EPV command Addition of Note in Figure 5 2 Recommended Circuit Connection CHAPTER 5 HOW TO USE MINICUBE2 WITH 78KOS MICROCONTROLLER Change of Table 6 1 Differences Between 1 Wire Mode and 2 Wire Mode CHAPTER 6 HOW TO USE MINICUBE2 WITH 78KOR MICROCONTROLLER Change of the Security Verify command in 5 3 4 3 Execution of Autoprocedure EPV command ad
109. ecenddavelad av aiucdeeeseidiweentaddadecoivedeecsvebideavezeceueladents 140 6 1 4 Mounting connector onto target system cceceeeececeeeeeeceneeeecaeeeeeaeeeeneaeeeesaueeessanereneueenenaeeseeaes 143 6 2 ON GHIP DEDUG GING sispan aaa aa esl Daaa aa ASERNE 144 02 1 DEDU TUINCTION S ees a a a a A 144 6 2 2 System config ratioN seeen aa a e a a E AE AEA E Ea RAAE EE 145 6 2 9 System stan p proced re nonren a E ews ee A eee ee 146 6 2 4 System SMUTCOW Mi POCO GUI Cnn cacihcowtaseeacatecuaicosduanaesnneeaest aie ceeaeninind eee AAEE EE AEAEE rA E EEE nAn EEE ennn Ereren nmt ee 148 6 2 5 Securing of user resources and setting of security ID and on chip debug option byte 149 6 2 6 Cautions on debugging isso Saconseers sce canines gee oes ease og tegen abc wanes ede ved oaeeneny edie neous oad wane eatones 155 6 3 FlaSh Programming sccue ceive cons Second cea eee cies eosin aera eine anew tied eee es 157 6 3 1 Specifications Of programming FUNCTION ccccseecccceeeeeceeeeeeeeeeeeeceueeeeseaueeeseeeesseeeesseeeesaneeesaaes 157 6 32 SY SUSI COMM CUAL ON ssa ise sae esse chis oi dees E eeu astans aden totam ete eee 157 6 3 3 System startup procedure ccccsescccceseeecesecececeeeeceaseecseueeeceageeecsseeeseueeessageeeseuseeeseuseeesseeeessass 158 6 34 USage CXaIMPleS sacictet ces cetencctd a N N A O 160 6 3 5 System shutdown ProCeduUre ccccccssecccesseeccsseeccceseecscseeccaseeece
110. ector RESET signal Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 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 3 When the input clock to the target device is generated on the target system CLK does not need to be lt R gt connected Please leave it open when no connection is made When no input clock is generated or the dedicated program adapter FA series is used be sure to connect CLK as external clock supply to the target device 4 If FLMD1 pin is provided on the target device the connection must be made If FLMD1 pin is not provided on the target device leave it open 5 This is for pin processing when not used as a device To change this value to another resistance value refer to APPENDIX A EQUIVALENT CIRCUIT lt R gt 6 In some cases a pin name of EXCLK may differ depending on devices For the details see the user s manual related to the target device R20UT0049EJ0600 Rev 6 00 ae Page 65 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO 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 circuit co
111. ed 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 Interrupt mask flag register Do not disable interrupts using the interrupt mask flag register corresponding to the INTP pin used Example Setting other than below is prohibited when the target device is the 78KOS KB1 and INTP3 is used 7 6 5 4 3 2 1 O alx x x x o x 1 x Any MK1 e Port mode registers of alternate function ports Do not set to the output mode the alternate function port corresponding to the INTP pin used Example Setting other than below is prohibited when the target device is the 78KOS KB1 and INTP3 is used 7 6 5 4 3 2 1 O x Any PM4 e External interrupt mode registers Do not set to other than the rising edge the external interrupt mode register corresponding to the INTP pin used Example Setting other than below is prohibited when the target device is the 78KOS KB1 and INTP3 is used 7 6 5 4 3 2 1 O x x x x x x o 1 INTM1 x Any R20UT0049EJ0600 Rev 6 00 ae Page 122 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 2 6 Debugging of alternate functions of X1 and X2 pins The X1 and X2 pins are u
112. eeessageeesaaeeesesseeeeess 71 4 1 5 Mounting connector onto target system cccecccceececeeeeeeeeeeseeeeseeeeseaeeeseeeeesaeeesaeeeseaeessaeeeseeeeneeeesaes 72 4 2 On Chip Debugging srie aa a a aaa aaa a aa ee a aE 73 42 1 DeDUgIUNCIONS casia e nA a aaa a aA aE 73 G22 SV SIEM COMMOURAU OM cet cece tas xian taccen tienen slack fake tlaa ta ee id tanec uasaacoed sat cpidlede sacaee di auetedaaaeca Ace ea aet cate 74 4 2 3 System startup procedure ccccceecccseseecceeseecceseeecsaueeeceueeccseueeeceeeeeseeeecsageeessueeessageeesseaeeesseeeesens 75 4 2 4 System shutdown procedure ccccescceccssececseceeceseecccuseccsaseeeceaseeseeaseeesagecessuseesseseeessasseesseueeeess 78 OC SENNO onie a a aE a TE En 79 4 2 6 Securing of user resources and setting of security ID ce ecccceseeeeeeeeeeeeeeeeseaeeeeseeeesaaeeeesaeeeeans 83 4 2 7 Cautions on debugging c cssseccccsseecceeseecceeeecceuseeceaseeeseaseeecaeeecseeeesegeeesseeeessuseeesaeeessaaeeeeneneesens 89 4 3 Flash Programming osrstenie aaa aaa aaa aa a aaa a 93 4 3 1 Specifications of programming FUNCTION cccecccccseeeeeceeeeeceseeeeeceaeeeeseeeeeseeeeesseeeesseeeeessaeeeesaeeeeeas 93 423 2 OV Stem COMMOUFAUOM sia a a a a a Aela 93 4 3 3 System startup procedure cccccecccceececcesseeccesececsueeeeceeeecsaueeeceseesseeeecsaueeeseueeessageeessaeeessseeeeeens 94 43A Usage examples suiran n a a a aOR 96 4 3 5 System shutdown PrOCECUIe
113. eive end interrupts When CSI H S is used do not mask transmit end interrupts The following shows an example Example Setting other than below is prohibited when the target device is the V850ES KJ2 and CSIOO is used 7 6 5 4 3 2 1 O CSIOICO x Any Note Do not mask receive these interrupts when there is a receive error interrupt or a receive status interrupt e Port registers When UART is used do not set port registers to make the TxD and RxD pins invalid When CSI H S is used do not set port registers to make the SI SO SCK and H S pins invalid The H S pin is used as the port output for debugging The following shows two examples Example 1 Setting other than below is prohibited when the target device is the V850ES KJ2 and UARTO is used 7 6 5 4 3 2 1 O prca Lx x x x x xlolo_ 7 6 5 4 3 2 1 O x Any PMC3L R20UT0049EJ0600 Rev 6 00 Page 33 of 178 Mar 31 2011 2CENESAS g QB MINI2 Example 2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER Setting other than below is prohibited when the target device is the V850ES HG2 and CSIBO is used 7 6 5 4 3 2 1 O PMC4 7 6 5 4 3 2 1 O PMCCM PMCM 7 6 5 4 3 2 1 O PCM x Any Note The port values corresponding to the H S pin are changed by the monitor program according to the debugger status To perform port register settings in 8 bit units usually the user program can use read modify write If an interrupt for debugging occurs be
114. el 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 If a program is written to the internal flash memory using the QB Programmer or PG FP4 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 QB Programmer or PG FP4 and then download the program using the debugger When ID78KOR V3 61 or later or CubeSuite V1 31 or later is used erase internal flash ROM memory automatically and download the program to the memory area by the debugger For the method of the other debuggers made by partner manufacturers see the document related to each product LVI default start function setting address C1H During debugging the debug monitor program stops the LVI default start function at address C1H Consequently the LVI default start function is kept stopped even after debugging is completed unless the setting to address C1H is changed through flash programming On chip debugging option byte setting address C3H The on chip debugging option byte setting is rewritten arbitrarily by the debugger Page 155 of 178 lt R gt R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RE
115. ended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 3 2 Recommended Circuit Connection When UART Is Used for Communication Interface EVbp EV bp EVbp e Target connector 3k to 10kQ e7 Target device RESET _OUT RxD Note 1 TxD Note 1 R F U R F U R F U Clock circuit CLK 1k to 10kQhete R F U R F U L FLMD1 Notes EA ne De ee ae eT ge ee eg Se FLMDO FLMDO RESET_IN 4 1k to 1 OkQNete 7 EVop 10kQ R F U 1kQ Reset connector RESET signal Notes 1 Connect TxD transmit side of the target device to RxD receive side of the target connector and TxD i a a i a ee transmit side of the target connector to RxD receive side of the target device Read the serial interface pin names on the target device side as those for flash programming supported by the target device 2 This pin may be used to supply an external clock during flash programming 4 8 or 16 MHz For the connection refer to the user s manual for the target device 3 The alternate function of this pin can be used because this pin changes to input unused when debugging In MINICUBE2 it is pulled down at 100 kQ 4 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 3 1 3 Connection of reset pin 5 The circ
116. eparation and installation of software refer to the setup manual supplied with MINICUBE2 e QB Programmer e USB driver e Parameter file 2 Switch setting Set the mode select switch to M2 Set the power select switch by referring to Table Caution Do not change the switch setting while the USB cable is connected Table 3 7 Setting of Power Select Switch ie 4 3 V is supplied from MINICUBE2 to the target an C 5 V is supplied from MINICUBE2 to the target system Power supply of the target system is used MINICUBE2 detects the power for the target system The detected power is also used as the power supply for the communication interface Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 3 15 before the power to the target system is turned on When the power select switch is set to T the step of 4 Connecting the USB cable can be performed before this step Figure 3 15 Connecting MINICUBE2 to Target System yo a 16 pin target cable MINICUBE2 g Target system R20UT0049EJ0600 Rev 6 00 6 Page 40 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 4 5 6 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 R
117. er current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 5 18 before the power to the target system is turned on When the power select switch is set to T the step of 4 Connecting the USB cable can be performed before this step Figure 5 18 Connecting MINICUBE2 to Target System g GCG 16 pin target cable MINICUBE2 4 Target system R20UT0049EJ0600 Rev 6 00 6 Page 127 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 4 5 6 R20UT0049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 5 19 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection The power is always supplied after MINICUBE2 is connected to the host machine with the USB cable Caution Do not change the switch setting while the USB cable is connected Figure 5 19 Connecting MINICUBE2 to Host Machine MINICUBE2 USB cable Host machine Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glo
118. execution is completed normally the mode LED glows green and the following window appears Figure 4 47 Completion of Autoprocedure EPV Command Execution rq QB Programmer File Device Wiew Help chip erase finish Start Flash Programmine Flash Programming 10 Flash Programmine 20 Flash Programming US Flash Programming 405 Flash Programming 50S Flash Programming 60 Flash Programming 40 Flash Programming 80 Flash Programming 90 Flash Programming finish Flash Internal Verify Qk tart Flash VWerityine Flash Verifying lt 7 02 gt Flash Verifying 208 Flash Verifying lt 30 r Flash Verifying 4020 Flash Verifying SOR Flash Verifying 60K Flash Verifying OA Flash Verifying 808 Flash Verifying OUR Flash Verifying finish R20UTO049EJ0600 Rev 6 00 Mar 31 2011 CENESAS Name D78F0533 Firm Version 200 ExtGode FFO4 Sth Vendor 10h FRAM Device file Name FSFORSS orm Format 414 Version WT OS Processor Wer 0200 Load tile Name SAMPLE HEX Date 2005 04 05 15 52 18 Chksum E23ER Area OOO000h O07FF Fh Connection to device Fort UART Speed 115200 Range Chip Freq 20 00 Multiply 1 00 _ Page 101 of 178 QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 3 5 System shutdown procedure Terminate flash programming and shutdown the system in the following order If
119. f 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER This chapter describes how to use MINICUBE2 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 Read the following chapters if you are using MINICUBE2 for the first time with a 78KO microcontroller as the target device Caution ID78KO0 QB Ver 3 10 or later is used for the descriptions in this chapter If using an earlier version some settings might differ e 4 1 Target System Design For communication between MINICUBE2 and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors e 4 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with MINICUBE2 e 4 3 Flash Programming This section describes the system configuration and startup method to perform flash programming w
120. f Chip Start f Block End Cancel lt 5 gt Next set the items in the Command options and Security flag settings areas in accordance with your programming environment The following figure shows an example Figure 6 22 Advanced Tab of Device Setup Dialog Box Device Setup Standard Advanced Command options W Blank check before Erase Securty flag after Prograrn Checksum after Program Security flag settings Disable Chip Erase Disable Block Erase Boot Block end o0 Disable Program FS Block start 000 FS Block end 127 Disable Boot block cluster reprogramming Show Address R20UT0049EJ0600 Rev 6 00 Page 162 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt 6 gt By clicking the button the programming environment is set and the Device Setup dialog box is closed The main window appears as follows Figure 6 23 Completion of Programming Environment Setting ia QB Programmer File Device Help PAWS gt QB Programmer startup Programmer gt Command standby QIB Programmer W200 gt Firmware V4 00 gt Device Setup Parameter File Read PASS gt Device Mame Firmware Parameter file Name 78F1166 prm Version 1 00 Load tile Mame Date Chksum Area File checksum Type Chksum Area Connection to device Fort UART ch Pulse 0 Speed 1Mbps Range Chip F
121. f a user created program When the program is downloaded by the debugger the debugger changes the value as required 2 For PM if this value is not specified in the assembler source code 1EH is automatically specified If the value is illegal the entire internal flash memory area is erased and then the debugger starts In STOP mode the internal oscillator does not stop even if specified to do so How to set Describe the code for setting the option byte in the user program Refer to the following and add a code to the assembler source Example When setting 0x02 SSS CSEG AT 084H SSS is an arbitrary symbol name eight characters or less DB 2H 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 R20UTO049EJ0600 Rev 6 00 6 Page 85 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO 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 How to set When using Renesas Electronics assembler RA78KO an ID cod
122. fore writing however an unexpected operation may be performed d 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 R20UT0049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Page 34 of 178 QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER If Renesas Electronics compiler CA850 is used the security ID can be set using the Compiler Common Options menu Figure 3 13 Security ID Setting with CA850 Compiler Common Options File Startup Link Directive ROM Flash Device 256M Byte Mode Security ID Ost 23456 78946 CDE F1 2304 This edit box can be specitied a security ID by hexadecimal When it i specitted ei
123. g RUN Unavailable Time measurement Measurement resolution 100 us from execution start to break Max measurement time Approximately 100 hours User spaces used for debugging Internal ROM 308 bytes Internal RAM 5 bytes used as stack X2 Note Note Note Function pins used for debugging INTP X1 Note The INTP pins to be used are described in the document QB MINI2 Operating Precautions The X1 and X2 pins are used only when the debugger is started for the first time when downloading the monitor program R20UT0049EJ0600 Rev 6 00 ae Page 114 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 2 2 System configuration Figure 5 13 illustrates the system configuration for on chip debugging Figure 5 13 System Configuration for On Chip Debugging lt 3 gt lt 1 gt ELEGIRONIGS Target system lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the debugger USB driver device files and so on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 16 pin target cable accessory lt 6 gt Target connector sold separately R20UT0049EJ0600 Rev 6 00 Page 115 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 2 3 System s
124. g area in the ID78KOR QB Configuration dialog box 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 lf Permit is selected in the Flash Programming area in the Configuration dialog box 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 11 Debugging in 1 wire mode In the condition that debugging is performed in 1 wire mode selected by choosing TOOLO in the Target Device Connection area in the Configuration 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 12 Pseudo real time monitor function Note the following points when using the pseudo real time monitor function lt 1 gt Standby mode HALT or STOP may be cancelled during monitoring lt 2 gt The pseudo real time monitor function does not operate while the CPU operating clock is stopped lt 3 gt If
125. g the information contained in this document or Renesas Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics General Precautions for Handling This Product 1 Circumstances not covered by product guarantee e f the product was disassembled altered or repaired by the customer e f it was dropped broken or given another strong shock e Use at overvoltage use outside guaranteed temperature range storing outside guaranteed temperature range e f power was turned on while the USB cable or connection to the target system was in an unsatisfactory state e f the cable of the USB cable the target cable or the like was bent or pulled excessively e f the product got wet elf this product is connected to the target system when there is a potential difference between the GND of this product and GND of the target system e f the connectors or cables are plugged unplugged while this product is in the power on state e f excessive load is applied to the connectors or sockets e f a metal part of the interface connector or another such part comes in contact with an electrostatic charge e f specifications other than those specified are used for the USB port 2 Safety precautions
126. get system RESET_OUT Pin used to output reset signal to the target device CLK OUT Pin used to output clock signal to the target device and to set the target device to programming mode DATA IN OUT Pin used to receive commands or data from the target device and to transmit commands or data to the target device Pin used to input handshake signal from the target device INTP Pin used to set the target device to debug mode Tae __ Thispin snot used so leave t open Note As seen from MINICUBE2 R20UT0049EJ0600 Rev 6 00 Mar 31 2011 stENESAS Page 105 of 178 QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 1 2 Circuit connection example Refer to Figure 5 2 and design an appropriate circuit Caution 1 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 lt R gt 2 The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc lt R gt Figure 5 2 Recommended Circuit Connection VDD VDD Target connector Target device 3 to 10kQ e 5 RESET C a O a VDD 1kQ INTP Note 5 1kQ GND RESET _OUT DATA VDD DATA R F U R F U H GNote 4 CLK R F U R F U INTP R F U CLK RESET_IN R F U j gt C
127. grammer is installed Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product R20UT0049EJ0600 Rev 6 00 Page 169 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 8 SELF FIREWARE UPDATE 8 2 Firmware Update Procedure 1 Preparation and installation of software The following software is required to update firmware For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e MINICUBE2 diagnostic tool e USB driver 2 Switch setting The mode select switch and power select switch may be set to any position 3 Connecting the USB cable Connect MINICUBE2 to the host machine Do not connect MINICUBE2 to the target system The mode LED glows white after connection Figure 8 2 Connecting MINICUBE2 to Host Machine MINICUBE2 USB cable Host machine 4 Startup of MINICUBE2 diagnostic tool Start the MINICUBE2 diagnostic tool If the MINICUBE2 diagnostic tool was installed when Renesas Electronics software was installed the diagnostic tool is registered on the Start menu as follows e NEC Electronics gt MINICUBE Utilities gt Vx xx version For the operation after this step refer to the user s manual for the MINICUBE2 diagnostic tool R20UT0049EJ0600 Rev 6 00 Page 170 of 178 Mar 31 2011 RENESAS QB MINI2 APPENDIX A
128. he user s manual for the OCD Checker e The user resource has not been secured or the security ID has not been set To perform debugging with MINICUBE2 the user resource must be secured and the security ID must be set For details refer to 4 2 6 Securing of user resources and setting of security ID Unsupported software debugger device file or firmware is used The software used may not support debugging of the target device Refer to the document QB MINI2 Operating Precautions and check the supported version When using software provided by a Renesas Electronics partner refer to the documents prepared by the partner company Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 7 SELF TESTING R20UT0049EJ0600 Rev 6 00 ae Page 77 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 2 4 System shutdown procedure Terminate debugging and shutdown the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Debugger termination Terminate the debugger 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to Uae or 5 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system R20UT0049EJ0600
129. he QB Programmer Programming GUI Operation User s Manual R20UT0049EJ0600 Rev 6 00 ae Page 95 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 3 4 Usage examples This section describes a series of basic operations using the QB Programmer using the wPD78F0547D as an example The operations from execution of the Autoprocedure EPV command to programming for the target device are described For other commands and their applications refer to the QB Programmer Programming GUI Operation User s Manual The conditions used for a series of operations in this section are as follows lt Target system gt Target device uPD78F0547D Power supply voltage 5 V supplied from MINICUBE2 Communication channel UART 115 200 bps lt MINICUBE2 gt Switches Mode select switch M2 Power select switch 5 lt QB Programmer gt Parameter file 78F0547D PRM Clock setting 20 MHz x1 oscillator on the target system side Operation mode chip Program file sample hex Command option Blank check before Erase selected Read Verify after Program selected R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Page 96 of 178 QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 1 Setting of programming environment Set the programming environment following the steps lt 1 gt to lt 6 gt described below lt 1 gt Click the Device menu on the menu bar and then click
130. he 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 FO0c34 when using the ID850QB 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 Ox2 nop 0x4 XXXX 0x4 XXXX 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 Ox2 OxFFFF 0x4 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 to debug monitor program at 0x0 0x4 jr disp22 4 e mov32 and jmp are placed in succession from address 0 when using IAR compiler ICCV850 Before writing After writing 0x0 movimm32 reg1 gt Jumps to debug monitor program at 0x0 0x6 jmp reg1 0x4 mov imm32 reg1 Oxa jmp reg1 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 R20UT0049EJ0600 Rev 6 00 Page 31 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER b
131. he 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 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 6 6 How to set An ID code is generated in the security ID area by setting the security ID when using Renesas Electronics assembler RA78KOR or compiler CC78KOR Select the Security ID gi check box and set an arbitrary ID code 10 bytes as shown in the figure below R20UT0049EJ0600 Rev 6 00 ae Page 152 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER Caution Figure 6 14 Security ID Setting Example Linker Options Output Output Library Others Load Module File o Output File Hame KOR_TEST Browse iM Output Symbol Information g Create Error List File e W On Chip Debug Option Bytes go Control alue 85 W Security IO gi H ID 012345678901 23456 789 H Start Address SFCOU H Size i D24 bytes W Allow Ble bytes Boundary cczal Command Line Options go 5h 3FC00h 1024 gi0 2345678901 25456 69h pa map Cancel Apply Help If you have forgotten the security ID erase the flash memory by flash programming or self programming and then set the security ID
132. hip debugging for a 78KOR microcontroller Be sure to read the following to use MINICUBE2 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 lf 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 If Not Permit is selected in the Flash Programming area in the Configuration dialog box of the debugger the time until the user program is executed compared with the time when Permit is selected is delayed several 100 ms Debugging with real machine running without using MINICUBE2 If debugging is performed with a real machine running without using MINICUBE2 write the user program using the QB Programmer Programs downloaded by the debugger include the monitor program and such a program malfunctions if it includes processing to make the TOOLO pin low lev
133. ice to RxD receive side of the target connector and TxD transmit side of the target connector to RxD receive side of the target device Circuits other than the X1 oscillator can be used to generate the clock signal for the target device during on chip debugging The name of the pin shared with OCD1A OCD1B might be invalid or might not exist depending on the device For details see the users manual for the target device During on chip debugging the settings specified by the user program are ignored because these pins are used as pins dedicated to on chip debugging However if the pins are specified as input pins the pins must be processed because they are left open when MINICUBE2 is not connected This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports When not using flash self programming process the pins according to the device specifications This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device Page 58 of 178 QB MINI2 CHAPTER 4 HOW TO
134. internal high speed oscillator of the device or a 4 8 or 16 MHz clock signal generated in MINICUBE2 can be used for the clock signal of the target device during on chip debugging 4 The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports This circuit is used to control the port during flash programming Connect any port that can output data to FLMDO via a resistor When not using flash self programming process the pins according to the device specifications 5 This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device R20UT0049EJ0600 Rev 6 00 Page 64 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 4 13 When Only Programming Is Performed Vpop Vop Vpop 3k to 10kaQ Target connector Target device RESET OUTS RxD 2 Vpop Txp ote 2 R F U 1k to 10kQN 5 R F U R F U EXCLKN te6 lt R gt R F U R F U FLMD1 4 DATA FLMDO RESET_IN R F U Reset conn
135. is employed 4 Target interface connector This is a connector used to connect MINICUBE2 with the target system via a 16 pin target cable Connect the 78KO OCD board for debugging a 78KO microcontroller To prevent the 78KO OCD board from being inserted by mistake pin 11 is removed at shipment Since this connector is compatible with 16 core 2 54 mm pitch general purpose connectors female a commercially available cable can be substituted 5 Mode LED The appearance of the mode LED changes according to the status of hardware and software as shown in Table 2 3 Table 2 3 Mode LED Status Color USB Target VDD Software Operation Status ee n E e ee pee ea connected White TN Connected Not detected detected Not detected Not Not yet started ss started Soe A debugger for V850 microcontrollers has been started and CPU is in the break mode A debugger for V850 microcontrollers has been started and the CPU is running or a program is being downloaded p Da Yellow H Illumination The illumination mode is entered when MINICUBE2 is connected to a USB interface and 15 seconds or longer have elapsed This mode is also entered when the debugger is terminated normally A debugger for 78KO microcontrollers has been started and A debugger for 78KO microcontrollers has been started and A debugger for 78KOS microcontrollers has been started and the CPU is in the break mode The QB Programmer has been started
136. ith MINICUBE2 R20UT0049EJ0600 Rev 6 00 Page 49 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming Because the communication mode for on chip debugging differs depending on the target device the target system configuration varies Check the device specifications when designing the target system Example When 78k0 Kx2 78KO Lx2 78KO Fx2 OCDxA OCDxB FLMDO are communication for on chip debugging RxD TxD FLMDO are communication for programming When 78KO0 Kx2 L 78KO Ix TOOLCx TOOLDx are communication for on chip debugging and programming If you cannot determine the communication mode of the target device see the manual for the target device to check whether the OCDxA and OCDxB pins or TOOLCx and TOOLDx pins are used for on chip debugging R20UT0049EJ0600 Rev 6 00 Page 50 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER Figure 4 1 and Figure 4 2 present overviews of the MINICUBE2 communication interface For communication between MINICUBE2 and the target system communication circuits must be mounted on the target system as shown on the left side of the figure Refer to this section to design circuits appropriately Figure 4 1 Outline of Communication Interface for On Chip Debugging Communi
137. line is designed for flash self programming which controls the FLMDO pin via ports When not using flash self programming process the pins according to the device specifications 5 This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device 6 To use FLMD1 connect it to FLMD1 of MINICUBE2 R20UT0049EJ0600 Rev 6 00 Page 59 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 4 8 When Both Debugging and Programming Are Performed with X1 X2 oscillator is not used with TOOLCO TOOLDO communication Target connector Target device GND RESET _OUT 3k to 10 kQ TOOLDO X2 DD R F U R F U R F U O IN Io I Fs lt CLKN TOOLCO x1 8 2 RFU 10 10 kQNote 4 1 0 kQNote 5 R F U E FLMD1 Note 5 DATA 1 kQ FLMDO Reset connector RESET_INN te RESET R F U Notes 1 If there are capacitance elements such as capacitors on chip debugging might not operate normally 2 A clock signal provided on the 78KO OCD board
138. llustrates the circuit connection for the case where the reset signal is switched using the jumper with or without MINICUBE2 connected This connection is simple but the jumper must be set manually Figure 5 5 Circuit Connection for Switching Reset Signal with Jumper Target connector Jumper Target device RESET OUT Reset connector RESET_IN RESET signal Jumper setting When MINICUBE2 is connected 1 2 shorted When MINICUBE2 is not connected 2 3 shorted 3 Resetting the target device by power on clear POC only Figure 5 6 illustrates the circuit connection for the case where the target device is only reset via POC without using the reset pin RESET_OUT is valid only when the debugger is running or during flash programming The operation is not guaranteed if the power to the target system is shut down during debugging Note that the POC function cannot be emulated Figure 5 6 Circuit Connection for the Case Where Target Device Is Only Reset via POC Vop 1 to 10 kQ Target connector Target device RESET OUT RESET_IN Page 109 of 178 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 1 4 Connection of INTP pin The INTP pin is used only for communication between MINICUBE2 and the target device during debugging Design circuits appropriately according to the relevant case among the cases shown below 1 INTP pin is not used in target s
139. m is turned on When the power select switch is set to T the step of 4 Connecting the USB cable can be performed before this step Figure 4 38 Connecting MINICUBE2 to Target System a7 16 pin target cable MINICUBE2 Target system R20UT0049EJ0600 Rev 6 00 6 Page 94 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 4 39 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3 or 5 the mode LED glows white after connection The power is always supplied after MINICUBE2 is connected to the host machine with the USB cable Caution Do not change the switch setting while the USB cable is connected Figure 4 39 Connecting MINICUBE2 to Host Machine a MINICUBE2 USB cable Host machine 5 Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after power application 6 QB Programmer startup Start the QB Programmer from the Start menu of Windows The mode LED glows green after QB Programmer Startup A series of basic operations after this step is described in the following section For detailed usage of the QB Programmer refer to t
140. mory cannot be guaranteed Overwriting flash memory during on chip debugging If the following debugger operations lt 1 gt to lt 7 gt are performed on chip the flash memory in the device is overwritten If any of the following debugger operations lt 1 gt to lt 7 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 is disabled or operation is performed at a voltage at which flash memory cannot be rewritten however the debugger outputs an error and the operation is ignored 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 oper
141. n 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 address is OxSffefff MROMSEG LOAD R VOx03f800 MonitorROM PROGBITS A MonitorROM i MRAMSEG ILOAD RW VOxOSffeffO MonitorRAM NOBITS 2 AW MonitorRAM R20UT0049EJ0600 Rev 6 00 ae Page 32 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER c Securement of communication serial interface UART or CSI H S is used for communication between MINICUBE2 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 and CSI H S in the user program e Interrupt mask register Note When UART is used do not mask rec
142. n is lt R gt available because RESET_OUT becomes active Note that the POC detection voltage is about 1 V higher than that of the target device Figure 4 21 Circuit Connection for the Case Where Target Device Is Only Reset via POC Vbp 1 to 10 kQ Target connector Target device RESET OUT RESET_IN Page 70 of 178 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 1 4 Cautions on target system design Note the following cautions when designing the target system lt R gt e f possible do not create sections in which the communication lines for debugging OCDxA OCDxB TOOLCx and TOOLDx run in parallel in the target system If this cannot be prevented shorten the sections as much as possible When using TOOLCO and TOOLDO as communication lines for debugging by using X1 or X2 oscillation be sure to make the section where TOOLCO and TOOLDO run in parallel less than 30 mm lt R gt e Use a GND pattern to shield the communication lines for debugging OCDxA OCDxB TOOLCx and TOOLDx 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 and X2 pins from the target connector in order to ensure normal clock oscillation lt R gt e To use OCDOA OCDOB T
143. n the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Terminating the QB Programmer 2 3 4 Terminate the QB Programmer if you are not going to perform programming to other devices Remark When the QB Programmer is terminated the setting information is saved in the gbp ini file Due to this file the same setting is maintained when the QB Programmer is started the next time Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to ioe or eu Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine When the power select switch is set to T the step of 4 Unplugging the target cable can be performed before this step Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system 3 3 6 Cautions on flash programming This section describes the cautions for flash programming Be sure to read the following for the proper use of MINICUBE2 e To improve the writing quality fully understand verify and evaluate the following items before using MINICUBE2 Circuits are designed as described in the user s manuals for the device and MINICUBE2 The device QB Programmer and MINICUBE2 are used as described in each user s manual The power supplied to the target system is stable R20UT0049EJ0600 Rev 6 00 Page 48 o
144. ned to the H S pin The pins used for serial communication are basically the same as those of the flash memory programmer such as PG FP5 but some devices do not support some of them Refer to the document QB MINI2 Operating Precautions and check the supported pins Figure 3 1 Outline of Communication Interface Communication circuits must be mounted on the target system RENESAS Target device Serial communication communication UART CSI H S MINICUBE2 Host machine Target system R20UT0049EJ0600 Rev 6 00 Page 16 of 178 Mar 31 2011 2CENESAS g lt R gt QB MINI2 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 3 1 1 Pin assignment CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER This section describes the interface signals used between MINICUBE2 and the target system Table 3 1 lists the pin assignment Table 3 2 describes the functions of each pin The pin assignment varies depending on whether CSI H S or UART is used so design the circuit appropriately according to the circuit connection examples described on the following sections Table 3 1 Pin Assignment 7 fe we ie e Jo 13 Note Signal names in MINICUBE2 TOP VIEW WBOOODOOW WOOO OOO Pin assignment of target connector to be mounted on target system Table 3 2 Pin Functions RESET_IN Pin used to input reset signal from the target system RESET_OUT OUT FLMDO OUT programming mode FLMD1 OUT RxD
145. nication serial interface Addition of 12 Cautions unique to devices and 13 Processing of monitoring program for debugging in 3 2 6 Cautions on debugging C 3 4 4 Change of Figure 4 2 in 4 1 Target System Design CHAPTER 4 HOW TO ction 4 1 2 Circuit connection examples USE MINICUBE2 WITH 78KO MICROCONTROLLER e Addition of Note 2 in Table 4 5 e Addition of Note 7 in Figure 4 3 and 4 4 e Addition of Note 6 in Figure 4 5 to 4 9 e Addition of Note 5 in Figure 4 10 and 4 11 Change of 4 1 3 4 Resetting the target device by power on clear POC only Description added to 4 2 6 Securing of user resources and setting of security ID 4 2 7 Cautions on debugging e Change of 13 Emulation of POC function e Addition of 14 Device with without on chip debug function Note 2 of Figures 5 2 in 5 1 2 Circuit connection example corrected Note 6 added CHAPTER 5 HOW TO Description added to 5 2 5 Securing of user resources USE MINICUBE2 WITH 78KO0S MICROCONTROLLER Change of Table 6 1 in 6 1 Target System Design CHAPTER 6 HOW TO Note 2 of Figures 6 2 in 6 1 2 Circuit connection example corrected Note 5 added USE MINICUBE2 WITH 78KOR 6 2 5 Securing of user resources and setting of security ID and on chip debug O9 option byte MICROCONTROLLER e Description of material added e Addition of Note 1 in Figure 6 11 e Addition of Note in a Securement of debug monitor area 6 2 6 Cautions on debugging e Deletion of 5 Step execution
146. nnection examples shown in the previous section During on chip debugging a reset signal from the target system is input to MINICUBE2 masked and then output to the target device Therefore the reset signal connection varies depending on whether MINICUBE2 is connected For flash programming the circuit must be designed so that the reset signals of the target system and MINICUBE2 do not conflict Select one of the following methods and connect the reset signal in the circuit The details of each method are described on the following pages 1 Automatically switching the reset signal via resistor recommended described in recommended circuit connection in the previous section Y Automatically switching the reset signal via selector logic Manually switching the reset signal with jumper S Resetting the target device by power on clear POC only lt R gt Caution Do not connect a capacitor to the RESET_OUT pin lt R gt Figure 4 14 Cautions for using the RESET OUT pin MINICUBE2 Target device Reset connector RESET OUT RESET ype Vo Buffer RESET_IN a If a capacitance element such as a capacitor or resistor is connected to the RESET OUT pin the target device might not be able to communicate with MINICUBE2 If necessary connect a capacitor to the RESET_IN pin R20UT0049EJ0600 Rev 6 00 Page 66 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 1 Automati
147. no restrictions are applied by the occupied pins MINICUBE2 operates on the internal high speed oscillator of the target device regardless of the setting specified for Main Clock in the Configuration dialog box of the debugger However the clock specified by the debugger is used for downloading a program when the debugger starts Therefore the download time can be shortened if for example the 16 MHz clock for the system is specified instead of the 4 MHz clock for the system 3 Using the subclock when no restrictions are applied by the occupied pins MINICUBE2 operates on the subclock of the target system regardless of the setting specified for Sub Clock in the Configuration dialog box of the debugger This setting cannot be specified c c c a R20UT0049EJ0600 Rev 6 00 Page 82 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 4 2 6 Securing of user resources and setting of security ID MINICUBE2 uses the user memory spaces shaded portions in Figure 4 32 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 f on the following pages and secure these spaces in the user program or using the compiler options When C SPY manufactured by IAR Systems is used read also the following material IAR
148. o memory during RUN Available Reset masking Available internal external reset Time measurement Measurement resolution 100 ws lt R gt In 1 wire mode Internal ROM 1036 bytes internal RAM 6 bytes te In 2 wire mode Internal ROM 100 bytes internal RAM 6 bytes Note For details refer to 6 2 5 Securing of user resources and setting of security ID and on chip debug option byte R20UT0049EJ0600 Rev 6 00 Page 144 of 178 Mar 31 2011 a RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 2 2 System configuration Figure 6 8 illustrates the system configuration for on chip debugging lt 1 gt lt 2 gt lt 3 gt lt 4 gt lt 5 gt lt 6 gt R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS Figure 6 8 System Configuration for On Chip Debugging lt 4 gt lt 3 gt lt 1 gt NEG ELEGTRONIGS Target system lt 2 gt Host machine Products with USB ports Software Includes the debugger USB driver device files and so on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html USB cable accessory MINICUBE2 this product 16 pin target cable accessory Target connector sold separately Page 145 of 178 QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 2 3 System startup procedure This section describes the system startup procedure Observe the following orde
149. occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regardin
150. of Programming Function Clock supply 16 8 or 4 MHz clock can be supplied Clock mounted on the target system can be used Power supply 3 or 5 V maximum current rating 100 mA Acquisition of device specific Parameter file for MINICUBE2 made by Renesas Electronics is used information Security flag setting Available Standalone operation Unavailable must be connected to host machine 3 3 2 System configuration Figure 3 14 illustrates the system configuration for flash programming Figure 3 14 System Configuration for Flash Programming f af ji lt 5 gt a har lt 4 gt lt 3 gt g y lt e gt Target system lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the QB Programmer USB driver parameter files and so on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 16 pin target cable accessory lt 6 gt Target connector sold separately R20UT0049EJ0600 Rev 6 00 Page 39 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 3 3 System startup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform flash programming For details on pr
151. of reset pin 4 The circuit enclosed by a dashed line is not required when only flash programming is performed 5 This is for pin processing when not used as a device To change this value to another resistance value see APPENDIX A EQUIVALENT CIRCUIT R20UT0049EJ0600 Rev 6 00 Page 139 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 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 MINICUBE2 masked and then output to the target device Therefore the reset signal connection varies depending on whether MINICUBE2 is connected For flash programming the circuit must be designed so that the reset signals of the target system and MINICUBE2 do not conflict Select one of the following methods and connect the reset signal in the circuit The details of each method are described on the following pages 1 Automatically switching the reset signal via series resistor recommended described in recommended circuit connection in the previous section 2 Manually switching the reset signal with jumper 3 Resetting the target device by power on clear POC only R20UT0049EJ0600 Rev 6 00 Page 140 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V
152. of security ID s sssssnsesrreesrrresrrrrsrrrrsrrrrsrrresrrrrerrrrsrrrre nne 30 3 20 Cautions OMiGe DUG QUIN eare O E AEE NE Gu bande eee ee 36 33 Flash Programming assii auaa aa Ea aa Eaa EN aana raaa paana 39 3 3 1 Specifications of programming FUNCTION ccccseeeeccseeeeeseeeeeeceeeeeeeeaeeeeseueeeesaeeeeseeeeesaeeeesseeeesaaeees 39 3 3 2 DYVSICMUCOMMOULATION gens docdacccctiaetestecaa2hate asasacecaatbaes sanccdonseancatecaadas acqateaiecanned tasaantacteaanc caadanesagnececneae 39 3 90 09 OVSIEM StartUp PIOCCCUNG cruiser Vasencaearese anes once E cen a a eee eee eee aces 40 394 Usage Xa DIGS csie ea A e Ea E aetcotasce ence a a a a T Ea ences 42 3 3 5 System shutdown ProcedUTE iisi ieena a E a a A a a a 48 3 3 6 Cautions on flash PrOGraAMMiNG ccccsecccccseececseeeeeeceeeeeeseeeeecsaeeeecauueeeseueeecsaeeeessueeeeseeeeesseseeeesaeees 48 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER ccceeseseeeeeseeeees 49 AA Farget System DESIO icici a cenit A veteieceettieme 50 Ail PINGASSIONIMENs ase a a a A eens 52 4 1 2 Circuit connection examples cccccceececceeseeecceseeecseeeecceueeeccegececeeeesseeeessaueeesseeessaueeessaseessseaeesens 54 4 1 3 Connection of reset pin cceccccsseccceeeeeeceeseeceeueeeceaeeeseuseeecsaueeeseaseeeseaeeessageeesseseessageeesssesesenseeesens 66 4 1 4 Cautions on target system design cccccseeeccceeeceecaeeeeceeeeeaeeeeeeaaeeeeseueeeesaeeeess
153. oftware used may not support debugging of the target device Refer to the document QB MINI2 Operating Precautions and check the supported version When using software provided by a Renesas Electronics partner refer to the documents prepared by the partner company Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 7 SELF TESTING R20UT0049EJ0600 Rev 6 00 Page 147 of 178 Mar 31 2011 s RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 2 4 System shutdown procedure Terminate debugging and shutdown the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Debugger termination Terminate the debugger 2 Target system power shutdown Shutdown the power supplied to the target system This step is not necessary if the power select switch is set to Me or 5 3 Unplugging the USB cable Unplug the USB cable from MINICUBE2 or the host machine 4 Unplugging the target cable Unplug the target cable from MINICUBE2 or the target system R20UT0049EJ0600 Rev 6 00 Page 148 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 2 5 Securing of user resources and setting of security ID and on chip debug option byte The user must prepare the following to perform communication between MINICUBE2 and the target device and implement each debug function If Renesas Electronics assembler
154. ogramming is performed R20UT0049EJ0600 Rev 6 00 ae Page 141 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 2 Manually switching the reset signal with jumper Figure 6 5 illustrates the circuit connection for the case where the reset signal is switched using the jumper with or without MINICUBE2 connected This connection is simple but the jumper must be set manually Figure 6 5 Circuit Connection for Switching Reset Signal with Jumper Target connector Target device RESET OUT Reset connector RESET_IN RESET signal Jumper setting When MINICUBE2 is connected 1 2 shorted When MINICUBE2 is not connected 2 3 shorted 3 Resetting the target device by power on clear POC only Figure 6 6 illustrates the circuit connection for the case where the target device is only reset via POC without using the reset pin RESET_OUT is valid only when the debugger is running or during flash programming Figure 6 6 Circuit Connection for the Case Where Target Device Is Only Reset via POC Vop 1 to 10 kQ Target connector Target device RESET OUT RESET_IN R20UT0049EJ0600 Rev 6 00 Page 142 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 1 4 Mounting connector onto target system The connector must be mounted on the target system for connecting MINICUBE2 with the target system A 2 54 mm pitch 16 pin general purpos
155. on Download these Renesas Electronics software from the following website ODS URL http www2 renesas com micro en ods index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 16 pin target cable accessory lt 6 gt Target connector sold separately R20UT0049EJ0600 Rev 6 00 6 Page 126 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 3 3 System startup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform flash programming For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e QB Programmer e USB driver e Parameter file 2 Switch setting Set the mode select switch to M1 Set the power select switch by referring to the following table Caution Do not change the switch setting while the USB cable is connected Table 5 6 Setting of Power Select Switch ie 4 3 V is supplied from MINICUBE2 to the target lai C 5 V is supplied from MINICUBE2 to the target system Power supply of the target system is used MINICUBE2 detects the power for the target system The detected power is also used as the power supply for the communication interface Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the high
156. on of X1 and X2 pins The X1 and X2 pins are used when the debugger is started for the first time when downloading the monitor program and when programming is performed with the QB Programmer Design circuits appropriately according to the relevant case among the cases shown below 1 X1 and X2 pins are not used in target system See Figure 5 10 2 X1 and X2 pins are used in target system See Figure 5 11 and 5 2 6 Debugging of alternate functions of X1 and X2 pins Figure 5 10 Circuit Connection for the Case Where X1 and X2 Pins Are Not Used in Target System Vpp Target connector 3 to 10 ko Target device 1 to 10 kQ Figure 5 11 Circuit Connection for the Case Where X1 and X2 Pins Are Used in Target System Target connector Jumper Target device External parts Oscillator or external device Jumper setting When debugger is started for the first time downloading the monitor program or when programming is performed with QB Programmer 1 2 shorted Other than above 2 3 shorted Remark Refer to the pin connection in Figure 5 10 when the X1 or X2 pin is not used R20UT0049EJ0600 Rev 6 00 Page 112 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 1 6 Mounting connector onto target system The connector must be mounted on the target system for connecting MINICUBE2 with the target system A 2 54 mm pitch 16 pin general purpose connector can be used
157. or 5 the mode LED glows white after connection Figure 3 11 Connecting MINICUBE2 to Host Machine So E MINICUBE2 USB cable Host machine 5 Applying power to target system Turn on power to the target system This step is not necessary if the power select switch is set to 3 or 5 The mode LED glows white after power application 6 Debugger startup Start the debugger The mode LED glows blue after debugger startup For the operation after this step refer to the user s manual for the debugger If the debugger does not start normally or the operation is unstable the possible causes may be the following Communication error between MINICUBE2 and target system Whether communication is performed normally can be checked using the OCD Checker For details refer to the user s manual for the OCD Checker The user resource has not been secured or the security ID has not been set To perform debugging with MINICUBE2 the debug monitor area and communication serial interface for communication must be secured and the security ID must be set For details refer to 3 2 5 Securing of user resources and setting of security ID Unsupported software debugger device file or firmware is used The software used may not support debugging of the target device Refer to the document QB MINI2 Operating Precautions and check the supported version When using software provided by a Renesas Electronics partner refer to the documents prep
158. or other commands and their applications refer to the QB Programmer Programming GUI Operation User s Manual The conditions used for a series of operations in this section are as follows lt Target system gt Target device uPD70F3732 Power supply voltage 5 V supplied from MINICUBE2 Communication channel CSI H S 2 MHz lt MINICUBE2 gt Switches Mode select switch M2 Power select switch 5 lt QB Programmer gt Parameter file 70F3732 PRM Clock setting 5 MHz x4 oscillator on the target system side Operation mode chip Program file sample hex Command options Blank check before Erase selected Read verify after Program selected Security flag after Program selected Security function Disable Read selected R20UT0049EJ0600 Rev 6 00 ae Page 42 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 1 Setting of programming environment Set the programming environment following the steps lt 1 gt to lt 7 gt described below lt 1 gt Click the Device menu on the menu bar and then click Setup lt 2 gt The Device Setup dialog box appears in which the Standard tab is active Figure 3 17 Standard Tab of Device Setup Dialog Box Device Setup Standard Advanced Farameter File FRAM File Read Target Device Connection Supple Oscillator a pot SO mo Speed Operation Mode G Start 2 End lt 3 gt Click th
159. out using MINICUBE2 write the user program using the QB Programmer Programs downloaded by the debugger include the monitor program and such a program malfunctions if it is not controlled via MINICUBE2 9 Caution on protect byte Set the protect byte so as to permit programming to the entire block and erasing of the entire block R20UT0049EJ0600 Rev 6 00 Page 125 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a 78KOS microcontroller using MINICUBE2 5 3 1 Specifications of programming function Table 5 5 Specifications of Programming Function Power Power supply 3or5V 3 or 5 V maximum current rating 100 mA Ss current rating 100 mA a s Acquisition of device specific Parameter file for MINICUBE2 made by Renesas Electronics is used information Security flag setting Available Standalone operation Unavailable must be connected to host machine 5 3 2 System configuration Figure 5 17 illustrates the system configuration for flash programming Figure 5 17 System Configuration for Flash Programming xan SS k lt 5 gt prr lt 3 gt lt 6 gt g NEG ELECTRONICS Target system lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the QB Programmer USB driver parameter files and so
160. p Dialog Box After Get Security Settings Execution Device Setup Standard 4dyvanced Command options Read vernfty after Program W Security flag after Program Checksum after Program Security flag settings Disable Chip Erase Digable Block Erase End Boot block Disable Program Show Address Disable Read Disable Boot block cluster reprogramming R20UT0049EJ0600 Rev 6 00 ae Page 44 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt 6 gt Next set the items in the Command options and Security flag settings areas in accordance with your programming environment The following figure shows an example Figure 3 21 Advanced Tab of Device Setup Dialog Box Device Setup Standard Advanced Command options W Blank check before Erase W Security flag after Program Checksum after Program Security flag settings Disable Chip Erase Disable Black Erase End Boot block O00 Disable Prograrn Show Address Ww Disable Read Disable Boot block cluster reprogramming lt 7 gt By clicking the button the programming environment is set and the Device Setup dialog box is closed The main window appears as follows Figure 3 22 Completion of Programming Environment Setting ia OB8 Proerammer File Device Help Pra gt QB Programmer startup Programmer gt Command standby QB Progrmmer 1 00 Firmware
161. peed 115200bps Operation Mode Chip Stark f Block End lt 5 gt Next set the items in the Command options and Security flag settings areas in accordance with your programming environment The following figure shows an example Figure 5 23 Advanced Tab of Device Setup Dialog Box Device Setup Standard Advanced Command options W Blank check before Erase Securty flag after Program Security flag settings Disable Chip Erase Disable Block Erase Disable Prograrn R20UT0049EJ0600 Rev 6 00 ae Page 131 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt 6 gt By clicking the button the programming environment is set and the Device Setup dialog box is closed The main window appears as follows Figure 5 24 Completion of Programming Environment Setting ia OB Proerammer File Device Help bOB Frogrammer startup Programmer gt Command standby QB Programmer 1 00 gt Firmware Y2 00 gt Device Setup Parameter File Read Pass gt Device Mame Firmware Parameter file Name MOF 9254 prm Version 1 02 Load file Mame Date Chksum Area Connection to device Fort UART ch Pulse Speed 115200bp Range Chip Freg 8 00MHz Multiply 1 00 R20UT0049EJ0600 Rev 6 00 ae Page 132 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCO
162. r 1 Preparation and installation of software The following software is required to perform on chip debugging For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e Debugger e USB driver e Device file may be unnecessary when using a partner manufacture s debugger 2 Switch setting Set the mode select switch to M1 Set the power select switch by referring to Table 6 5 Caution Do not change the switch setting while the USB cable is connected Table 6 5 Setting of Power Select Switch 3 V is supplied from MINICUBE2 to the target system 5 V is supplied from MINICUBE2 to the target system T Power supply of the target system is used MINICUBE2 only detects the power for the target system Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 6 9 before the power to the target system is turned on Figure 6 9 Connecting MINICUBE2 to Target System 7 D r 16 pin target cable MINICUBE2 g Target system R20UT0049EJ0600 Rev 6 00 Page 146 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 4 Connecting the USB cable Connect MINICUBE2 to the host machine as
163. r from the Start menu of Windows The mode LED glows green after QB Programmer Startup A series of basic operations after this step is described in the following section For detailed usage of the QB Programmer refer to the QB Programmer Programming GUI Operation User s Manual Page 159 of 178 QB MINI2 6 3 4 Usage examples CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER This section describes a series of basic operations using the QB Programmer using the PD78F1166 as an example The operations from execution of the Autoprocedure EPV command to programming for the target device are described For other commands and their applications refer to the QB Programmer Programming GUI Operation User s Manual The conditions used for a series of operations in this section are as follows lt Target system gt Target device Power supply voltage Communication channel lt MINICUBE2 gt Switches lt QB Programmer gt Parameter file Clock setting Operation mode Program file Command options R20UTO049EJ0600 Rev 6 00 Mar 31 2011 uPD78F 1166 5 V supplied from MINICUBE2 UART 1 Mbps Mode select switch M1 Power select switch 5 78F1166 PRM None internal high speed oscillation clock is used chip sample hex Blank check before Erase selected Read verify after Program selected CENESAS Page 160 of 178 QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 1 Se
164. rate normally 2 The clock signal generated by the clock circuit on the target system or by the internal high speed oscillator of the device can be used for the clock signal of the target device during on chip debugging Only the internal high speed oscillator of the device can be used during flash programming 3 During on chip debugging the settings specified by the user program are ignored because these pins are used as pins dedicated to on chip debugging However if the pins are specified as input pins the pins must be processed because they are left open when MINICUBE2 is not connected 4 This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected This processing is not required if the pins are set to output When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device 5 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 Q or less For details refer to 4 1 3 Connection of reset pin R20UT0049EJ0600 Rev 6 00 ae Page 62 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic
165. refer to 4 1 3 Connection of reset pin The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports Connect any port that can output data to FLMDO via a resistor When not using flash self programming process the pins according to the device specifications This is the processing for the pins that are unused the inputs are left open when the target device operates when MINICUBE2 is not connected When changing the resistance refer to APPENDIX A EQUIVALENT CIRCUIT and make sure that the change does not affect operation before using the device To use FLMD1 connect it to FLMD1 of MINICUBE2 Page 57 of 178 QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering Notes 1 R20UTO049EJ0600 Rev 6 00 Mar 31 2011 RENESAS specifications of the target devices noise characteristic of the circuit etc Figure 4 6 When Both Debugging and Programming Are Performed Not communicating by using the OCD1A and OCD1B pins or using the X1 oscillator Vop Vo Target connector Target device Note 6 RESET OUT RxpNote 1 Vpop TxD 1 R F U R F U R F U CLs OCD1A t 3 R F U EU i i OCDOA X1 F U o OCDOB x2 1k to R F U 10 kQ OcD1B R F U Reset connector RESET Connect TxD transmit side of the target dev
166. reg Internal OSC Multiply 1 00 R20UT0049EJ0600 Rev 6 00 Page 163 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 2 Selection of program file Select the program file following the steps lt 1 gt to lt 3 gt described below lt 1 gt Click the File menu on the menu bar and then click Load lt 2 gt The program file select dialog box appears Figure 6 24 Program File Select Dialog Box File name regs hex Files of type 5 rec Hex files rec 3 hex Cancel lt 3 gt Select the program file for the target device and then click the button Figure 6 25 Completion of Program File Selection ia QB Programmer File Device Help PAWS gt QB Programmer startup Programmer gt Command standby QB Programmer W2 00 b Firmware wg o0 gt Device Setup Parameter File Read PASS Device Mame gt 0pen Load File Firmware Success read Load tile Parameter file Name 78F1166 prm Version 1 00 Load file Name SAMPLE HEX Date 2006 02724 21 13 10 Chksum E23Eh Area QOU000h 007FFFR File checksum Type Chksum Area Connection to device Fort UAR T ch Pulse Speed 1Mbps Range Chip Freg Internal OSC Multiply 1 00 R20UT0049EJ0600 Rev 6 00 Page 164 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 3 Execution of Autop
167. ring updates RAM information in byte units Therefore even if information is displayed in word units in the debugger there will be a difference of a few ms in updating the higher and lower byte data Note Devices with OCD control code V1 xx Version can be checked by selecting About from the Help menu in the debugger R20UT0049EJ0600 Rev 6 00 Page 91 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER 11 Caution on mounting a clock on 78K0 OCD board When a clock is mounted on the 78KO OCD board power supply may not become the GND level even if the power to the target system is shut down 12 Emulation of POC function If power supply to the target system is turned off during debugging the target device enters the reset state by the RESET_OUT pin of MINICUBE2 Consequently the target device s POC function performs pseudo emulation Note that there is an error of 1 V between the POC detection voltage and the target system voltage Note that the POC detection voltage might be 1 V higher than that of the target device 13 Device with without on chip debug function Only the devices with the on chip debug function can be debugged See the user s manual of the target device for checking whether it is equipped with the on chip debug function To debug a device without the on chip debug function perform debugging by using an upper compatible product The following shows an example
168. riting of debug monitor program If the CPU operating clock setting is changed by the debugger the debugger rewrites the debug monitor program At this time it takes about a dozen seconds for this operation When using Renesas Electronics debugger ID850QB this specification applies when the setting in the Clock area in the Configuration dialog box 8 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 9 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 10 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 11 Debugging with real machine running without using MINICUBE2 lf debugging is performed with a real machine running without using MINICUBE2 write the user program using the QB Programmer Programs downloaded by the debugger include the monitor program and such a program malfunctions if it is not controlled via MINICUBE2 12 Cautions unique to devices e V850ES Fx3 Note the following two points when debugging the V850ES Fx3 as the target microcontroller lt 1 gt When the MINICUBE2 is connected to the targe
169. rocedure EPV command Click the Device menu on the menu bar and then click Autoprocedure EPV The Blank Check Erase if the flash memory in the target device is not blank Program and Verify commands are executed for the target device sequentially The mode LED on MINICUBE2 flashes yellow during execution When the command execution is completed normally the mode LED glows green and the following window appears Figure 6 26 Completion of Autoprocedure EPV Command Execution ia QB Programmer File Device Help PAWS gt AutoProcedurelE py 100 Verify FASS AutoProcedure E py PASS gt R20UT0049EJ0600 Rev 6 00 Mar 31 2011 CENESAS Programmer QE Programmer W2 00 Firmware Hame W4 00 Device Firmware Hame Version Name Date Parameter file fF 1166 previ 1 00 Load tile SAMPLE HE 2006 02 24 21 13 10 Chksum E23Eh Area Type gt OOOOO0h O0 FFFh File checksum Chksum Area Fort Pulse Speed Range Freq Multiply Connection to device UART ch 0 Mbps Chip Intermal 0SC 1 00 Page 165 of 178 QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 3 5 System shutdown procedure Terminate flash programming and shutdown the system in the following order If the following order is not observed the target system or MINICUBE2 may be damaged 1 Terminating the QB Programmer Terminate the QB
170. s document No license express implied or otherwise is granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable c
171. sed when the debugger is started for the first time when downloading the monitor program and when programming is performed with the QB Programmer It is not necessary to use the X1 and X2 pins if the monitor program has already been downloaded to the target device so the X1 and X2 pins and their alternate functions can be debugged by using the following procedures To implement debugging of the X1 and X2 pins the circuit must be designed appropriately For details refer to 5 1 5 Connection of X1 and X2 pins 1 Disconnect the external parts connected to the X1 and X2 pins in the target device lf the circuit is designed as shown in Figure 5 11 short jumper pins 1 and 2 2 Turn on power to the target system and MINICUBE2 in accordance with 5 2 3 System startup procedure 3 Start the debugger At this time do not download the load module The monitor program will be downloaded automatically immediately after startup Terminate the debugger 5 Turn off power to the target system and MINICUBE2 in accordance with 5 2 4 System shutdown procedure Connect the external parts to the X1 and X2 pins in the target device If the circuit is designed as shown in Figure 5 11 short jumper pins 2 and 3 7 Turn on power to the target system and MINICUBE2 in accordance with 5 2 3 System startup procedure 8 Start the debugger Note lf a project has already been created in the project manager PM the load module will automati
172. sh 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 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 Read the following chapters if you are using MINICUBE2 for the first time with a 78KOR microcontroller as the target device e 6 1 Target System Design For communication between MINICUBE2 and the target system communication circuits must be mounted on the target system This section describes the circuit design and mounting of connectors e 6 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with MINICUBE2 e 6 3 Flash Programming This section describes the system configuration and startup method to perform flash programming with MINICUBE2 R20UT0049EJ0600 Rev 6 00 ae Page 136 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming Figure 6 1 presents an overview of the MINICUBE2 communication interface As shown on the left
173. sheets or data books etc Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the
174. sing a project file as well as when using PM Leag lv Symbol F Obiact Select the Object check box and hl i l l HI then download the project file lw Erase 9 Cautions when stepping into code Some SFRs special function registers might remain stopped while stepping into code If the operation of the SFRs does not advance 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 Cautions when using pseudo real time RAM monitor function lt 1 gt The user program is stopped while the pseudo real time RAM monitor function processing is being performed Example When 78KOKx2 30 x n 1 ws per n bytes when operating at 20 MHz When 78KOKx2 L 120 x n 1 us per n bytes when operating at 20 MHz lt 2 gt lf the pseudo real time RAM monitor function is executed during a standby state the standby state is released lt 3 gt If the clock signal switches to that generated by the internal low speed oscillatorN t or to the subsystem clock signal by the user created program when pseudo real time RAM monitoring is performed pseudo real time RAM monitoring stops The user created program is stopped for about 200 clock cycles by pseudo real time RAM monitoring lt 4 gt Pseudo real time RAM monito
175. t 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 MINICUBE2 is inverted so observe the conditions described below in Remark Figure 5 3 Circuit Connection with Reset Circuit That Contains Buffer MINICUBE2 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 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 below in Remark Figure 5 4 Circuit Connection with Reset Circuit That Contains No Buffers MINICUBE2 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 R20UT0049EJ0600 Rev 6 00 ae Page 108 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 2 Manually switching the reset signal with jumper Figure 5 5 i
176. t switch 1 Mode select switch This switch is used to select the target device Table 2 1 describes the setting details This switch is set to M2 at shipment Table 2 1 Description of Mode Select Switch Sets 78KOS or 78KOR microcontroller as target device Sets V850 or 78KO microcontroller as target device factory setting 2 Power select switch This switch is used to set the power supplied to the target system Table 2 2 describes the setting details This switch is set to 3 at shipment Caution Do not change the switch setting while the USB cable is connected Table 2 2 Setting of Power Select Switch 3 3 V is supplied from MINICUBE2 to the target system Factory setting The supplied power is fed back to MINICUBE2 and used only for power detection 5 5 V is supplied from MINICUBE2 to the target system reese ee T Power supply of the target system is used diecast O o Note The maximum rating of the current is 100mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine R20UT0049EJ0600 Rev 6 00 Page 12 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE 3 USB interface connector This is a connector used to connect MINICUBE2 with the host machine via a USB cable A USB 2 0 compliant mini B connector UX60A MB 5ST Made by Hirose Electric Co Ltd
177. t system via UARTDO fRH cannot be used as the CPU clock The debug monitor program will change the MCM register setting so as to select the main clock oscillator clock after the reset If the MCM register setting is changed by the user program the debugger operation will become invalid lt 2 gt When using the pseudo RRM function or the DMM function with the ID850QB set the result of the following calculation as the Multiply rate in the Configuration dialog box Multiply rate 8 x PLLO x PLLI Example When PLLO 1 2 and PLLI 1 2 Multiply rate 8 x 1 2 x 1 2 2 R20UT0049EJ0600 Rev 6 00 Page 37 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER e V850E MA3 Note the following two points when debugging the V850E MAS3 as the target microcontroller lt 1 gt If the Multiply rate is set to 1 25 or 2 5 in the Configuration dialog box when using the ID850QB these values will be an integer 1 or 2 when the Configuration dialog box is opened the next time This is only a problem of the debugger s display so the actual CPU clock is not affected lt 2 gt When the CKSEL pin is low level PLL mode and the target interface is CSI set the Multiply rate in the Configuration dialog box to 10 and then start the debugger This process is required because the clock is fixed to one multiplied by 10 in the device specifications for the instance of writing the debug monitor program in th
178. tartup procedure This section describes the system startup procedure Observe the following order 1 Preparation and installation of software The following software is required to perform on chip debugging For details on preparation and installation of software refer to the setup manual supplied with MINICUBE2 e Debugger e USB driver e Device file may be unnecessary when using a partner manufactureefs debugger 2 Switch setting Set the mode select switch to M1 Set the power select switch by referring to Table 5 4 Caution Do not change the switch setting while the USB cable is connected Table 5 4 Setting of Power Select Switch 3 V is supplied from MINICUBE2 to the target system 5 V is supplied from MINICUBE2 to the target system T Power supply of the target system is used C OO O Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 5 14 before the power to the target system is turned on Figure 5 14 Connecting MINICUBE2 to Target System 7 D 16 pin target cable MINICUBE2 g Target system R20UT0049EJ0600 Rev 6 00 Page 116 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 4 Connecting the USB
179. tem is automatically selected for Main Clock in the Configuration dialog box of the debugger Main Glock Glock Socki f 7 Externe f System 4 00 MHz In this case the selected system is used for communication between MINICUBE2 and the target device Therefore the download time which depends on the communication speed can be shortened if the 16 MHz clock for the system is specified instead of the 4 MHz clock for the system b Using the clock generated in MINICUBE2 only when OCDOA and OCDOB or TOOLDO and TOOLCO are used Remove the 78K0O OCD board oscillator or the oscillation circuit System is automatically selected for Main Clock in the Configuration dialog box of the debugger For details about the setting see the debugger user s manual Main Glock ook Socket External System 4 00 MHz Cle R20UT0049EJ0600 Rev 6 00 Page 79 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78KO MICROCONTROLLER c Using the oscillator connected to the 78K0 OCD board only when OCDOA and OCDOB or TOOLDO and TOOLCO are used Connect an oscillator or oscillation circuit to CLK1 on the 78KO OCD board Clock Board is automatically selected for Main Clock in the Configuration dialog box of the debugger The same frequency as that of the target device can be used Main Glock f Glock Board Eat C i fa i M Mount the 14 pin oscillator 5 V CMOS typ
180. the targets to be monitored are too numerous the operability of the debugger may be affected because the monitoring speed is slow when using the pseudo RRM function in 1 wire mode When using the ID78KOR QB therefore monitoring by using the Watch window rather than the Memory window is recommended Page 156 of 178 QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for a 78KOR microcontroller using MINICUBE2 6 3 1 Specifications of programming function Table 6 7 Specifications of Programming Function Power Power supply 3 or 5 V maximum current 3 or 5 V maximum current rating 100 mA ss S sSY 100 mA Acquisition of device specific Parameter file for MINICUBE2 made by Renesas Electronics is used lt R gt information Security flag setting Available Standalone operation Unavailable must be connected to host machine 6 3 2 System configuration Figure 6 16 illustrates the system configuration for flash programming Figure 6 16 System Configuration for Flash Programming f ah SS Ss lt 5 gt lt 4 gt lt 3 gt g y aii Target system lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the QB Programmer USB driver parameter files and so on Download these Renesas Electronics software from the following we
181. tner manufacture s debugger 2 Switch setting Set the mode select switch to M2 Set the power select switch by referring to Table 3 5 Caution Do not change the switch setting while the USB cable is connected Table 3 5 Setting of Power Select Switch ie 4 3 V is supplied from MINICUBE2 to the target lai C 5 V is supplied from MINICUBE2 to the target system Power supply of the target system is used MINICUBE2 detects the power for the target system The detected power is also used as the power supply for the communication interface Note The maximum rating of the current is 100 mA so do not use MINICUBE2 with the target system with the higher current rating The power is always supplied after MINICUBE2 is connected to the host machine 3 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 3 10 before the power to the target system is turned on Figure 3 10 Connecting MINICUBE2 to Target System a See w mea 16 pin target cable MINICUBE2 Target system R20UT0049EJ0600 Rev 6 00 6 Page 27 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 4 Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 3 11 before the power to the target system is turned on When the power select switch is set to T the mode LED flashes white after connection When the power select switch is set to 3
182. to the target system The mode LED glows white after connection Figure 7 2 Connecting MINICUBE2 to Host Machine tS aIl MINICUBE2 USB cable Host machine Startup of MINICUBE2 diagnostic tool Start the MINICUBE2 diagnostic tool If the MINICUBE2 diagnostic tool was installed when Renesas Electronics software was installed the diagnostic tool is registered on the Start menu as follows e NEC Electronics gt MINICUBE Utilities gt Vx xx version For the operation after this step refer to the user s manual for the MINICUBE2 diagnostic tool Page 168 of 178 QB MINI2 CHAPTER 8 SELF FIREWARE UPDATE CHAPTER 8 FIRMWARE UPDATE Firmware is a program embedded in the device for controlling MINICUBE2 The following can be implemented by updating firmware e Addition of supported devices e Correction of restrictions This chapter describes the method for checking firmware version system configuration and firmware update procedure Note that MINICUBE2 may no longer operate if firmware is updated incorrectly 8 1 System Configuration Figure 8 1 illustrates the system configuration for updating firmware Figure 8 1 System Configuration for Firmware Update lt 4 gt lt 3 gt NEG ELECTRONICS lt 2 gt lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the USB driver and MINICUBE2 diagnostic tool These software can be installed when a Renesas Electronics debugger or QB Pro
183. tting of programming environment Set the programming environment following the steps lt 1 gt to lt 6 gt described below lt 1 gt Click the Device menu on the menu bar and then click Setup lt 2 gt The Device Setup dialog box appears in which the Standard tab is active Figure 6 19 Standard Tab of Device Setup Dialog Box Device Setup Standard Advanced Farameter File FRAM File Read Target Device Connection Supple Oscillator a pot SO mo Speed Operation Mode G Start 2 End lt 3 gt Click the PRM File Read button to open the Parameter File Select dialog box Select the parameter file for the target device and then click the button Figure 6 20 Parameter File Select Dialog Box Filename 78F1166 prm Files of type PRM Files PRM Cancel R20UT0049EJ0600 Rev 6 00 ae Page 161 of 178 Mar 31 2011 lt ENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt 4 gt Set the items in the Target Device Connection Operation Mode and Supply Oscillator areas in accordance with your programming environment The following figure shows an example Figure 6 21 Standard Tab of Device Setup Dialog Box After Setting Device Setup Standard Advanced Parameter File SF 11766 prm PAM File Read Target Device Connection Supple Oscillator r Fort UART chO Frequency Speed 1Mbps Multiply rate Operation Mode
184. ues of these bits are undefined after setting However be sure to set these bits to initial values 0 1 0 How to set The following shows a setting example when using Renesas Electronics assembler RA78KOR or compiler CC78KOR Seta value for the Control Value text box under the On Chip Debug Option Bytes go check box as shown in the figure below Example Setting 0x85 for control value R20UT0049EJ0600 Rev 6 00 Page 151 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 6 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER Figure 6 13 On Chip Debug Option Byte Setting Example Linker Options Output Output Library Others Load Module File o Output File Hame KOR_TEST Browse iM Output Symbol Information g Create Error List File e eee i On Chip Debug Option Bytes ga Security D gi Control Yalue 85 H Start Address SFLOO H Size i D24 bytes W Allow G4E bytes Boundary cczal Command Line Options _ qoo5h 3FCO0K 1024 pa map Cancel Apply Help Caution If bit 7 QCDENSET of the on chip debug option byte area address 0xC3 is set to 0 by flash programming or self programming debugging is disabled and the debugger can no longer start unconditionally To enable debugging erase the flash memory by flash programming c Security ID area This is the area for the security setting to prevent the flash memory from being read by an unauthorized person T
185. uit enclosed by a dashed line is not required when only flash programming is performed 6 The circuit enclosed by a dashed line is designed for flash self programming which controls the FLMDO pin via ports Use the port for inputting or outputting the high level When flash self programming is not performed a pull down resistance for the FLMDO pin can be within 1 to 10 kQ 7 This is for pin processing when not used as a device To change this value to another resistance value see APPENDIX A EQUIVALENT CIRCUIT R20UT0049EJ0600 Rev 6 00 Page 19 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER lt R gt Caution The following figure shows the recommended circuit Be sure to design the circuit considering specifications of the target devices noise characteristic of the circuit etc Figure 3 3 Recommended Circuit Connection When CSI H S Is Used for Communication Interface EV bp EVpp EVobp EVbp dod Target connector ik to 10kQNote 3k to 10kQNote Target device 1k to 10kQh e 1k to 10kQ Clock circuit Note 4 15 eee 1k to 10kQN EVbp x 1kQ Reset connector RESET signal Notes 1 Connect SO transmit side of the target device to SI receive side of the target connector and SO transmit side of the target connector to SI receive side of the target device Read the serial interface pin names on the target devi
186. used for communication between MINICUBE2 and the target device are masked e Standby mode is entered while standby release by a maskable interrupt is prohibited e Mode for communication between MINICUBE2 and the target device is UART and the main clock has been stopped e Mode for communication between MINICUBE2 and the target device is UART and a clock different from the one specified in the debugger is used for communication 4 Standby release with pseudo RRM and DMM functions enabled The standby mode is released by the pseudo RRM function and DMM function if one of the following conditions is satisfied e Mode for communication between MINICUBE2 and the target device is CSI H S e Mode for communication between MINICUBE2 and the target device is UART and the main clock has been supplied 5 Writing to peripheral I O registers that requires a specific sequence using DMM function Peripheral I O registers that requires a specific sequence cannot be written with the DMM function R20UT0049EJ0600 Rev 6 00 Page 36 of 178 Mar 31 2011 2CENESAS g QB MINI2 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 6 Device with which the debugger startup is slowed When the debugger is started for the first time chip erasure and writing of debug monitor program are performed The following devices require about a dozen seconds for these operations V850ES JG2 V850ES JJ2 V850ES HE2 V850ES HF2 V850ES HG2 V850ES HJ2 V850ES IE2 7 W
187. when using the 78KO KF2 Target Device On Chip Debug Function Device for Debugging Device File DF Used for oe uPD78F0544 Not equipped uPD78F0547D DF DF for uPD78F0544 uPD78F0544 uPD78F0545 Set the IMS and IXS registers to DF for PD78F0545 UPD78F0546 values according to the target device DF for PD78F0546 4uPD78F0547 DF for uPD78F0547 15 Cautions when debugging with only the real device without using MINICUBE2 lt R gt When debugging with only the real device i e without using MINICUBE2 it is recommended that the user program be written by QB Programmer The operation of the program that is downloaded by the debugger differs from the actual operation because the monitor program performs the processing after reset lt R gt 16 Cautions when reading the location and the reserved area where SW HW breaks are set When the addresses where the software breaks are set are read the data read from the addresses differ from the actual data When the addresses where the hardware breaks are set are read breaks occur When the addresses where are reserved for MINICUBE2 the operations differ depending on the following usages by the software breaks When software breaks are not used The data read from the addresses may differ from the actual data When software breaks are used The data read from the addresses may differ from the actual data or breaks may occur R20UT0049EJ0600 Rev 6 00 ae Page 92 of 178 Mar
188. ws white after power application QB Programmer startup Start the QB Programmer from the Start menu of Windows The mode LED glows green after QB Programmer Startup A series of basic operations after this step is described in the following section For detailed usage of the QB Programmer refer to the QB Programmer Programming GUI Operation User s Manual Page 128 of 178 QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 3 4 Usage examples This section describes a series of basic operations using the QB Programmer using the wPD78F9234 as an example The operations from execution of the Autoprocedure EPV command to programming for the target device are described For other commands and their applications refer to the QB Programmer Programming GUI Operation User s Manual The conditions used for a series of operations in this section are as follows lt Target system gt Target device uPD78F9234 Power supply voltage 5 V supplied from MINICUBE2 Communication channel UART 115 200 bps lt MINICUBE2 gt Switches Mode select switch M1 Power select switch 5 lt QB Programmer gt Parameter file 78F9234 PRM Clock setting 8 MHz supplied from MINICUBE2 Operation mode chip Program file sample hex Command options Blank check before Erase selected Checksum flag after Program selected R20UT0049EJ0600 Rev 6 00 Page 129 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE
189. ystem as is illustrated in Figure 5 2 Recommended Circuit Connection See Figure 5 7 2 MINICUBE2 is used only for programming not for debugging See Figure 5 8 3 MINICUBE2 is used for debugging and debugging of the INTP pin is performed only with a real machine See Figure 5 9 Figure 5 7 Circuit Connection for the Case Where INTP Pin Is Not Used in Target System Vop Target connector Target device Figure 5 8 Circuit Connection for the Case Where MINICUBE2 Is Used Only for Programming Target connector Target device INTP 12 INTP R20UT0049EJ0600 Rev 6 00 Page 110 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER Figure 5 9 Circuit Connection for the Case Where MINICUBE2 Is Used for Debugging and Debugging of INTP Pin Is Performed Only with Real Machine Vop 1 kQ Target connector Target device External device I O to INTP Jumper setting When debugging with MINICUBE2 connected 1 2 shorted Other than above 2 3 shorted Caution If debugging is performed with a real machine running without using MINICUBE2 write the user program using the QB Programmer Programs downloaded by the debugger include the monitor program and such a program malfunctions if it is not controlled via MINICUBE2 R20UT0049EJ0600 Rev 6 00 Page 111 of 178 Mar 31 2011 RENESAS QB MINI2 CHAPTER 5 HOW TO USE MINICUBE2 WITH V850 MICROCONTROLLER 5 1 5 Connecti
Download Pdf Manuals
Related Search
Related Contents
Instalación de la fuente de alimentación Downloading - MadAnalysis STR-DE310 Delta 2155-DST Installation Guide Media Standby Eliminator - Instructions - Spanish and AN-9035 Smart Power Modle Motion-SPM in Mini Indiaral® azbil report 2009 Copyright © All rights reserved.
Failed to retrieve file