Home
Preliminary User`s Manual
Contents
1. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 31 134 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 e 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 Monitor Programs for Debugging Are Allocated Internal ROM space Internal RAM space Internal ROM end address 10 to 16 bytes Internal RAM end address CSI or UART receive interrupt vector 10 bytes 0x70 security ID area 4 bytes PON 0x60 interrupt vector for debugging 4 bytes 0x0 reset vector E Debugging area 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 emb
2. PRIM Device file Name T8FOBSS prim Format 0414 Version WT Ol Processor Wer 0200 Load file Name Date Ghk sum rea Connection to device Port UART speed 2600 Range Chip Freq 0 00 Multiple 1 00 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 94 134 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 4 40 Program File Select Dialog Box Look ir E HEA ei Ed E sample hex File name 3 Star e Files of type S 18c Hex files rece hex Cancel lt 3 gt Select the program file for the target device and then click the button Figure 4 41 Completion of Program File Selection Ea OB Programmer BR File Device View Help gt FlashOpennine Device Flash Open OK Name gt COMMAND Device Setup Device File Read OF Firm Version gt COMMAND Open Load File Ext ude success read HEA file Vendor PRM Device file Name Y8FORSS orm Format 01414 Version 449 03 Processor Wer 0200 Load file Name SAMPLE HEX Date 2006 04 05 16 52 18 Ghksum EXS3GERh rea ODO000r 007F FF Connection to device Port UART Speed 115200 Range Chip Freq 0 00 Multiply 1 00 Q
3. MINICUBE2 can supply a clock to be used as the high speed system clock The setting of the 78K0 OCD board must be performed according to the following clock supply methods 1 to 3 1 Using a clock mounted on the 78K0 OCD board 2 Using a clock 4 8 or 16 MHz generated in MINICUBE2 3 Using a clock mounted on the target system The settings for 1 to 3 are described below Supplying a clock used as the subsystem clock is not supported 1 Using a clock mounted on the 78K0 OCD board A clock generated by the oscillator mounted in CLK1 of the 78K0 OCD board or the oscillator clock can be supplied to the target device The usable frequency is the same as that of the target device Refer to a when using the oscillator or b when mounting an oscillator a When using oscillator Mount the 14 pin oscillator 5 V CMOS type in CLK1 of the 78K0 OCD board as shown in Figure 4 24 Figure 4 24 Mounting Oscillator 5V ni CLK1 14 pin type Clock O O 0000000 0000000 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 75 134 b When mounting an oscillator by using resonator Refer to Figure 4 25 and mount an oscillator in CLK1 of the 78K0 OCD board Figure 4 25 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 25 78K0 OCD Board Mounting Diagram and CLK1 Equivalent Cir
4. Notes 1 This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 2 or less For details refer to 4 1 3 Connection of reset pin 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 MINICUBEZ2 is not connected 3 During debugging the clock mounted on the 78K0 OCD board can be supplied If no clock is mounted a clock of 4 8 or 16 MHz can be supplied neither of them is used for the CPU operating clock 4 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 60 134 Figure 4 9 When Only Programming Is Performed Vop Vop Vop 3 to 10 kQ l Target connector Target device RESET OUTNote 1 RxDNote 2 E 3 l 6 R F U 1 to 10 kQ R F U RF u CLKNote 3 9 R F u 0 R F u 1 RE U 11 DATA S FLMDO 114 FLMDO RESET_IN R F U Vpb 1 to 10 kQ 10 kQ 1 KQ
5. Reset connector 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 2 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 This pin can be used to supply an external clock 4 8 or 16 MHz For the connection refer to the user s manual for the target device If this pin is not used leave it open QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 61 134 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 connection 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 conne
6. 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 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 39 134 3 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for the V850 Series using MINICUBE2 3 3 1 Specifications of programming function Table 3 6 Specifications of Programming Function Host interface USB 2 0 compatible with 1 1 UART or CSI H S 2 7 to 5 5 V depends on the target device 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 NEC Electronics PG FP4 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
7. El with an RRM generated while a user program main routine is running gt Redraw Interval sampling time One cycle Several ms to over 10 ms alow lalo Bo ish _ The A period occurs for the number of the RRM point bytes 1 A approx 110 us Pseudo real time RAM monitor function processing in progress during a break RRM data collection and RRM data transmission B approx 1 ms User program is running User program is running sampling time A A B x sampling range 12 Caution on mounting a clock on 78K0 OCD board When a clock is mounted on the 78K0 OCD board power supply may not become the GND level even if the power to the target system is shut down 13 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 87 134 4 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for the 78KO Series using MINICUBE2 4 3 1 Specifications of programming function Table 4 10 Specifications of Programming Function Specifications Host interface USB 2 0 compatible with 1 1 Target interface UART Target system voltage 2 7 to 5 5 V depends on the target device Clock supply 16 8 or 4 MHz clock can be supplied Clock mounted on the target s
8. Load tile Mame SAMPLEHEX Date 2005 04 05 16 52 18 Chksum EAsEh rea D00000r 007FFFR Connection to device Port UART Speed 115200 Range Chip Freq 0 00 Multiply 1 00 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 96 134 4 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 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 3 or 5 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 under
9. 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 34 Connecting MINICUBE2 to Host Machine ey 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 the QB Programmer User s Manual QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 90 134 4 3 4 Usage examples This section describes a series of basic operations using the QB Programmer using the PD78F0547D 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 lt MINICUBE2 gt Switches Mode
10. 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 Interrupts are disabled DI Interrupts issued for the serial interface which is used for communication between MINICUBE2 and the target device are masked Standby mode is entered while standby release by a maskable interrupt is prohibited 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 Interrupts are disabled DI Interrupts issued for the serial interface which is used for communication between MINICUBE2 and the target device are masked Standby mode is entered while standby release by a maskable interrupt is prohibited Mode for communication between MINICUBE2 and the target device is UART and the main clock has been stopped 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 Mode for communication
11. 14 System Configuration for Flash Programming S gt lt 3 gt 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 on Download these NEC Electronics software from the following website ODS URL http www necel com micro ods eng 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 40 134 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 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 3 7 Setting of Power Select Switch Setting 3 V is supplied from MINICUBE2 to the target system 5 V is supplied from MINICUBEZ2 to the target system T Power supply of the target system is used MINICUBE2 detects the power for the target system The detec
12. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 6 134 Terminology The meanings of the terms used in this manual are as follows 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 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 combination with this manual The related documents listed below may include preliminary versions However preliminary versions are not marked as such O Documents Related to Development Tools User s Manuals 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 7 134 CONTENTS CHAPTER 7 OVER VIEW Socia ads 9
13. For Debugging For Programming GND RA PA so _ Pe gt e RFU o H S sa b PRU BOOODOOW 19494349 OOO Pin assignment of target connector to be mounted on target system 1 1 R EU Note Signal names in MINICUBE2 Table 5 2 Pin Functions IN OUT RESET_IN Pin used to input reset signal from the target system RESET_OUT our Pin used to output reset signal to the target device OUT Pin used to output clock signal to the target device Pin used to output clock signal to the target device and to set the target device to programming mode Pin used to receive commands or data from the target device and to transmit commands or data to the target device OUT IN OUT Pin used to input handshake signal from the target device INTP Pin used to set the target device to debug mode R F U This pin is not used so leave it open Note As seen from MINICUBE2 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 100 134 5 1 2 Circuit connection example Refer to Figure 5 2 and design an appropriate circuit Caution The constants described in the circuit connection example are reference values If you perform flash programming aiming at mass production thoroughly evaluate whether the specifications of the target device are satisfied Figure 5 2 Recommended Circuit Connection Vo Vo Target connector Target device 3 to 10 kQ RESETNote 1 a o Vop 1 kQ X1 Note 2 GND RESET_OUT DATA VDD DATA R F U R
14. IN_ Pin used to input handshake signal from the target device REU o This pin is not used so leave it open Note As seen from MINICUBE2 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 19 134 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 20 134 Figure 3 2 Recommended Circuit Connection When UART Is Used for Communication Interface Vo Vo Vo Target connector 3 to 10 kQ Target device RESET_OUT Notes 1 e m SP ae R F U R F U R F U caine Clock circuit 10 kQ 100 Q Reset connector RESET signal 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 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 d
15. MINICUBE2 Target system Host machine QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 18 134 3 1 1 Pin assignment 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 TOP VIEW Pin No CSI H S Used UART Used GND RESET OUT R F U eo RR 7 isch se ms RU ao dak o S O EC REU o 12 FIM o ario O 15 RESET IN O 16 REFU Note Signal names in MINICUBE2 BOOODOOW 19494349 OOO Pin assignment of target connector to be mounted on target system Table 3 2 Pin Functions PinName mout Description S PRESETIN iN Pin used to input reset signal from the target system RESETOUT OUT Pin used to output reset signal to the target device ck OUT __ Pin used to output clock signal to the target device FLMDO OUT Pin used to set the target device to debug mode or programming mode FLMD1 Pin used to set programming mode Pin used to set programming mode RxD SIZ iN Pin used to receive command data from the target device Toso OUT Pin used to transmit commandidata to the target device sek our Pin used to output clock signal for 3 wire serial communication _ Hs
16. Preliminary User s Manual ZUD CD 06 0018 1 105 134 Figure 5 9 Circuit Connection for the Case Where MINICUBE2 Is Used for Debugging and Debugging of INTP Pin ls Performed Only with Real Machine Vo 1kQ Target connector Target device External device I O to INTP e 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 106 134 5 1 5 Connection 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 gt 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 Vop Target connector Target device 3 to 10 kQ 1 to 10 kQ Figure 5 11 Circuit Connection for the Case Where X1 and X2 Pin
17. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 63 134 2 Automatically switching the reset signal via selector logic Figure 4 12 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 13 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 _RESET pin Figure 4 12 Circuit Connection for Automatically Switching Reset Signal with Selector Logic When Not Using Flash Self Programming Target connector Vop 4 to 10 kQ Selector Target device A Q _ E FLMDONete 1 to 10 kQ RESET_OUT HI Side A LOW Side B Reset connector RESET signal Note FLMDO is high level when MINICUBE2 is connected and FLMDO is pulled down when MINICUBE2 is not connected Figure 4 13 Circuit Connection for Automatically Switching Reset Signal with Selector Logic When Using Flash Self Programming Target connector VDD 10 kQ Target device RESET OUT ADO RESET_IN FLMD j LOW
18. Side B 10 kQ Reset connector RESET signal Note This circuit is designed for flash self programming which controls the FLMDO pin via ports QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 64 134 3 Manually switching the reset signal with jumper Figure 4 14 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 14 Circuit Connection for Switching Reset Signal with Jumper Target connector Jumper Target device RESET OUT Reset connector RESET_IN RESET signal e 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 15 Figure 4 15 Jumper Connection When 10 Pin Connector Is Used Target connector Target device RESET_IN Reset connector RESET signal RESET OUT QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 65 134 4 Resetting the target device by power on clear POC only Figure 4 16 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
19. USB driver device files and so on Download these NEC Electronics software from the following website ODS URL http www necel com micro ods eng index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product lt 5 gt 78K0 OCD board accessory lt 6 gt 10 pin target cable accessory lt 7 gt 16 pin target cable accessory lt 8 gt Target connector sold separately QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 70 134 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 Setting 3 V is supplied from MINICUBE2 to the target system 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 ra
20. aiea M EE a ere tee ne ae ern id 9 1 2 Notes Before Using MINICUBE2 000 o ol 10 le DUP DOMEO DEVICES A osito o 10 1 4 Hardware Specifications crime dd tri eed ee 11 CHAPTER 2 NAMES AND FUNCTIONS OF HARDWARE c ccccecceeeeeeeeeeeeeeesensseneseneeeeeees 12 2 1 Names of SUpplicd HardWare curia oia 12 2 2 Part Names and Functions of MINICUBEZ ooocccocccnccnoccncccoccnnccnoconcnnnconononcnnonnnnnnnonnrnnnononrnnnnnroncnnnannnnos 13 2 3 Part Names and Functions of 78K0 OCD Board ooccccccoccncccoccnnccnnconcononcnnononononnnnnnnonnnrnnnnnnrnnononrnnnnnaninns 15 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 SERIES ooccocccocccnnccnnconnconnconoconcconncnnnnos 16 31 Target oystem Desi cis o 17 PIS SIAM rel obli 18 312 CIRCE connection examples 2 tyadcacte val a eee 19 321 3 COMME CIOMFON reset Pl acido 22 3 1 4 Mounting connector onto target SySteM oooconccccncccccnccnconcnnonanononcnonnnnnnnnnnnnnnnnnnnnrnnonnnnnnnrnrnnnrnnonnnnss 25 APIO 99 Bo 0 A o ey ep oe eee ye pee eee ee 26 321 Debug TUACIONS di a 26 220 Ste mM COnNguUra NOT arena aaraa e a 27 3 2 3 System startup POCA UI 28 3 2 4 SyStem sh tdown Procedure asesi a 30 3 2 5 Securing of user resources and setting of security ID ooccccoonccnnoconnonoccnnnncnnanonnnnonnnnnnnanenoss 31 326 Cautions on debug Md a 37 O 39 3 3 1 Specifications Of programming FUNCTION cccoooncncccoccnnccnoccnonononnnnnncnncnnnnnnnnnnncnnnnnnrnnonnnrnnnnnnrancnnnan
21. comm monitorramsym 16 4 defines monitorramsym symbol 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 Ox3ffefff MROMSEG LOAD R VOx03f800 MonitorROM PROGBITS 2A MonitorROM y MRAMSEG ILOAD RW VOx03ffeff0 MonitorRAM NOBITS AW MonitorRAM QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 34 134 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 When UART is used do not mask receive 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 CSI00 is used CSIOICO x Any Note When the target device is the V850ES IE2 do no
22. connectors e 4 2 On Chip Debugging This section describes the system configuration and startup method to perform on chip debugging with MINICUBE2 e 43 Flash Programming This section describes the system configuration and startup method to perform flash programming with MINICUBE2 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 50 134 4 1 Target System Design This section describes the target system circuit design required for on chip debugging and flash programming 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 Communication circuits must be mounted on the target system Communication via X1 X2 or OCD1A OCD1B Target device 78K0 OCD board MINICUBE2 Target system Host machine Figure 4 2 Outline of Communication Interface for Flash Programming Communication circuits must be mounted on the target system UART communication Target device Tirate p communication MINICUBE2 Host machine Target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 51 134 4 1 1 Pin assignment This section describes the interface signals used between MINICUBE2 and th
23. improve the writing quality fully understand verify and evaluate the following items before using MINICUBE2 e Circuits are designed as described in the user s manuals for the device and MINICUBE2 e The device QB Programmer and MINICUBE2 are used as described in each user s manual e The power supplied to the target system is stable QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 130 134 CHAPTER 6 SELF TESTING This section describes the method to perform self testing with MINICUBE2 The MINICUBE2 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 6 1 System Configuration Figure 6 1 illustrates the system configuration for self testing Figure 6 1 System Configuration for Self Testing ij SS ay a sor sE o aca A ct B a lt A gt lt 3 gt NEG ELECTRONILES lt 7 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 an NEC Electronics debugger or QB Programmer is installed Download these NEC Electronics software from the following website ODS URL http www necel com micro ods eng index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 131 134 6 2 Self Testing Procedure 1 Preparation and installation of so
24. 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 2 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 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 99 134 Notes 1 Figure 4 4 When Both Debugging and Programming Are Performed with X1 X2 Communication X1 Oscillator ls Used Vop Vop Vop Target connector Target device GND RESET_OUT RxDNote 1 Vop TxDNote 1 R F U R F U R F U CLKNote 2 X1 R F U OCD1ANote 4 R F U R F U DATA FLMDO RESET_INNote 5 R F U Reset connector RESET signal 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 During debugging the clock mounted on the 78K0 OCD board can be supplied If no clock is mounted a clock of 4 8 or 16 MHz can be supplied During flash programming use the clock mounted on the target system For debugg
25. perform flash programming with MINICUBE2 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 17 134 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 JJ for example the PCMO pin is assigned 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 FP4 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 Target device EEES C Serial communication Communication UART CSI H S
26. select switch by referring to the following table Caution Do not change the switch setting while the USB cable is connected Table 4 11 Setting of Power Select Switch Setting 3 V is supplied from MINICUBE2 to the target system 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 33 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 4 33 Connecting MINICUBE2 to Target System 16 pin target cable MINICUBE2 Target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 89 134 4 Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 4 34 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
27. 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 Setting 3 V is supplied from MINICUBE2 to the target system 5 V is supplied from MINICUBEZ2 to the target system T 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 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 y 16 pin target cable MINICUBE2 Target system QB MINI
28. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 103 134 2 Manually switching the reset signal with jumper Figure 5 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 5 5 Circuit Connection for Switching Reset Signal with Jumper Target connector Jumper Target device RESET_OUT Reset connector RESET_IN RESET signal e Jumper setting When MINICUBE2 is connected 1 2 shorted When MINICUBE2 is not connected 2 3 shorted 3 Resetting the targe
29. tool was installed when NEC 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 MINICUBE diagnostic tool QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 134 134 CHAPTER 8 REVISION HISTORY Document Number ZUD CD 06 0018 March 20 2006 1st edition ZUD CD 06 0018 1 April 24 2006 Changes in conjunction with support of 78K0S Addition of 78K0S Series setting to Table 2 1 p 13 Addition of descriptions of 78KOS Series to Table 2 3 p 14 Addition of CHAPTER 5 HOW TO USE MINICUBE2 WITH 78K0S SERIES p 97 Other changes Addition of descriptions of H S pin to 3 1 Target System Design p 17 Addition of descriptions to 3 Resetting the target device by power on clear POC only p 24 Modification of coments and addresses in sample sources p 33 Addition of 9 to 11 p 38 Modification of OCD1B pin connection in Figures 4 5 4 6 and 4 8 pp 56 57 59 Addition of 4 Resetting the target device by power on clear POC only p 65 Addition of 13 Emulation of POC function p 86
30. 0 007FFFh Device Checksum 041842 Connection to device QBP Checksum 0x1842 Port UART ch Checksum compare PASS Pulse 0 AutoProcedure E py PASS Speed 115200bp gt Range Chip Freg 8 00MHz Multiply 1 00 PASS QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 129 134 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 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 3 or 5 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
31. 05 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 16 134 CHAPTER 3 HOW TO USE MINICUBE2 WITH V850 SERIES This chapter describes how to use MINICUBE2 when performing on chip debugging and flash programming for a V850 Series 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 the V850 Series as the target device e 3 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 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
32. 2 Preliminary User s Manual ZUD CD 06 0018 1 122 134 4 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 sd PAI A E eer er Se on 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 the QB Programmer User s Manual QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 123 134 5 3 4 Usage examples This section describes a series of basic operations using the QB Programmer using the y4PD78F9234 as an example The operations from execution of the Autoprocedure EPV command t
33. 2 main unit For their functions refer to 1 to 5 below Figure 2 2 Part Names of MINICUBE2 USB interface Target interface connector connector AMI a III NN Mode select switch L Power select 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 Setting Sets 78K0S Series as target device Sets V850 or 78KO Series 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 Setting 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 mr The supplied power is fed back to MINICUBE2 and used only for power detection a 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 14 134 3 USB interface connector This i
34. 2 to the target system Factory setting 5 V is supplied from MINICUBE2 to the target system 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 5 14 before the power to the target system is turned on Figure 5 14 Connecting MINICUBE2 to Target System 16 pin target cable MINICUBE2 g Target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 111 134 4 Connecting the USB 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 m p bl gt MINE AAA ee METEO A ele EEA 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 d
35. B MINI2 Preliminary User s Manual 3 Execution of Autoprocedure EPV command ZUD CD 06 0018 1 95 134 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 and Security commands are executed for the target device sequentially The mode LED on MINICUBE2 glows yellow during execution When the command execution is completed normally the mode LED glows green and the following window appears Figure 4 42 Completion of Autoprocedure EPV Command Execution Fa OB Programmer File Device Wiew Help chip erase finish Start Flash Programmine Flash Programming lt 1 08 Flash Programming 20 Flash Programming alte Flash Programmine 40 Flash Programming 50 Flash Programming 00 Flash Programming OR Flash Programming 80 Flash Frogramming 90 Flash Frogramming finish Flash Internal Verity OE start Flash Werityine Flash Verifying lt 1 04 Flash Verifying 20 Ae Flash Verifying GOR Flash Verifying 40K Flash Verifying SOR Flash Verifying 60 Flash Verifying lt TUX Flash Verifying ODA Flash Verifying lt 204r Flash Verifying finish Mame OfeFORsS Firm Version 2 00 ExtiGode FDA SCH Vendor 10h FRM Device file Name 78F0B33 prm Format 0414 Version WAL OS Processor Wer 0200
36. C 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 NEC Electronics products listed in this document or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others e Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples The incorporation of these circuits software and information in the design of a customer s equipment shall be done under the full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information e While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundancy fire containment and anti failure features e NEC Electronics products are classified into the following thre
37. CUSTOMER NOTIFICATION April 24 2006 Koji Nishibayashi Group Manager Development Tool Group Multipurpose Microcomputer Systems Division 4th Systems Operations Unit NEC Electronics Corporation CP K O Preliminary User s Manual QB MINI2 On Chip Debug Emulator with Programming Function QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 2 134 MEMO QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 3 134 MINICUBE is a registered trademark of NEC Electronics Corporation in Japan and Germany and Germany or a trademark in the United States of America Windows is either a registered trademarks or a trademark of Microsoft Corporation in the United States and or other countries PC AT is a trademark of International Business Machines Corporation e The information in this document is current as of April 2006 The information is subject to change without notice For actual design in refer to the latest publications of NEC Electronics data sheets or data books etc for the most up to date specifications of NEC Electronics products Not all products and or types are available in every country Please check with an NEC Electronics sales representative for availability and additional information e No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may appear in this document e NE
38. F U H SNote 4 CLK R F U R F U INTP R F U CLK AS RESET_IN R F U ala la N Ja JO GND INT PNote 5 10 ke 1 to 10 kQ a 0 jo Von 1 kQ Reset circuit RESET signal Notes 1 The RESET pin is used to download the monitor program at debugger startup or to implement forced reset Therefore a pin that alternately functions as the RESET pin 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 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 101 134 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 deb
39. F U R F U R F U CL KNote 2 OCD 1 ANote 3 R F U X1 Clock R F U circuit X2 R F U DATA FLMDO RESET_ NNote 4 R F U Reset connector RESET signal 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 During debugging the clock mounted on the 78K0 OCD board can be supplied If no clock is mounted a clock of 4 8 or 16 MHz can be supplied neither of them is used for the CPU operating clock During flash programming only a clock of 4 8 or 16 MHz can be supplied 3 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 MINICUBEZ2 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 2 or less For details refer to 4 1 3 Connection of reset pin 5 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 do
40. 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 OB Programmer Sele File Device Help PEGA POB Programmer startup Programmer gt Command standby DB Programmer 2441 00 gt Firmware 441 00 gt Device Setup Parameter File Read FASS E gt Open Load File Fi Success read HEA file patiesu ss gt Parameter file Name FOF3S732 prm Yersion 41 00 l Device Hame irade Hame SAMPLE HEA Date 2006 02 24 21 13 08 Chksum E23Eh Area QOOO00h 007FFFR F Connection to device Fort 5SI0 H75 Pulse 11 Speed MHz Range Chip Freg 5 00MHz Multiply 4 00 PASS QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 471134 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 and Security commands are executed for the target device sequentially The mode LED on MINICUBE2 glows 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 i QB Programmer Seles File Device Help I Programmer QB Programmer 1 00 Firmwa
41. N3 on the 78K0 OCD board to the 16 pin target cable Figure 4 22 Figure 4 21 With 10 Pin Connector Figure 4 22 With 16 Pin Connector Caution Connect the 78K0 OCD board to the target cable so that pin 1 position A on each side match QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 72 134 5 Connecting the USB cable Connect MINICUBE2 to the host machine as shown in Figure 4 23 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 23 Connecting MINICUBE2 to Host Machine gt mM SS mme 7 ll ll B r AA ore 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
42. Programming Debug Operating Clock Source Usage Refer to Used Interface Interface Used by Target Device 16 pin Internal high speed oscillator Figure 4 3 connector X1 oscillator not used X1 oscillator OCD1A OCD1B Internal high speed oscillator Figure 4 5 X1 aia not used X1 as Y Figure 4 6 4 6 NA connector OCDIA OCDIB OCD1B Figure 48 4 8 AS ASA TA connector QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 54 134 Notes 1 Figure 4 3 When Both Debugging and Programming Are Performed with X1 X2 Communication Only Internal High Speed Oscillator Is Used Vop Vop Vop Target connector Target device 3 to 10 kQ RESET OUT La RxDNote 1 UE RE R F U L CLKNote2 9 X1 OCD1ANote 4 R F U R F U 10 KQ R F U FLMDO RESET NNote 5 R F U Reset connector RESET signal 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 During debugging the clock mounted on the 78K0 OCD board can be supplied If no clock is mounted a clock of 4 8 or 16 MHz can be supplied During flash programming only a clock of 4 8 or 16 MHz can be supplied For debugging short 1 2 of JP1 and 1 2 of JP2 For flash programming short pin 2 of JP1 and JP2 only For the target device operation without MINICUBE2 connected leave JP1 and JP2 open OCD1A
43. ace 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 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 NEC 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 78K0S KU1 or 78K0S KY1 INTP1 0018h When using 78KOS KA1 or 78K0S KB1 INTP3 000ah 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 0ed0h SSS is an ar
44. ameter File Read PASS as ev Ice Name gt Dpen Load File Firmware Success read HE file gt E Parameter file Hame foF 9234 prm Version 241 02 F Load file gt Hame SAMPLE HE Date 2006 02 24 21 13 08 Chksurm E23Eh Area OOOU00H O0 FFF F Connection to device Port UART chd Pulse Speed 115200bp Range Chip Freg 8 00MHz2 Multiply 1 00 PASS i QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 128 134 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 and Security commands are executed for the target device sequentially The mode LED on MINICUBE2 glows 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 sal QB Programmer 3 elk File Device Help b AutoProcedure E pw l Frogrammer Blank check Chip Not blank Erase need QB Programmer 1 00 Erasing Firmware Wa g0 Erase Chip FASS Truncate the HE File Pingar Enp Name UPD78F3234 10 Firmware 0 00 Device Parameter file Name 7BF9234 pre Version 1 02 I Load file Name gt SAMPLE HEA Date 2006 02 24 21 13 08 Chksum E23Eh 4rea OOO00
45. ary if the power select switch is set to 3 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 113 134 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 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 Monitor Programs for Debugging Are Allocated Internal ROM space Internal RAM space Internal ROM end address Internal RAM end address 304 bytes 5 bytes Stack area for debugging 2 bytes Ox7E for software break OxOA 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 114 134 a Securement of area for debug monitor program In the internal ROM sp
46. between MINICUBE2 and the target device is CSI H S 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 38 134 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 Writing 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 NEC Electronics debugger ID850QB this specification applies when the setting in the Clock area in the Configuration dialog box 8 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 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
47. bitrary 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 Offh Offh Offh Offh Offh Off Offh Offh Offh Offh Offh Offh Off Offh Offh QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 115 134 Remark Describe the address 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 0x2D0 2 KB 0x6D0 4 KB OxEDO 8 KB Ox1EDO b 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 from OxFEOO and the stack pointer initial value is OxFEOO lt 1 gt lt 2 gt lt 3 Available space in internal high speed RAM OXFEOO OXFEOO How to secure areas Refer t
48. ble 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 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 e 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 an NEC Electronics partner refer to the documents prepared by the partner company e Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 6 SELF TESTING QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 30 134 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 3 or 5
49. cted QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 43 134 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 PAM File Read Target Device Connection Supply Oscillator fF On Tage Port Mequenc 20 00 MH Speed r Operation Mode Chip Start Blox End OR Cancel 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 3 18 Parameter File Select Dialog Box Look ir E PAM F cE Ej E 70F3732 prm File name FOF 3732 Files of type PRM Files PRM Cancel QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 44 134 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 E Standard Advanced Parameter File DF3732 prem PAM File Read Targ
50. ction in the previous section 2 Automatically switching the reset signal via selector logic 3 Manually switching the reset signal with jumper 4 Resetting the target device by power on clear POC only QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 62 134 1 Automatically switching the reset signal via resistor Figure 4 10 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 100 2 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 10 Circuit Connection with Reset Circuit That Contains Buffer MINICUBE2 Target device Reset connector V RESET OUT Buffer RESET_IN 4 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 11 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 11 Circuit Connection with
51. cuit Parts Mounting Diagram CLK1 Equivalent Circuit Capacitor CB Capacitor CA Ceramic resonator or crystal resonator Figure 4 26 Appearance After Mounting Oscillator QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 76 134 2 Using a clock 4 8 or 16 MHz generated in MINICUBE2 Remove the oscillator or oscillation circuit on the 78K0 OCD board The frequency of the supplied clock can be set in the debugger For the settings refer to the user s manual for the debugger When using the ID78KO QB this setting can be made in the Main Clock area in the Configuration dialog box see below Main Glock O Glock Socket External fe System 14 00 3 Using a clock mounted on the target system Remove the oscillator or oscillation circuit on the 78K0 OCD board The clock on the target system can be used only when the OCD1A and OCD1B pins are used as the communication interface When the X1 and X2 pins are used as the communication interface no oscillation circuits can be connected to the X1 and X2 pins of the device QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 77 1134 4 2 6 Securing of user resources and setting of security ID MINICUBE2 uses the user memory spaces shaded portions in Figure 4 27 to implement communication with the target device or each debug functions The areas marked with a dot e are always used for debugging and other areas are used for each debug function used Refer to the description
52. 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 o it a an 3 E a a a m au 16 pin target cable MINICUBE2 Target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 29 134 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 or 5 the mode LED glows white after connection Figure 3 11 Connecting MINICUBE2 to Host Machine e y ALA e MINE E cee EE METEO A ely EEA 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 unsta
53. d 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 www necel com micro english product sc allflash minicube2 html Remark This website just posts the supported target devices For details on the development tools that are required as the support conditions refer to the document below e Document Document name QB MINI2 Operating Precautions QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 11 134 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 Classification Specifications MINICUBE2 Host machine interface Target interface Operating power supply Supplied via USB interface 5 V Operating clock Clock mounted in MINICUBE2 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 m
54. d breaks cannot be executed if one of the following conditions is satisfied e Interrupts are disabled Dl 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 5 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 6 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 119 134 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 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 controlle
55. d 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 123456789ABCDEF 123D4 not case sensitive QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 36 134 Value 7 0 0x34 0x56 0x78 0x9A OXBC OxDE OXF 0x23 OxD4 If NEC 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 Securty ID 0x1 1455 7894BCOEF123D014 This edit box can be specified a security ID by hexadecimal When it i specified tid option of the linker is set Cancel Apply Help QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 37 134 3 2 6 Cautions on debugging This section describes cautions on on chip debugging for the V850 Series 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
56. d options i Blank check before Erase WM Security flag after Program Checksum after Program Security flag settings Disable Chip Erase Reset yect Disable Block Erase End Boot block 000 Disable Program Show Address lw Disable Read Disable Boot block cluster reprogramming lt 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 tal CB Programmer AE File Device Help L A gt QB Programmer startup i Frogrammer Command standby QB Frogrammer W1 00 2 Firmware 441 00 gt Device Setup Parameter File Read FASS Device Mame Firmware Parameter file Name FOFS3732 prm Version 41 00 Load file Hame Date Chksum rea Connection to device Port SI0 H75 Pulse 11 Speed MHz Range Chip Freg 5 00MHz Multiply 4 00 PASS QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 46 134 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 Look ir E HEA ei Ed E sample hex File name 3 an g e Files of type S 18c
57. d via MINICUBE2 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 120 134 5 3 Flash Programming This section describes the system configuration and startup shutdown procedure when flash programming is performed for the 78KOS Series using MINICUBE2 5 3 1 Specifications of programming function Table 5 5 Specifications of Programming Function Specifications Host interface USB 2 0 compatible with 1 1 3 or 5 V maximum current rating 100 mA Acquisition of device specific Parameter file for NEC Electronics PG FP4 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 lt 4 gt lt 3 gt lt 1 gt NEG ELECTRONICS lt 2 gt Target system 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 NEC Electronics software from the following website ODS URL http www necel com micro ods eng 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 121 134 5 3 3 System startup procedure This section describes the system
58. during debugging Note that the POC function cannot be emulated Figure 4 16 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 66 134 4 1 4 Cautions on target system design Note the following cautions when designing the target system e Do not place X1 OCD1A and X2 0CD1B next to each other on the target system If the layout requires this they should be made as short as possible e Make the distance between the target connector and the target device as short as possible e Since the X1 0CD1A and X2 0CD1B lines are used for clock supply be sure to shield them such as with a GND pattern e Before shipping the product use jumpers or other means to physically separate the X1 OCD1A and X2 0CD1B pins from the target connector in order to ensure normal clock oscillation e When debugging remove capacitors feedback resistors and other elements for the resonator in order to prevent signal degradation due to the load placed on the X1 0CD1A and X2 0CD1B pins Figure 4 17 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 LO Connect to the connector by using 7 tin plating when debugging Shield both sides of the line to reduce noise amp _ To debug co
59. e debugger is restarted In such as case erase the memory via flash programming 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 NEC Electronics assembler RA78KO an ID code is generated in this area using the linker option gi Figure 4 29 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 80 134 Figure 4 29 Linker Option Setting Security 1D Linker Options Output Output Library Others Load Module File o Output File Name ric Browse i Output Symbol Informatian Create Error List File e M On Chip Debua 90 W SIZE 256 W Security 10 01 ID FFFFFFFFFFFFFFFFFFFF H ormmand Line Uptions a 90256 giDFFFFFFFFFFFFFFFFFFFFh dlk dr s Cancel Apply Help d Stack area for debugging this area must be secured This area requires 7 to 16 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 stac
60. e Is Only Reset via POC Vbo 1 to 10 kQ Target connector Target device RESET_OUT RESET _IN QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 25 134 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 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 www necel com micro enalish product sc allflash 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 WOMOOOOW 419 44 12 19 8 5 1 2 Pin assignment of target connector to be mounted on target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 26 134 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 d
61. e if firmware is updated incorrectly 7 1 System Configuration Figure 7 1 illustrates the system configuration for updating firmware Figure 7 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 an NEC Electronics debugger or QB Programmer is installed Download these NEC Electronics software from the following website ODS URL http www necel com micro ods eng index html lt 3 gt USB cable accessory lt 4 gt MINICUBE2 this product QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 133 134 7 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 before connecting to the target system The mode LED glows white after connection Figure 7 2 Connecting MINICUBE2 to Host Machine E O MINICUBE2 USB cable Host machine 4 Startup of MINICUBE2 diagnostic tool Start the MINICUBE2 diagnostic tool If the MINICUBE2 diagnostic
62. e quality grades Standard Special and Specific The Specific quality grade applies only to NEC Electronics products developed based on a customer designated quality assurance program for a specific application The recommended applications of an NEC Electronics product depend on its quality grade as indicated below Customers must check the quality grade of each NEC Electronics product before using it in a particular application 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 Special 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 life support systems and medical equipment for life Support etc The quality grade of NEC Electronics products is Standard unless otherwise expressly specified in NEC Electronics data sheets or data books etc If customers wish to use NEC Electronics products in applications not intended by NEC Electronics they must contact an NEC Electronics sales representative in advance to determine NEC Electronics willingness to support a given application Note 1 NEC E
63. e 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 TOP VIEW Pin No For Debugging For Programming with 78K0 OCD Board Connected 3 RXD 4 Vop TXD leo 78K0 OCD board is not required for programming R F U R F U PRU le REU 6 63 35353 33 a a on fres 11 FLMD DATA 14 FLMDO RESET_IN R F U 16 R F U Note Signal names in MINICUBE2 208000000 SAAVOVOA Pin assignment of target connector to be mounted on target system Table 4 2 Pin Functions FLMDO OUT Pin used to set the target device to debug mode or programming mode REV This pin is not used so leave it open Notes 1 As seen from MINICUBE2 2 Not used in some devices QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 92 134 Table 4 3 lists the pin assignment when a 10 pin target cable is used The 10 pin target cable is dedicated for 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 Pin No P
64. ebug functions when the target device is the V850 Series and the ID850QB is used If a 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 Specifications Target interface UART or CSI H S 10 byte ID code authentication Download Available Go amp Go Start from Here Come Here Restart step execution Hardware break 2 points 1 Software break 4 points 2 000 points Note 2 commonly used by execution and access Forced break Available RAM monitoring Available DMM writing to memory during RUN Available Pin masking Available reset pin only Time measurement Measurement resolution 100 ws from execution start to break Max measurement time Approximately 100 hours User spaces used for debugging Internal ROM 2 KB Internal RAM 16 bytes max Notes 1 The following devices are not yet supported V850ES KE2 V850ES KF2 V850ES KG2 PD70F3733 V850ES IE2 2 Available with restrictions For details refer to 3 2 6 Cautions on debugging QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 21 1134 3 2 2 System configuration Figure 3 9 illustrates the system configuration for on chip debugging Figure 3 9 System Configuration for On Chip Debugging lt 1 gt lt 3 gt NEG ELECTRONICS Target system lt 2 gt lt 1 gt Host machine Products with USB por
65. ebugger 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 e 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 an NEC Electronics partner refer to the documents prepared by the partner company e Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 6 SELF TESTING QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 112 134 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 necess
66. edded in the area filled with yellow 0x70 to 0x79 in Figure 3 12 to prevent the memory from being read by an unauthorized person QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 32 134 a Reset vector A reset vector includes the jump instruction for the debug monitor program How to secure areas It is not necessary to secure this area intentionally When downloading a program however the debugger rewrites the reset vector in accordance with the following cases If the rewritten pattern does not match the following cases the debugger generates an error FOc34 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 O already erased device Before writing After writing 0x0 OxFFFF Jumps to debug monitor program at 0x0 0x2 OxFFFF 0x4 XXXX 0x4 xxxx e Thejrinstruction is placed at address 0 when using NEC 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 O when using IAR compiler ICCV850 Before writing After writing 0x0 mov imm32 reg1 Jumps to debug monitor program at 0x0 Ox6 jmp reg1 0x4 mov imm32 reg1 Oxa jmp reg1 e The jump instruction for the debug monitor pr
67. ent The following figure shows an example Figure 4 37 Standard Tab of Device Setup Dialog Box After Setting Device Setup Standard Advanced Parameter File 8F054 D prrn PRM File Read Target Device Connection Supply Oscillator e Fort UART Ext OSC 7 Frequency 20 00 MHz Speed 1115200bps r Multiply rate 11 j Operation Mode Chip Start 000 C Block End lt 5 gt Switch to the Advanced tab 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 4 38 Advanced Tab of Device Setup Dialog Box Device Setup Standard Advanced r Command options if Blank check before Erase Security flag after Program Checksum after Program Security flag settings Disable Chip Erase Reset yecto Disable Block Erase End Boot block oo tt Disable Program Show Address r Disable Boot black cluster reprogramming QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 93 134 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 39 Completion of Programming Environment Setting E GB Programmer File Device View Help DY gt FlashOpennine Flash Open OK Name COMMAND Device Setup Device File Read OK Firm Version Extiode Wendor
68. ers or less f Pseudo real time RAM monitor RRM area When pseudo real time RAM monitor is used the area of debug monitor area specified in a 256 bytes must be reserved How to secure areas When using NEC Electronics compiler CC78K0 the area used for pseudo real time RAM monitoring can be secured using the linker option go Figure 4 31 shows the Linker Options dialog box of the project manager Add 256 bytes to the area specified in a to make the area 512 bytes in total QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 82 134 Figure 4 31 Linker Option Setting When Pseudo RAM Monitor and Software Break Are Used Linker Options Output Output2 Library Others Load Module File o Output File Name a Browse 4 Output Symbol Information g mI Create Error List File e Le On Chip Debug 90 i size 512 bytes Secunty ID gi o JFFFFFFFFFFFFFFFFFFFF H Command Line Options omdt Imf g0512 giOFFFFFFFFFFFFFFFFFFFFH dlk dr s Cancel Apply Help QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 83 134 4 2 7 Cautions on debugging This section describes cautions on on chip debugging for the 78KO Series 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 rew
69. essary Variety of supported devices and expandability MINICUBE2 supports a wide variety of NEC Electronics 8 to 32 bit on chip flash memory microcontrollers More devices can be supported by upgrading firmware embedded in MINICUBE2 Self testing function MINICUBEZ2 has a self testing function which is used to detect faults in MINICUBE2 and perform maintenance QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 10 134 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 SERIES Target system design 3 1 Target System Design On chip debugging 3 2 On Chip Debugging CHAPTER 4 HOW TO USE MINICUBE2 WITH 78K0 SERIES Target system design 4 1 Target System Design On chip debugging 4 2 On Chip Debugging Flash memory programming 4 3 Flash Programming CHAPTER 5 HOW TO USE MINICUBE2 WITH 78K0S SERIES 5 1 Target System Design 5 2 On Chip Debugging 5 3 Flash Programming MINICUBEZselftesting CHAPTERG SELF TESTING o Expansion of supported devices CHAPTER7 FIRMWARE UPDATE 1 3 Supporte
70. et Device Connection Supple Oscillator if On Target Port SIO HAS Frequency 5 00 MHz Speed MHz Multiply rate 4 00 Operation Mode f Chip Start Block End Ps lt 5 gt The PD70F3732 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 Setup Dialog Box After Get Security Settings Execution Device Setup Standard Advanced r Command optione Read verify after Program lw Security flag after Program Checksum after Program Security flag settings Disable Chip Erase Reset veci Disable Block Erase End Boot block z Disable Program Show Address Disable Read Disable Boot block cluster reprogramming QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 45 134 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 r Comman
71. evice The alternate function of this pin can be used because this pin goes to Hi Z while the memory is not written during a break when debugging This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 2 or less For details refer to 3 1 3 Connection of reset pin 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 21 134 Figure 3 3 Recommended Circuit Connection When CSI H S Is Used for Communication Interface Vop Voo Voo Vbo Target connector 1 to 10 kQ 3 to 10 kQ Target device 1 to 10 KQ 1 to 10 kQ Clock FLMDONote x oo RESET_ NNote 4 1 to 10kQ R F U Vop circuit O A a O O a Reset connector RESET signal Notes 1 Connect SO transmit side of the target device to Sl receive side of the target connector and SO transmit side of the target connector to Sl receive side of 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 tar
72. evice is the 78KOS KB1 and INTP3 is used MK1 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 117 134 5 2 6 Debugging of alternate functions 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 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 2 3 6 7 3 Disconnect the external parts connected to the X1 and X2 pins in the target device If the circuit is designed as shown in Figure 5 11 short jumper pins 1 and 2 Turn on power to the target system and MINICUBE2 in accordance with 5 2 3 System startup procedure Start the debugger The monitor program will be downloaded automatically immediately after startup Terminate the debugger 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 Turn on power to the target system and MINICUBE2 in acc
73. ftware 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 2 Switch setting The mode select switch can be set to M1 or M2 Set the power select switch to 3 or 5 3 Connecting the USB cable Connect MINICUBE2 to the host machine before connecting to the target system The mode LED glows white after connection Figure 6 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 NEC Electronics software was installed the diagnostic tool is registered on the Start menu as follows 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 132 134 CHAPTER 7 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 operat
74. get device 3 The alternate function of this pin can be used because this pin goes to Hi Z while the memory is not written during a break when debugging 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 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 22 134 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 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
75. he 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 24 134 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 Jumper Target device RESET OUT Reset connector RESET_IN RESET signal e 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 Devic
76. ile do not set specify a filling value other than OxFF for the object converter option U QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 85 134 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 using a project file as well as when using PM Load gt he Symbol Select the Object check box and then download the project file le Object iw Erase 9 Caution on performing step execution Some SFRs special function registers remain stopped during step execution In such a case execute the instruction with the real time execution function 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 lt 2 gt f the pseudo real time RAM monitor function is executed during a standby state the standby state is released lt 3 gt The program temporarily operates with PCC 0 during a break This break time is extended when the system clock frequency is low or when the CPU operating speed is lowered lt 4 gt When the pseudo real time RAM monit
77. ile Mame rnc Inf Browse i Output Symbol Information 9 Create Error List File e i On Chip Debugl go W SIZE 256 bytes W Security ID gi ID FFFFFFFFFFFFFFFFFFFF H Command Line Options i 90256 qiDFFFFFFFFFFFFFFFFFFFFR dlk dr s Cancel Apply Help QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 79 134 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 Setting and Operation Set Value Debugging is unavailable even if an on chip debug This setting is available emulator such as MINICUBE2 is connected only by flash programming The on chip flash memory is not erased no matter how many times the security ID code authentication fails 0x03 All on chip flash memory areas are erased if the security ID code authentication fails Other than above Setting prohibited 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 DB 2H eight characters or less 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 th
78. inNamente RESET_IN RESET OUT TOP VIEW Note Signal names in MINICUBE2 YVOOOW 19 8 6 1 6 Pin assignment of target connector to be mounted on target system Table 4 4 Pin Functions ek our Pinusedtooutputdocksignalto the target device DATA IN OUT Pin used to input output for data communication during debugging FLMDO OUT Pin used to set the target device to debug mode or programming mode REU O O l a This pin is not used so leave it open Note As seen from MINICUBE2 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 53 134 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 3 are the major purpose of use Confirm the purpose refer to Table 4 5 and see the relevant circuit connection example for specifications Caution The constants described in the circuit connection example are reference values If you perform flash programming aiming at mass production thoroughly evaluate whether the specifications of the target device are satisfied 1 Used to perform on chip debugging 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 Circuit Connection Diagrams Connector
79. ing short the jumper and mount no clock circuit For flash programming short pin 2 of JP1 and JP2 only For flash programming and the target device operation without MINICUBE2 connected leave the jumper open and mount a clock circuit 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 2 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 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 56 134 Figure 4 5 When Both Debugging and Programming Are Performed with OCD1A OCD1B Communication Only Internal High Speed Oscillator Is Used Vop Vop Vop Target connector Target device 3 to 10 kQ RESET OUT RxDNote 1 TxDNote 1 R F U R F U R F U CLKNote 2 R F U R F U R F U DATA FLMDO RESET_INNote 4 R F U Reset connector RESET signal 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
80. inns 39 3 3 2 System configurato mensa td 39 AS ol AAA A 40 3 014 Usage ea Sade 42 3 39 9 YStem snutdoWA POCOS A ac 48 3 396 Cautions on flash PFOGVA MUM IAG mundana a a e a a aTa 48 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78K0 SERIES ooccocccocccnncconccnnconcconcconcconncnanoo 49 41 Target ystem DESIGN sosaren A a Ousuaveusdetedsieetees 50 APIS IOMA A cds 51 41 2 Circuit connection CXAMPIES cui or a Sia 53 Also GOnne COM OleSeU DiN ti AA A 61 4 1 4 Cautions on target system desiQD oooccccccnnnnccccnnccconconcnnannnnonannnnononcnnononnnnonnnnnnonannnnnnnnrnnnnnannnnnnanons 66 4 1 5 Mounting connector onto target SysSteM ooooccccocccconcncccncnnnnncnnnncncnnarononnnnnnnrnnnnnrnnnnnrnnnnrnnnnnrnrrnaninnnns 67 O ale 8 0 0 g AAA ener ener EO O05 emer ne met ene O eee oer 68 A 2 AW DG DUG TUNGU ONS morei ndata AS nine eyed aioe eee nde 68 42 2 SV SIS COMMOUNAUOM s3ccniv han uhd su les woh actin daGuawtsh diate o dedo 69 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 8 134 42 3 System startup POCA ds 70 4 2 4 System shutdown PrOCOCUIe ccccceccecccesecccsseeccescecceeseeeceeueeecseuseeseuseeessageeeesegeeesseuseesssaseesssegeees 73 ALO ClOCK Sening aea it tesaleuekseuat dnt Gens 74 4 2 6 Securing of user resources and setting of security ID ooccconnncncocnncnconocnnnononcnncnnaroncnnanennononons 77 4 2 0 GAUllOnS OnE DUGGING csse la anand 83 A Sir AS LOGAN sE A aii 87 4 3 1 Specifications of p
81. k increase and decrease Figure 4 30 illustrates the case where the stack area is increased when the internal high speed RAM starts from OxFBOO and the stack pointer initial value is OxFEDF Figure 4 30 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 OxFBOO OxF BOO QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 81 134 The size of this area also varies depending on whether software breaks or pseudo real time RAM monitor is used Table 4 9 Size of Stack Area for Debugging Size of Stack Area for Debugging Standard When software breaks are used 9 bytes When pseudo RRM is used 14 bytes When software breaks and 16 bytes pseudo RRM are used How to secure areas Refer to the address range shown below and set the stack pointer Example When internal high speed RAM starts from OxFB00 Standard Within the range OxFBO7 to OxFEDF When software breaks are used also refer to e Within the range OxFBO9 to OxFEDF When pseudo real time RAM monitor is used also refer to f OxFBOE to OxFEDF When software breaks and pseudo real time RAM monitor is used also refer to e and f OxFB10 to OxFEDF e Software break area 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 DB OFFH OFFH eight charact
82. lectronics as used in this statement means NEC Electronics Corporation and also includes its majority owned subsidiaries 2 NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above M8E 02 11 1 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 4 134 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 e f 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 e The product may become hot depending on the status of u
83. lso entered when the debugger is terminated the flash memo A command from the QB Programmer is ended abnormally results in error The illumination mode is entered when MINICUBE2 is connected to a USB interface and 15 normally QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 15 134 2 3 Part Names and Functions of 78K0 OCD Board The 78K0 OCD board is used for debugging a 78K0 microcontroller not used for flash programming Figure 2 3 illustrates the external view of the 78K0 OCD board The name of each part is printed on the 78K0 OCD board For each function refer to 1 to 4 below Figure 2 3 Part Names of 78K0 OCD Board en mo Ra do 2 00 x S D 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 the target interface connector of MINICUBE2 To prevent the 78K0 OCD board from being inserted by mistake a dummy pin is mounted in the place of pin 11 in CN1 Pin 10 is not available 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 1
84. m Weight Approximately 40 g Target host machine PC98 NX Series IBM PC AT compatibles Target OS Windows 98 Windows Me Windows 2000 Windows XP USB 2 0 1 1 compatible ee acai cable A m Current ci n komanan O OoOO O OSOS l mA max 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 12 134 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 tt UE pS MINICUBE2 USB cable 10 pin target cable 78K0 OCD board A 20 MHz oscillator mounted QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 13 134 2 2 Part Names and Functions of MINICUBE2 Figure 2 2 shows the part names of the MINICUBE
85. n 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 e Circuits are designed as described in the user s manuals for the device and MINICUBE2 e The device QB Programmer and MINICUBE2 are used as described in each user s manual e The power supplied to the target system is stable QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 49 134 CHAPTER 4 HOW TO USE MINICUBE2 WITH 78K0 SERIES This chapter describes how to use MINICUBE2 when performing on chip debugging and flash programming for a 78KO Series 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 the 78KO Series as the target device 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
86. nnector GND pattern QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 67 134 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 information on these products access the MINICUBE2 information site URL htto www necel com micro english product sc allflash minicube2 html Figure 4 18 2 54 mm Pitch 10 16 Pin General Purpose Connector Pin Layout TOP VIEW Pin assignment when MINICUBE2 in Is connected in this direction Target system 10 pin y WOMOOOO OOOO 16 44 12 49 8 5 OO 19 8 6 16 Pin assignment of target connector to be mounted on target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 68 134 4 2 On Chip Debugging Thi
87. nvironment is set and the Device Setup dialog box is closed The main window appears as follows Figure 5 24 Completion of Programming Environment Setting OB Programmer Seles E Device Help POB Programmer startup Programmer gt Command standby QB Progrmmer 1 00 gt Firmware 2 00 Device Setup Parameter File Read PASS gt Fi Device Name Firmware Parameter file 5 Name 78F9234 orm Version 241 02 E Load file gt Name Date Chksum Area Connection to device Port UART cho Pulse lt 0 Speed 11520bp Range Chip Freg 8 00MHz2 Multiply 1 00 PASS ii QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 127 134 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 Look ir E HEA ei Ed E sample hex File name 3 Star e Files of type S 18c Hex files rece 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 Beli File Device Help POB Programmer startup i Programmer Command standby G B Programmer 1 00 gt Firmware v2 p gt Device Setup Par
88. o 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 uUPD 8F9234 Power supply voltage 5 V supplied from MINICUBE2 Communication channel UART 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 124 134 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 PAM File Read Target Device Connection Supply Oscillator fF OnTarge Port vs Mequenc 2000 MH Speed r Operation Mode Chip Start Blox End OR Cancel lt 3 gt Click the PRM File Read button to open the Parameter File Select dialog box Selec
89. o the address range shown below and set the stack pointer Example When internal high speed RAM starts from OxFEOO Within the range OxFEO5 to OxFEFA QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 116 134 c 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 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 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 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 78K0S KB 1 and INTP3 is used MK1 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 d
90. ode MOV PFCMD 0A5H MOV FLPMC 1H lt 1 MOV FLPMC 0FEH MOV FLPMC 1H ee eae eae IE Bae eae From this position CALL 08100H e 2 T MOV PFCMD 0A5H MOV FLPMC 0H Mode A1 MOV FLPMC 0FFH MOV FLPMC 0H lt 3 y Sb sl a 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 normally 6 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 lf 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 7 Caution on downloading a HEX file When downloading a HEX f
91. ogram is placed at address O Before writing After writing Jumps to debug monitor program at 0x0 gt No change QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 33 134 b 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 NEC 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 Ox800 Oxff Secures interrupt vector for debugging section DBGO space 4 Oxff Secures interrupt vector for serial communication Change the section name according to serial communication mode used section INTCSIOO Space 4 Oxff Secures 16 byte space for monitor ROM section section MonitorRAM bss
92. oncncononcnnnnonnnnonnnnnnnonnnrnononrnnnrnnrnnnnnnannnnos 120 5 32 SyS CONGU a NO Maona dio 120 9 39 93 SYSTEM startup PROCS UNC sientas aa eea aaa aae eaaa e adaa 121 SRS a ae Sects e aE SE e a E A A A mrt Sorry A eres A E E Re T E A E renee 123 53 09 YStent SMULAOWN Droce GULE via A a aa 129 5 3 6 Cautions on flash programming ccoooccccccnccnnconoccnnononcnncnnnnnncnnnnnnnnnncnnnnnnrnnnonnnnnnonnnrnnrnnnrnrrrnnrinrnnanines 129 CHAPTER O SELF TESTING ou 130 MESE e A e CU mE O erry ne Pee ee ne eee 130 6 2 Self Testing Procede Senet ee ee ee se ee ee 131 CHAPTER 7 FIRMWARE UPDATE cuina an 132 CalSystem COMM qua lOs icine aa seca a anebaabes eae a Serteae edaeseas 132 LAIA Update PrOCCOUIE anit ieee re tee eect Sees ccty dees a a a Gee cet teweaeidee meas 133 CHAPTER 8 REVISION HISTORY Tiana as 134 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 9 134 CHAPTER 1 OVERVIEW 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 gt On chip debugging Can debug with the target microcontroller connected to the target system Flash memory programming Can write programs to the on chip flash memory of microcontrollers 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 unnec
93. or function processing is performed the IXS value is forcibly set as shown below so that the internal low speed RAM area size becomes the maximum Device with OCD control code V1 xx OAh Device with OCD control code V2 00 or later OOh lt 5 gt If the interrupt disabled state DI setting is set or the operating clock is switched to internal Note 2 or subclock by the user program during the pseudo real time RAM oscillation clock monitor function processing the pseudo real time RAM monitor function processing is suspended A break occurs in the user program for approximately 40 ws due to the pseudo real time RAM monitor function processing User program stop period Approximately 40 ws Notes 1 Version can be checked by selecting About from the Help menu in the debugger 2 Devices with OCD control code V1 xx QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 86 134 11 Period in which user program is stopped while pseudo real time RAM monitor function is being processed The sampling time can be set in the Extended Option dialog box Extended Option W Use MINIGUBE Extended Function RAM Monitor Break When Readout OH Redraw Intervak 500 msec On Mouse Click fe Soft break C Hard break Glear Register When Reset We Break Sound mi i i Verify Check Cancel Restore Help The following shows the execution time whereas the operating frequency 5 MHz and PCC 0 lt When interrupts are enabled
94. ordance with 5 2 3 System startup procedure 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 118 134 5 2 7 Cautions on debugging This section describes cautions on on chip debugging for the 78KOS Series 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 2 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 3 Reset processing If the RESET pin of the target device alternately functions as a port enable the RESET pin by the user program settings such as option byte setting 4 When breaks cannot be executed Force
95. ower 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 the QB Programmer User s Manual QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 42 134 3 3 4 Usage examples This section describes a series of basic operations using the QB Programmer using the yPD70F3732 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 UPD7OF3732 Power supply voltage 5 V supplied from MINICUBE2 Communication channel CSI H S 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 sele
96. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 98 134 5 1 Target System Design This section describes the target system circuit design required for on chip 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 Communication UART CSI H S MINICUBE2 Host machine Target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 99 134 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 TOP VIEW Pin No
97. re 1 00 Device Name UPD ZORRA Firmware 2 00 Farameter tile Mame FOF3732 prm Yeron 441 00 Load file Mame SAMPLE HE Date 2006 02 24 21 13 08 Chksum E23Eh Area OOOO00K 00 7FFFA Connection to device Port 510 H 5 Pulse 11 Speed MHz Range Chip Freg 5 00MmHz Multiply 4 00 PASS f QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 48 134 3 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 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 3 or 5 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 3 3 6 Cautions on flash programming This sectio
98. receive side of the target device 2 During debugging the clock mounted on the 78K0 OCD board can be supplied If no clock is mounted a clock of 4 8 or 16 MHz can be supplied neither of them is used for the CPU operating clock During flash programming only a clock of 4 8 or 16 MHz can be supplied 3 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 MINICUBEZ2 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 2 or less For details refer to 4 1 3 Connection of reset pin 5 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 57 134 Figure 4 6 When Both Debugging and Programming Are Performed with OCD1A OCD1B Communication X1 Oscillator Is Used Vop Vop Vop Target connector Target device 3 to 10 kQ RESET_OUT RxDNote 1 R
99. reliminary User s Manual ZUD CD 06 0018 1 108 134 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 the target device is the 78KOS Series and the ID78K0S 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 Specifications Target interface INTP X1 x2Note Security ID Unavailable Download Available Go amp Go Start from Here Come Here Restart step execution Hardware break Unavailable Software break ROM 2 000 points Forced break Available except while interrupts are disabled RAM monitoring Unavailable DMM writing to memory during RUN Unavailable Pin masking Available external reset pin only Time measurement Measurement resolution 100 ws from execution start to break Max measurement time Approximately 100 hours User spaces used for debugging Internal ROM Approximately 300 bytes Internal RAM 5 bytes used as stack 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 QB MINI2 Preliminary User
100. rites of the flash memory cannot be guaranteed 2 Overwriting flash memory during on chip debugging If the following operations are performed during on chip debugging the flash memory in the device is overwritten lt 1 gt Downloading a program lt 2 gt Manipulation in Memory Fill dialog box lt 3 gt Manipulation in Memory Copy dialog box lt 4 gt Manipulation to change memory in Memory window lt 5 gt Online assembly in Assemble window lt 6 gt Settings when using software breaks lt gt Program execution or software reset operation while Permit has been selected for the Target Power Off setting in the Configuration dialog box lt 8 gt Operation that uses pseudo real time RAM monitor function It takes time from completion of flash memory programming until the control is passed to GUI 3 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 4 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 84 134 5 Emulation in self programming mode For self programming the mode is switched from normal mode to self programming m
101. rogramming function cccoocncccconcnncoconnnoconnncnconcnnnnnnnnnnnnnnnnnnnnnnnononnnnnnnanananenaness 87 EZ SV Sem COMME CUM AU O a A tes vce nee cies ek leieaid s 87 4 3 3 System startup procedure ii ai 88 AA US age example Sonsin A aa eerie 90 4 3 5 System SNUtAOWN Procede e oo 96 4 3 6 Cautions on flash Program Us AAA 96 CHAPTER 5 HOW TO USE MINICUBE2 WITH 78K0S SERIES ooccooccocccocccncccncccnncconconccnnnno 97 dal Target System Desi AAA AAA A AAA 98 SEPIA aSSONMEN A PA e O A sate yaad saute 99 5 12 GICUIECONNECUON example ii io es 100 LL GONE CcUOn Ol MeSe b Pl adas 101 9 14 GOmecuonoLIN TP DUM si a ola ed cole asii 104 O10 GOMMECUOM of XT and AZ pS ada 106 5 1 6 Mounting connector onto target SySteM oocoonccccocccccnccnccncnnnnanononcnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnrnnnnranonnnos 107 5 2 Un Gaip Debod at ii is 108 A aae oP ree er ran oer ie Cre ne ee a ne ee 108 22 OY SIEM COMMA OM 95 255525 is saab ec sete ds 109 5 2 3 System Startup procedure ccccceeccccceseeeceescecceeseeecsuueeecseuseecseaseessaeeecseseesseaseeessageeessegseesseaeeeenss 110 52 4 System Shutdown procedure A da 112 5 2 5 Securing of user resources abies oa obio 113 5 2 6 Debugging of alternate functions of X1 and X2 PiNS ocooccccccoccnnconoconconononnnnnnononnnnonnnnnnrnnononrnnconaninnos 117 52r Cautions ON depues a E A A 118 PAFAS Ue OG E A a E A N ETA 120 5 3 1 Specifications of programming function ccoooncncccoccnnccnncnncn
102. s Are Used in Target System Target connector Target device Oscillator or external device e 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 107 134 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 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 htto www necel com micro english product sc allflash 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 WOMOOOOW 419 44 12 19 8 5 1 2 Pin assignment of target connector to be mounted on target system QB MINI2 P
103. s Manual ZUD CD 06 0018 1 109 134 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 1 gt lt 3 gt NEG ELECTRONICS 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 NEC Electronics software from the following website ODS URL http www necel com micro ods eng 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 110 134 5 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 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 Setting 3 V is supplied from MINICUBE
104. s 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 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 78K0 OCD board for debugging a 78K0 microcontroller To prevent the 78K0 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 Description Connection Detection connected White rs Connected Not detected Not yet started oe Detected Not yet started break mode running or a program is being downloaded the break mode running or a program is being downloaded A 78KOS Series debugger has been started and the CPU is in the break mode The QB Programmer has been started and is waiting for execution processing Alternatively execution processing has been completed A 78KOS Series debugger has been started and the CPU is running or a program is being downloaded A command from the QB Programmer is being executed for i ee Illumination seconds or longer have elapsed This mode is a
105. s of a to f on the following pages and secure these spaces in the user program or using the compiler options Figure 4 27 Reserved Area Used by MINICUBE2 Internal ROM space Internal RAM space MO 290H O max 16 bytes d Stack area for debugging 256 bytes 190H f Pseudo RRM area O 257 bytes 8FH a Debug monitor area 10bytes 85H c Security ID area 84H b Option byte area 7EH e Software break area 02H a Debug monitor area 00H Area that must be reserved QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 78 134 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 If this area is rewritten by flash self programming on chip debugging can no longer be performed How to secure areas When using NEC Electronics compiler CC78K0 addresses 0x02 0x03 and area starting from address can be secured for debug monitoring using the linker option go Figure 4 28 shows the 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 to 256 bytes in actuality 257 bytes from Ox8F to 0x18F are secured If the pseudo RRM function is used refer to f Figure 4 28 Linker Option Setting Debug Monitor Area Linker Options Output Output Library Others Load Module File o Output F
106. s 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 the target device is the 78KO Series 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 Specifications Target interface X1 X2 or OCD1A OCD1B Security 10 byte ID code authentication Download Available 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 Available DMM writing to memory during RUN Pin masking from execution start to break Max measurement time Approximately 100 hours User spaces used for debugging Internal ROM Min 257 bytes additional bytes when using RM function Internal RAM Min 7 bytes QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 69 134 4 2 2 System configuration Figure 4 19 illustrates the system configuration for on chip debugging Figure 4 19 System Configuration for On Chip Debugging NEG ELECTRONICS lt 2 gt Target system lt 1 gt Host machine Products with USB ports lt 2 gt Software Includes the debugger
107. se 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 5 134 Target Readers Purpose Organization INTRODUCTION This manual is intended for users who wish to perform debugging using the QB MINI2 generic name MINICUBE2 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 includes the following sections e Overview e Names and functions of hardware e Usage for each device How to Read This Manual lt is assumed that the readers of this manual have general knowledge in the Conventions 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 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
108. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 91 134 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 4 35 Standard Tab of Device Setup Dialog Box Device Setup Standard Advanced Parameter File PAM File Read Target Device Connection Supply Oscillator Port Speed Operation Wade OR Cancel 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 36 Parameter File Select Dialog Box Look int PRM 4 es FE 78F0547D prm File name 78FOS47D Files of type PRM Files PRM Cancel QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 92 134 lt 4 gt Set the items in the Target Device Connection Operation Mode and Supply Oscillator areas in accordance with your programming environm
109. stand verify and evaluate the following items before using MINICUBE2 e Circuits are designed as described in the user s manuals for the device and MINICUBE2 e The device QB Programmer and MINICUBE2 are used as described in each user s manual e The power supplied to the target system is stable QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 97 134 CHAPTER 5 HOW TO USE MINICUBE2 WITH 78KOS SERIES This chapter describes how to use MINICUBE2 when performing on chip debugging and flash programming for a 78KOS Series 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 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 the 78KOS Series 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
110. t 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 104 134 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 system 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 2 INTP QB MINI2
111. t mask receive error interrupts 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 T 6 5 4 3 2 1 0 PFC3 MECA QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 35 134 Example 2 Setting other than below is prohibited when the target device is the V850ES HG2 and CSIBO is used PCM 3 2 1 0 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 before 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 disable
112. t the parameter file for the target device and then click the button Figure 5 21 Parameter File Select Dialog Box Look ir E PAM F cE Ej 78F9234 pem Filename 78F5234 prm Files of type PRH Files PRM Cancel QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 125 134 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 Supply Oscillator r Port UART chO 7 Frequency BMHz MHz Speed 115200bps tiphirate Operation Mode Chip Start C Block Frid fi j 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 5 23 Advanced Tab of Device Setup Dialog Box Device Setup Standard Advanced r Command options W Blank check before Erase Security flag after Program Security flag settings Disable Chip Erase Disable Block Erase Disable Program mt QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 126 134 lt 6 gt By clicking the button the programming e
113. ted 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 y 16 pin target cable MINICUBE2 Target system QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 41 134 4 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 sd PAI A E eer er Se on 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 p
114. 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 23 134 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 100 2 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 V RESET OUT DD Buffer RESET_IN 4 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 t
115. ting 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 78K0 OCD board vary depending on how clock is supplied to the target device A 20 MHz oscillator is mounted on the 78K0 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 71 134 4 Connecting the target system Connect MINICUBE2 to the target system as shown in Figure 4 20 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 20 Connecting MINICUBE2 to Target System PAA ae 10 16 pin target cable 78K0 OCD MINICUBE2 board y Target system Remark Connect the 78K0 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 78K0 OCD board to the 10 pin target cable Figure 4 21 With 16 pin cable Connect C
116. to the 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 e 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 an NEC Electronics partner refer to the documents prepared by the partner company e Defect of MINICUBE2 MINICUBE2 may have a defect Refer to CHAPTER 6 SELF TESTING QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 73 134 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 3 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 74 134 4 2 5 Clock setting
117. ts lt 2 gt Software Includes the debugger USB driver device files and so on Download these NEC Electronics software from the following website ODS URL http www necel com micro ods eng 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 28 134 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 partner 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 Setting 3 3 V is supplied from MINICUBE2 to the target system Factory setting 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
118. ugging 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 102 134 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 reset circuit on the target system contains an N ch open drain buffer output resistance 100 2 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 V RESET_OUT Buffer RESET_IN 4 Remark Make the resistance of at least R1 ten
119. wn resistance for the FLMDO pin can be within 1 to 10 kQ QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 58 134 Notes 1 Figure 4 7 When Only Debugging Is Performed with X1 X2 Communication Vop Vop Vop 1 KQ Reset connector Target connector SON 10kQ Target device 10 kQ Portx e 4 OCD1ANote 5 GND 1 to 10 kQ This connection is designed assuming that the RESET signal is output from the N ch open drain buffer output resistance 100 2 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 During debugging the clock mounted on the 78K0 OCD board can be supplied If no clock is mounted a clock of 4 8 or 16 MHz can be supplied 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 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 59 134 Figure 4 8 When Only Debugging Is Performed with OCD1A 0CD1B Communication Vbo Vop VoD Vo 3 to 4 kQ 10kQ Reset connector Target connector Reece 10 KQ Target device 1 to 10 kQ
120. ystem can be used Power supply 3 or 5 V maximum current rating 100 mA Acquisition of device specific Parameter file for NEC Electronics PG FP4 is used information Security flag setting Available Standalone operation Unavailable must be connected to host machine 4 3 2 System configuration Figure 4 32 illustrates the system configuration for flash programming Figure 4 32 System Configuration for Flash Programming SS lt 4 gt lt 3 gt lt 1 gt 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 on Download these NEC Electronics software from the following website ODS URL http www necel com micro ods eng 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 QB MINI2 Preliminary User s Manual ZUD CD 06 0018 1 88 134 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
Download Pdf Manuals
Related Search
Related Contents
Homélie du 15.08.2011 Weatherables WTR-THDV42-S4 Instructions / Assembly CapitalBio PersonalArrayer 16 user manual aufbau- und gebrauchsanleitung instructions on assembly and use Retrospect 8 para Windows - Anexo de la Guía del usuario FS100 series 10/100Mbps Ethernet Switch RedMax EBZ8001 User's Manual EnovateIT HC20-LE-UBKT mounting kit Diva II SP ¶ libros Copyright © All rights reserved.
Failed to retrieve file