Renesas M16C FAMILY User Manual
Renesas M16C FAMILY User Manual

Renesas M16C FAMILY User Manual

Usb flash writer
Hide thumbs Also See for M16C FAMILY:
Table of Contents

Advertisement

REJ10J0143-0401Z
USB Flash Writer
User's Manual
RENESAS SINGLE-CHIP MICROCOMPUTER
M16C FAMILY / 740 FAMILY
Rev.4.01
Renesas Solutions Corp.
Revision date: Dec 24, 2004
www.renesas.com

Advertisement

Table of Contents
loading

Summary of Contents for Renesas M16C FAMILY

  • Page 1 REJ10J0143-0401Z USB Flash Writer User's Manual RENESAS SINGLE-CHIP MICROCOMPUTER M16C FAMILY / 740 FAMILY Rev.4.01 Renesas Solutions Corp. Revision date: Dec 24, 2004 www.renesas.com...
  • Page 2 (iii) prevention against any malfunction or mishap. Notes regarding these materials 1. These materials are intended as a reference to assist our customers in the selection of the Renesas Technology Corporation product best suited to the customer's application; they do not convey any license under any intellectual property rights, or any other rights, belonging to Renesas Technology Corporation or a third party.
  • Page 3 Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated. Preface Thank you for purchasing Renesas USB Flash Writer (M3A-0665). This manual describes how to use the hardware and software products included with USB Flash Writer (M3A-0665). To other tools, look other tools's manulas.
  • Page 4: Table Of Contents

    Table of Content Contents of Product ... 4 1.1 Contents of product ... 4 1.2 Operating Environment ... 5 1.3 Compatible Products... 5 1.4 Board Specification... 7 1.5 CD-ROM... 8 1.6 System Requirements... 8 Product Specifications... 9 2.1 FoUSB (Flash-over-USB) ... 9 2.2 KD30/KD3083 ...
  • Page 5 4.2.Other Functions ...48 Using the KD ...49 5.1 Using the KD...49 5.1.1 Before Starting the KD...49 5.1.2 Starting the KD...50 5.1.3 Program Download ...55 5.1.4 Program Execution ...56 5.1.5 Program Stop...56 5.1.6 Program Step Execution...56 5.1.7 Software Break Method ...57 5.1.8 Reset Execution...57 5.1.9 KD Completion...57 5.1.10 If a Communication Error Occurs ...58...
  • Page 6 6.7 A communication error occurred when debugging the program. What is the cause of this problem? ...74 6.8 A message "Source file cannot be found" was output. What should I do?...75 6.9 Is peripheral I/O operating during a break? ...75 6.10 Can coveragefunction be used in KD?...75 6.11 Can check sum function be used?...75 6.12 ID code written to microcomputer after KD exits? ...75...
  • Page 7: Contents Of Product

    1. Contents of Product This section shows the contents of theUSB Flash Writer’s product package. When unpacking your USB Flash Writer, check to see that all products listed below are included. 1.1 Contents of product Table 1-1 lists the products included in the USB Flash Writer. Table 1-1 USB Flash Writer Product List USB Monitor Board USB Cable (Used for the connection with the Host Computer.)
  • Page 8: Operating Environment

    1.2 Operating Environment The software includes USB Flash Writer run on the Host Computer (PC) under the OS (Operating System) version that are listed respectively in Table 1-2. Host Computer (PC) OS (Operating System) Memory 1.3 Compatible Products Compatible products with USB Flash Writer are as follows. Group MCU Product Name M16C/10...
  • Page 9 Group MCU Product Name M16C/24 M30245FCGP M16C/62A(M) M30620FCAFP/GP, M30621FCAGP M30620FCMFP/GP, M30621FCMGP M30624FGAFP/GP, M30625FGAGP M30624FGMFP/GP, M30625FGMGP M16C/62P M30622F8PFP/GP M30623F8PGP M30620FCPFP/GP M30621FCPGP M30624FGPFP/GP M30625FGPGP M30626FHPFP/GP M30627FHPGP M30626FJPFP/GP M30627FJPGP M16C/62N M3062GF8NFP/GP M16C/6N M306N4FCTFP M306N4FGTFP M306N5FCTFP M306NAFGTFP M306NBFCTFP M16C/80 M30800FCFP/GP, M30802FCGP M30803FGFP/GP, M30805FGGP M32C/83 M30833FJFP/GP M30835FJGP M32C/84...
  • Page 10: Board Specification

    1.4 Board Specification Table 1-5 shows the USB Monitor Board Specification. When saving these products, put them into the conductive bag. Store them into the container box which is used for shipping as possible Table 1-5 USB Monitor Board Specification Item Debug formula Monitor program...
  • Page 11: Cd-Rom

    1.5 CD-ROM The CD-ROM contains software products necessary for developing programs and electronic manuals as well. Here follow the contents of the CD-ROM. CD-ROM: Rev.2.10 or later \root |--- Readme_e.txt : Readme File (English version) |--- Readme_j.txt : Readme FIle (Japanese version) |--- \Document : User’s manual is included (English and Japanease version) |--- \FOUSB...
  • Page 12: Product Specifications

    The KD provides a powerful debugging environment. In addition, it is operationally compatible with and can therefore be used the same way as PD30 (or PD308F), the emulator control debugger for Renesas 16C/62 microcomputers. The features of the Remote Debugger are outlined below. For details, see Section “5.
  • Page 13 Table 2-2 PD308F and KD3083 comparison Item Software break function Hardware break function RAM monitor function Real time trace Time measurement function Script function Note: Software break numbers are dependent on the address match circuit numbers are built-in MCU. NOTICE: The software break number of MCUs Group software break number...
  • Page 14: Installing

    3.1 Before installing Do not connect the USB Cable which belongs to this product to the Host computer (PC) before installing. 3.2 Preparation before installing Be sure to confirm the following point before performing installation of a tool (GUI) and a driver. (1) The CD-ROM includes files required for the FoUSB (Flash-over-USB) installation.
  • Page 15: Fousb (Flash-Over-Usb) Installing

    3.3 FoUSB (Flash-over-USB) installing 3.3.1 Method of Installation 1) To install FoUSB, double-click “FoUSB_V.*.**.exe” on the folder into which you’ve copied FoUSB files from the CD-ROM. 2) Select the language of installer. 3) Click the <Next> button. 4) Only when you agree, click the <I Agree> button. 3 Installing...
  • Page 16 5) Choose the component which you want to install and click the <Next> button. NOTICE: Explanation of install component (a) Shortcut on Desktop The shortcut of a FoUSB (Flash-over-USB) execution file is created on a desktop. (b) Install USB Drivers FoUSB installer installs a USB Driver in the correct location of Windows system automatically.
  • Page 17 6) Choose the install location of FoUSB and click the <Install> button. The default install location of FoUSB is “C:\MTOOL\FOUSB”. 7) The following figure is displayed when the install component Click the <Yes> button. Next, warning is displayed. Please check that USB Monitor Board is not connected to your host computer (PC), and click the <OK>...
  • Page 18 Microsoft® Windows® XP and Windows®-based operating systems released after Microsoft® Windows® XP. This is aimed at elimination of illegal drivers and improvement of host computer (PC). Renesas USB Drivers are not authenticated by Microsoft, but we provide them based on the sufficient examination.
  • Page 19 10) The following figure is displayed when installation of USB Driver is completed. Click the <OK> button. 11) When the install component with a firmware older than the firmware of FoUSB. The following figure will be displayed if KD30 is detected. If you want to update a firmware, click the <Yes>...
  • Page 20: Method Of Uninstallation

    3 Installing 12) Finally, click the <Finish> button. 13) Now you’ve finished installing the FoUSB (Flash-over-USB). 3.3.2 Method of Uninstallation To uninstall the FoUSB (Flash-over-USB) you've installed, choose Settings -- Control Panel from the Start menu, and then click “Add/Remove Programs”. Select "Flash-over-USB V.*.** " from the program list and click the <Add/Remove>...
  • Page 21: Recognition Of Usb Monitor Board

    3.4 Recognition of USB Monitor Board From installer version “V.2.04”, the FoUSB installer has an automatic USB Driver install function (Refer to [3.3 FoUSB (Flash-over-USB) installing].). This section explains recognition of USB Monitor Board when confirming this function and installing FoUSB. When this function is not confirmed, please perform installation of a USB Driver, and recognition of USB Monitor Board with reference to [7.2 Installation of a USB Driver, and recognition of USB Monitor Board (Manual setup)].
  • Page 22 Microsoft® Windows® XP and Windows®-based operating systems released after Microsoft® Windows® XP. This is aimed at elimination of illegal drivers and improvement of host computer (PC). Renesas USB Drivers are not authenticated by Microsoft, but we provide them based on the sufficient examination.
  • Page 23: Recognition Of Usb Monitor Board 2 (For Fousb Driver)

    6) Click the <Finish> button. Windows system recognizes USB Monitor Board (for USBMON Driver). Recognition of USB Monitor Board for USBMON Driver is completion. 3.4.2 Recognition of USB Monitor Board 2 (for FoUSB Driver) 1) Remove the cover of USB Monitor Board and make a USB Monitor Board (Board) the following setup, before connecting USB Monitor Board to your host computer (PC).
  • Page 24 2) Connect the USB Monitor Board included with the package to the USB port of PC. The Power indicator (D1: Power) of USB Monitor Board lights. Figure 3-4 USB Monitor Board connectivity 3) When an operating system is automatically and recognizes USB Monitor Board. Recognition of USB Monitor Board for USBMON Driver is completion.
  • Page 25 Microsoft® Windows® XP and Windows®-based operating systems released after Microsoft® Windows® XP. This is aimed at elimination of illegal drivers and improvement of host computer (PC). Renesas USB Drivers are not authenticated by Microsoft, but we provide them baased on the sufficient examination.
  • Page 26: Other Notes

    3.4.3 Other Notes Caution: The “USB Drivers” folder below is stored. Driver Name USBMON Driver FoUSB Driver (Note) The Boot mode of USB MCU is used only for the use shown below. 1) Installation of FoUSB Driver 2) When the firmware of USB MCU is erased or damaged When the firmware of USB MCU is erased or damaged, the phenomenon of [6.4 FoUSB cannot operate Why?] or [6.6 A communication error occurs when the KD starts.
  • Page 27: Kd30/Kd3083 Intalling

    3.5 KD30/KD3083 intalling 3.5.1 Installing 1) Installing the Remote Debugger Double-click installer file on the CD-ROM (\KD\KD30) for KD30. In KD3083, the installer file is included in \KD\KD3083. 2) A flow of installation procedures is shown in the pages that follow. (a) Click the <Yes>...
  • Page 28 (d) Click the <Next> button. A default install location is “C:\MTOOL”. If an install location is changed, please click the <Browse> button and determine an install location. (e) Click the <Yes> button. (f) Click the <OK> button. 3) Now you've finished installing the KD30. Note: The installation of KD3083 is the same.
  • Page 29: Uninstalling The Remote Debugger

    3 Installing 3.5.2 Uninstalling the Remote Debugger To uninstall, choose Settings -- Control Panel from the Start menu, and then click the “Add/Remove Programs”. Select KD from the program list and click the <Add/Remove> button. An uninstall window will appear, with the integrated development environment uninsalled. The uninstallation of KD3083 is the same, too.
  • Page 30: Using The Fousb

    4. Using the FoUSB 4.1 Using the FoUSB (Flash-over-USB) 4.1.1 Before Starting the FoUSB 1) Check to see that the FoUSB is installed in your host computer (PC). 2) Check to see that PC, USB Cable, USB Monitor Board, Flat Cable and Target Board are firmly connected.
  • Page 31 3) Connection Method It specifies as a premise that MCU is carried on the Target Board. (1) Connection order when using the USB bus-powered. Connect in order of 2-4-3-1-host computer (PC). (2) Separation order after using the USB bus-powered. Connect in order of PC-1-3-4-2. (3) Connection order when using external power supply.
  • Page 32 (2) When using 3.3 V The power for the Target MCU is not supplied from the USB Monitor Board and must therefore be supplied from the Target Board. In this case, set the power source supply selector on the USB Monitor Board to the TARGET side as shown in Figure 4-3.
  • Page 33: Fousb Starts

    4.1.2 FoUSB starts 1) From the Start menu, choose Programs -- RENESAS-TOOLS – Flash-over-USB V.*.** -- FoUSB Programmer to start the FoUSB. When the FoUSB starts, the FoUSB main window shown in Figure 4-4 appears. ii) Update button 2) Guide to understanding the display of the main screen...
  • Page 34: Details Of Main Button 1

    4.1.3 Details of Main Button 1 1) “OPEN” button This button reads the downloading (programming) file to the Target MCU. (1) Click the “OPEN” button, and the screen shown in Figure 4-5 will appear, allowing you to choose the file to download into the Target MCU. The type of file that can be downloaded is HEX or Motorola.
  • Page 35 2) “READ” button This button performs to verify data written in the Target MCU and the file read by “OPEN”. Also, performs to read out data written in the Target MCU. (1) Clik the “READ” button, Figure 4-7 screen will appear. Figure 4-7 Flash Memory Read screen-1 (2) For Verify, click the <verify>...
  • Page 36 4 Using the FoUSB (3) For “Read Area”, specify the range of data to read in hexadecimal. By default, the data opens in a custom window. Click the <Read Area> button, and the downloaded data will be displayed, but not saved. If you wish, select the <Show ASCII>...
  • Page 37 (4) To change the custom window used for displaying data to an editor, select the <Display using>. By default, data is displayed in Notepad. To change Notepad to any editor, click the <Change Editor> button. (See Figure 4-11) Figure 4-11 Flash Memory Read screen-3 (5) To save the read data, select the <Save to Motorola S-Record File>...
  • Page 38 Figure 4-13 Save screen 3) “ERASE” button This button erases the Flash ROM in the Target MCU. (1) When you click the “ERASE” button, the screen changes to one of the following two depending on whether you’ve downloaded data using “OPEN”. (2) Before downloading You can choose to erase all blocks (Select All) or erase evry one block.
  • Page 39 (3) After downloading The system reads information from the downloaded data to determine which block to erase and marks the corresponding check box with a check mark and displays the block in color. Click the <Erase> button, and the block will be erased. You can erase all blocks collectively or one block at a time.
  • Page 40 When you click the “UNLOCK” button, the system checks ID code. The ID code check has automatic setting and manual setting. (1) Automatic setting Automatic setting checks in the following condition in ID code of 00h”. >> When FoUSB is started. >>...
  • Page 41 (2) Manual setting If you click the “UNLOCK” button, Figure 4-17 will be displayed. Enter the ID code and click the <OK> button. When the ID code written in the Target MCU matches with the input ID code and Figure 4-18 will be displayed. When the ID code does not match, Figure 4-19 will be displayed (Target MCU is locked) and enter the correct ID code.
  • Page 42 4 Using the FoUSB Example of File input In this example, the ID code of “01 02 03 04 05 06 07” is programmed in the Target MCU. First, click the “OPEN” button and open the HEX file or Motorola file which has an ID code.
  • Page 43 NOTICE: ID code address of MCU Series M16C/10 ID1: 0FFFDFh M16C/20 ID2: 0FFFE3h M16C/Tiny ID3: 0FFFEBh M16C/60 ID4: 0FFFEFh ID5: 0FFFF3h ID6: 0FFFF7h ID7: 0FFFFBh M16C/80 ID1: 0FFFFDFh M32C/80 ID2: 0FFFFE3h ID3: 0FFFFEBh ID4: 0FFFFEFh ID5: 0FFFFF3h ID6: 0FFFFF7h ID7: 0FFFFFBh R8C/Tiny ID1: 0FFDFh ID2: 0FFE3h...
  • Page 44 5) “PROGRAM” button This button performs programming to the Target MCU. (1) Click the “PROGRAM” button, and the screen shown in Figure 4-20 will appear. Figure 4-20 Program Flash screen (2) In the Choose an Options section, select either “Erase -> Program -> Verify” or “Program Only”.
  • Page 45: Details Of The Update Button

    (3) Erasing Options is useful when you select “Erase -> Program -> Verify” for Choose An Options, allowing you to select the method for erasing flash memory blocks. (a) Erase All Blocks All flash blocks are erased (b) Erase Only Needed Block Only the corresponding flash block is erased.
  • Page 46: Details Of The Select Mcu Button

    4.1.5 Details of the Select MCU Button 1) The following MCUs can be selected in FoUSB. Group MCU Product Name to select in FoUSB M16C/10 M30102F3 M16C/1N M301N2F8 M16C/24 M30245FC M16C/26 M30262F3 M30262F4 M30262F6 M30262F8 M16C/26A M30260F3A M30260F4A M30260F6A M30260F8A M30263F3A M30263F4A M30263F6A...
  • Page 47 2) When pressing the "Select MCU" button, the screen shown in Figure 4-21 is displayed. Select the Target MCU in this screen. First, select the category of the Target MCU to be used form the MCU Category Column (M16C/26 Group is selected from M16C/Tiny Series in Figure 4-21). Next, select the Target MCU to be used from the MCU Select Column.
  • Page 48 5) When the system has finished download the firmware, the screen shown in Figure 4-24 is displayed. Click the <OK> button. Figure 4-24 Completion screen NOTICE: The cautions about firmware download in 3.3V operation In 3.3V operation, firmware download to USB Monitor Board cannot be performed. The following error screen will be displayed if the firmware is downloaded to USB Monitor Board in 3.3V operation.
  • Page 49 c) Start FoUSB. At this time, although the following error screen is displayed, ignore the error and click the <OK> button. Figure 4-25 Error screen d) Click the “Select MCU” button and download the firmware to the USB Monitor Board. (Refer to 2) to 5) of this section for details) e) When the download of the firmware is completed, Figure 4-25 will be displayed again.
  • Page 50: Monitor Information

    4.1.6 Monitor Information 1) Monitor Firmware The version of the firmware currently written in the USB Monitor Board is indicated here. 2) MMI Loaded The name of the firmware currently written in the USB Monitor Board is indicated here. 3) Serial Boot Code The boot version written in the MCU is indicated here.
  • Page 51: Other Functions

    (1) Contents of Options Debug Mode: Whether debug mode is available (Unusable) Show splash screen: Whether FoUSB sound is available Ignore FoUSB Devices: Whether FoUSB devices are included (Unusable) Ignore Monitor Devices: Whether USB monitor is included (Unusable) Auto Unlock: Whether or not to automatically set ID code Multi-Programming Mode: Language: Language select (2) Automated Programming...
  • Page 52: Using The Kd

    5. Using the KD 5.1 Using the KD 5.1.1 Before Starting the KD 1) Corresponding MCU become only R8C/Tiny, M16C/10, M16C/20, M16C/Tiny, M16C/60 series, M16C/80 and M32C/80 series. 2) Check to see that the KD is installed in your host computer (PC). 3) Check to see that PC, USB Cable, USB Monitor Board, Flat Cable and Target Board are firmly connected.
  • Page 53: Starting The Kd

    5.1.2 Starting the KD 1) From the Start menu, choose Programs -- RENESAS-TOOLS – KD30 V.*.** Release* -- KD30 to start the KD. When the KD starts, the screen shown in Figure 5-2 appears. If the screen appears, click the <Refer…> button and choose MCU File.
  • Page 54 3) The Init screen of the Figure 5-4 opens when it is done after a MCU File is chosen. Choose “USB” as the communication interface and click the <OK> button. NOTICE: Precautions on KD3083 Emulation Memory The address allocated to the Emulation Memory cannot be debugged in the KD3083. Therefore, allocate the Emulation Memory to the address which is not used in debug.
  • Page 55 (a) At first an example to which the Emulation Memory overlaps the User Program is shown. In this example, the User Program is allocated from F00000h and the Emulation Memory is allocated from F00000h (using default value F0 of bank address).
  • Page 56 (b) Then an example to which the Emulation Memory does not overlap the User Program is shown. In this example, the User Program is allocated from F00000h and the Emulation Memory is allocated from E00000h (set E0 to the bank address). Since the Emulation Memory does not overlap the User Program, contents of the User Program and assemble codes are matched.
  • Page 57 5 Using the KD 4) This KD Main screen appears when the KD was able to communicate normally at startup. D. Reset button C. Stop button B. Step button A. Go button Figure 5-6 KD Main screen...
  • Page 58: Program Download

    5.1.3 Program Download 1) Download a program by "File -- Download" in KD Main screen. Please note that "SKPTest.x30" is not included in this product. 2) When completing the download, a program which is downloaded into "Program window" is indicated (See Figure 5-8). Figure 5-7 Program Download Figure 5-8 Program window 5 Using the KD...
  • Page 59: Program Execution

    5.1.4 Program Execution When completing download, click the "Go" button on the KD Main screen to execute a program. After this, the program is executed. 5.1.5 Program Stop Click the "Stop" button on the KD Main screen (Figure 5-6, C) to stop the program which is already executed after this, the program is stopped the KD Main screen is as Figure 5-8.
  • Page 60: Software Break Method

    5.1.7 Software Break Method When executing the software break, the software break can be set as the place which has "-" in "BRK" in Program Window screen. The KD Main screen is as Figure 5-10. 5.1.8 Reset Execution User Program is in the same status as immediately after download. Click the "Reset" button (Figure 5-6, D) on the KD Main screen.
  • Page 61: If A Communication Error Occurs

    5.1.10 If a Communication Error Occurs If a communication error occurs, the error screen shown in Figure 5-11 appears. In that case, click the “OK” button and check the following two points. When you finished checking, restart the KD. Check1: Is the power source supply selector on the USB Monitor Board set to USB side? Check2: Are the USB Cable and Flat Cable are firmly inserted into position? Figure 5-11 Communication Error screen...
  • Page 62: Kd Limitations

    5.2 KD Limitations 5.2.1 Limitations on Special Page Vector A Monitor Program uses several Special Page Vectors. Therefore, the Special page Vector which can be used in the User Program is limited as Special Page Vector Number shown in the following table. When updating the version of the Monitor Program (or Firmware), the Special Page Vector which can be used in the User Program may be modified.
  • Page 63: A Limitation Item About The C Language

    5.2.2 A limitation item about the C language When using Renesas C compiler. It is necessary to change a start up file (ncrt0.a30 and sect30.inc). (1) The change point of “ncrt0.a30” (a) Initialize standard I/O The UARTi setting is modified in the I/O initialization treatment. Therefore, to ensure that the I/O initialization treatment is not called up, comment it out.
  • Page 64: Limitations On Memory Extension

    5.2.3 Limitations on Memory Extension When using memory extension, make sure the power source supply selector on the USB Monitor Board is set to the be supplied from the Target Board. Memory extension cannot be used when the selector is set to the USB side. 5.2.4 Precautions on Internal Reserved Area Expansion Bit a.
  • Page 65: Limitations On Stop And Wait Modes

    5.2.5 Limitations on Stop and Wait Modes To use stop or wait modes in the User Program, start the KD in free-run mode. If you want to debug, close the RAM, C Watch and ASM Watch Windows before actually debugging. Furthermore, set a breakpoint or take other necessary measures when getting out of stop or wait mode in order to ensure that no window operations will be performed until the program stops at the breakpoint.
  • Page 66: Memory Map Limitations

    5.3 Memory Map Limitations Table 5-2 and Table 5-3 list the ROM/RAM areas which the monitor program uses. Figure 5-12 shows the memory map. Group M16C/10 M30102F3 M16C/1N M301N2F8 M16C/24 M30245FC M16C/26 M30262F3 M30262F4 M30262F6 M30262F8 M16C/26A M30260F3A M30260F4A M30260F6A M30260F8A M30263F3A M30263F4A...
  • Page 67 Table 5-3 ROM/RAM areas (2) Group M16C/6N M306N4FC M306N5FC M306N4FG M306NBFC M306NAFG M16C/80 M30800FC M30803FG M32C/83 M30833FJ M30835FJ M32C/84 M30845FJ M32C/85 M30855FW M30855FH M30852FJ M32C/86 M30865FJ M32C/87 M3087BFL R8C/10 R5F21102 Note1 R5F21103 Note1 R5F21104 R8C/11 R5F21112 Note2 R5F21113 Note2 R5F21114 R8C/12 R5F21122 Note3...
  • Page 68 00000h 00400h User RAM Area XXXXXh Monitor RAM Area YYYYYh ZZZZZh Flash Memory FF900h Monitor Area FFEFFh User Fixed Vector Area FFFFFh [M16C Series] 000000h 000400h User RAM Area XXXXXh Monitor RAM Area YYYYYh ZZZZZh Flash Memory FFF900h Monitor Area FFFEFFh User Fixed Vector Area...
  • Page 69: Peripheral Function Related Limitations

    5.4 Peripheral Function Related Limitations 1) UART pins (TxDi, RxDi) The UARTi transmit and receive interrupts are used for communication between the USB Monitor Board and host computer (PC). Make sure that UARTi is not used in the User Program. Do not connect the UART pins with other pins. UART1 use prohibition MCUs R8C/10 Group, R8C/11 Group, R8C/12 Group, R8C/13 Group, M32C/80 Series M16C/80 Group, M16C/Tiny Series, M16C/24(M30245) Group, M16C/62A(M) Group...
  • Page 70: Communication Function With Fousb

    5.5.1 Communication Function with FoUSB The clock synchronous serial I/O is used for FoUSB and the monitor program communication. When the data is received, the DBC interrupt generates and the monitor program is executed. The DBC interrupt is not influenced of I flag. (The receive interrupt is used for some models because there is no DBC interrupt.
  • Page 71: The Difference From An Actual Cpu Operation

    5) RAM monitor When using RAM monitor, a User Program execution is stopped temporarily. 6) Register reference When using register reference, a User Program execution is stopped temporarily and the data of CPU register and SFR is transferred. 7) User Program stop A User Program stops, a monitor program operates and it waits for next command.
  • Page 72: Troubleshooting

    6. Troubleshooting 6.1 FoUSB cannot communicate with the Target MCU Why? It is possible that the firmware written in the USB Monitor Board has gone wild. In such a case, temporarily remove the USB Cable and insert it back into position. 6.2 The MCU cannot enter standerd serial I/O why? 1) Check to see that the Busy signal is connected to the writer’s connector accurately.
  • Page 73 6 Troubleshooting Figure 6-1 FoUSB main window lights only Figure 6-2 USB Monitor Board (Board) In such a case, it is necessary to download firmware compulsorily to USB MCU. Please perform compulsive download of firmware to USB MCU according to the procedure shown in the following page.
  • Page 74: Compulsive Download Procedure Of Firmware

    6 Troubleshooting 6.4.1 Compulsive download procedure of firmware 1) Remove the cover of USB Monitor Board and make a USB Monitor Board (Board) the following setup. Shorted USB side 2) Connect the USB Monitor Board (Board) with your host computer (PC). 3) Start FoUSB (Flash-over-USB) and click the “Load MMI”...
  • Page 75 4) On the Chip Selection screen, select your MCU and download a firmware to the USB MCU. 5) If download of firmware is completed to USB MCU, since the completion screen of download will be displayed, click the <OK> button. 6) End FoUSB and separate a USB Monitor Board (Board) from your host computer (PC).
  • Page 76 8) Connect USB Monitor Board (Board) with your host computer (PC). 9) Since firmware has downloaded normally if a Power indicator (D4: Status) is lighting and the Status indicator is blinking as shown in the following figure, FoUSB and KD (KD30, KD3083) can be used.
  • Page 77: Can Fousb Information Be Transmitted To Kd

    6.5 Can FoUSB information be transmitted to KD? A written program using FoUSB cannot be debugged with KD. It is necessary to download a program on KD again when executing debug using KD. Therefore, written program information in flash area is not transmitted to KD30 (KD3083). 6.6 A communication error occurs when the KD starts.
  • Page 78: A Message "Source File Cannot Be Found" Was Output. What Should I Do

    3) If a communication error occurs frequently when debugging your program, check the following: When using an interrupt program in which multiple interrupts (interrupt from within another interrupt) are not enabled... -> If the interrupt program takes more than 260 µs of processing time, set the I flag to 1 at the beginning of the interrupt program.
  • Page 79: Debug Operation Has Not Worked Well

    6 Troubleshooting 6.13 Debug operation has not worked well Isn’t the resource of a Monitor Program used? When using the resource of the Monitor Program in debug, a communication error or an unexpected operation may occur. Therefore, note that the resource of the Monitor Program should not be used.
  • Page 80 e. Interrupt Interrupts shown below are the resources of the Monitor Program. Do not use these interrupts. Also, some microcomputers do not support the DBC interrupt (Note). In microcomputers which do not support the DBC interrupt (ex.: M16C/62A group), the UARTi receive interrupt is used.
  • Page 81: Message List

    6 Troubleshooting 6.14 Message List The following lists the messages output by FoUSB. Normal message Your device has been automatically unlocked with the ID code. The correct firmware already loaded on the USB Monitor Board. Do you want to reprogram anyway Programming in new firmware image Download successful!! Verify passed...
  • Page 82: Appendix

    7.1 USB Monitor Board 7.1.1 Board Specifications Figure 7-1 list Board specifications of USB Monitor Board. J1:USB connector (USB Cable) J2:UART Interface Figure 7-1 USB Monitor Board (Board specifications) 7. Appendix S1:Power Source Supply Selector JP1:MCU Mode Pin (Boot/User) M37641F8 LED’s: USB MCU D2(Red) - Stop...
  • Page 83: Pin Assignments

    7.1.2 Pin Assignments As an example of M16C/62A group, Pin assignments of the 10-pin connector (for Flat Cable) are shown in Figure 7-2. 8 10 10-Pin connector Figure 7-2 An example of 10-Pin connector pin assignment 7.1.3 Example Connection An example of how to connect the 10-pin connector (for the Flat Cable) to the Target Board is shown in following page.
  • Page 84 Example Connection for M16C/62A(M), 6N(M306NAFG, M306NBFC only), M3062GF8N, 80, 24 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign Pin No Port Signal p6_4 BUSY p6_5 SCLK p6_6 P5_0 P5_5 RESET CNVss p6_7 Example Connection for M16C/62P, 6N(M306N4FC, M306N4FG, M306N5FC only) USB Monitor Board FLAT Cable Connection Connector Type...
  • Page 85 Example Connection for M16C/26, 26A, 28, 29 [1] Note: It is necessary to connect the CE pin or the EPM (RP) pin and the P1_6 pin. The CE pin is connected in this Target. USB Monitor Board SCLK CNVss FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign...
  • Page 86 Example Connection for M16C/10 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign Pin No Port Signal p1_7 BUSY p1_6 SCLK p1_5 RESET CNVss P1_4 Example Connection for M16C/1N USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign Pin No...
  • Page 87 Example Connection for M32C/83 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign Pin No Port Signal p6_4 BUSY p6_5 SCLK p6_6 P5_0 P5_5 RESET CNVss p6_7 Example Connection for M32C/84, 85, 86, 87 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA...
  • Page 88 Example Connection for R8C/10, 11, 12, 13 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign Pin No Port Signal MODE CNVss p3_7 RxD1 RESET p0_0 TxD11 Example Connection for 7542 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign...
  • Page 89 Example Connection for 38C2 USB Monitor Board FLAT Cable Connection Connector Type HIF3FC-10PA-2.54DSA 10-Pin Connector assign Pin No Port Signal p3_0 BUSY p3_1 SCLK p3_3 RESET CNVss p3_2 Note: When the flash mode control pins are used for user' s application circuit. Refer to the 38C2 group (A version) datasheet for operation details.
  • Page 90: Power Source Supply Selector

    7.1.4 Power Source Supply Selector Specifications of the Power Source Supply Selector (S1: Power Mode) are shown in Table 7-1. Default State Switch No. (BUSPWRD) Note: The USB Monitor Board supplies a 5 V power. If a 3.3 V power supply is needed, choose to supply the power from the 7.1.5 LED Status Indicators The LED status indicators on the USB Monitor Board are listed in the table below.
  • Page 91: Installation Of A Usb Driver, And Recognition Of Usb Monitor Board (Manual Setup)

    7.2 Installation of a USB Driver, and recognition of USB Monitor Board (Manual setup) 7.2.1 For USBMON Driver 1) Remove the cover of USB Monitor Board and make a USB Monitor Board (Board) the following setup, before installing USBMON Driver. If a setup is completed, attach a cover in a USB Monitor Board (Board).
  • Page 92 4) Recognition of new hardware displays an install wizard. So click the <Next> button. 5) Select the method to search for your new hardware. Normally, choose “Search for the best driver for your device (Recommended)” and click the <Next> button. 6) Select the check box labeled “Specify a location”.
  • Page 93 7) When the Windows system has been prepared to install the driver the wizard shown in Figure 7-3 appears. So click the <Next> button. Figure 7-3 USBMON Driver-1 8) When the Windows system has finished installing the driver, the wizard shown in Figure 7-4 appears.
  • Page 94: For Fousb Driver

    7.2.2 For FoUSB Driver 1) Remove the cover of USB Monitor Board and make a USB Monitor Board (Board) the following setup, before installing FoUSB Driver. If a setup is completed, attach a cover in a USB Monitor Board (Board). Power Source Supply Selector (S1: Power Mode): USB side MCU Mode Pin (JP1: MCU Mode): Shorted 2) Connect the USB Monitor Board included with the package to the USB port of your host...
  • Page 95 4) Recognition of new hardware displayes an install wizard. So click the <Next> button. 5) Select the method to search for your new hardware. Normally, choose “Search for the best driver for your device (Recommended)” and click the <Next> button. 6) Select the check box labeled “Specify a location”.
  • Page 96 7) When the Windows system has been prepared to install the driver, the wizard shown in Figure 7-5 appears. So click the <Next> button. Figure 7-5 FoUSB Driver-1 8) When the Windows system has finished installing the driver, the wizard shown in Figure 7-6 appears.
  • Page 97 7 Appendix 10) Remove the cover of USB Monitor Board and make a USB Monitor Board (Board) the following setup. If a setup is completed, attach a cover in a USB Monitor Board (Board). MCU Mode Pin (JP1: MCU Mode): Open Open...
  • Page 98: Referencing Electronic Manuals

    Reader from the home page of Adobe Systems Incorporated. For latest information as to Adobe Acrobat Reader, go to the following URLs. http://www.adobe.co.jp/ http://www.adobe.com/ 7.4 Product Information The latest information about this product is carried here. M16C Family http://www.renesas.com/en/m16c 740 Family http://www.renesas.com/en/740 7 Appendix...
  • Page 99 AVSS AVCC Vss1 Vss2 SML-LX0603YW SML-LX0603GW SML-LX0603IW Xout CNVSS...
  • Page 100 REVISION HISTORY Rev. Date Page 2.00 Jul 12, 2003 2.10 Sep 12, 2003 2.20 Oct 15, 2003 2.30 Nov 05, 2003 2.40 Jan 15, 2004 3.00 Jan 31, 2004 3.01 Feb 15, 2004 4.00 Jul 30, 2004 4.01 Dec 24, 2004 51 - 53 Description Summary...
  • Page 101 Rev. Date Page 63, 64 4.01 Dec 24, 2004 76, 77 80 - 86 Description Summary Section “5.2.4 Precautions on Internal Reserved Area Expansion Bit” is added Description of Section “5.2.6” is changed ROM/RAM Area Table is upgrade Description of NMI pin is deleted from Section “5.4” Description of Realtime and Reset Vector Table in Section “5.5.3”...
  • Page 102 USB Flash Writer User's Manual Publication Date Rev.1.00 Oct 23, 2002 Rev.4.01 Dec 24, 2004 Published by: Renesas Solutions Corp. 4-1-6, Miyahara, Yodogawa-ku, Osaka City, 532-0003, Japan ©2004 Renesas Technology Corp. and Renesas Solutions Corp., All Rights Reserved. Printed in Japan.
  • Page 103 USB Flash Writer User's Manual Renesas Solutions Corp. 4-1-6, Miyahara, Yodogawa-ku, Osaka City, 532-0003, Japan...

This manual is also suitable for:

M3a-0665

Table of Contents