background image

 

 

Right click on the 

FlashLEDs();

 function and 

select ‘Go To Cursor’ as illustrated. 

 

The code will execute to the selected line and stop. An automatic breakpoint was inserted in the code and then removed after calling the 

break. 

 

Press ‘Step Over’ on the debug toolbar. 

 

The code will run and flash the LEDs 200 times. The debugger will not exit until all 200 flashes have completed or a button is pressed on the 

Renesas Starter Kit. 

 

To stop the LEDs flashing press the SW1 button on the Renesas Starter Kit to exit the 

FlashLEDs()

 function. 

The code will run to the breakpoint we previously set on the 

TimerADC

 function, note that the yellow PC arrow will now be superimposed 

on the breakpoint indicator, this confirms the breakpoint has been reached. 

The 

TimerADC

 function initialises an interrupt on an available internal timer. On a compare match in the timer module, an interrupt is 

generated. In the 

TimerADC

 code version the interrupt reads the last ADC conversion from the external potentiometer and uses the 

result to set the next compare match value. The ADC conversion is then re-started. 

The interrupt initialisation is completed as part of the hardware setup. This is contained in the file ‘interrupts.c’. 

 

Open the file ‘interrupts.c’ by double clicking on the file in the Workspace window. 

 

Review this file and find the interrupt function that changes the LED pins; 

Timer2_Handler(void)

 

Set a breakpoint on the line where the LED pins are modified. 

 

Press <Go> or <F5> to run the code from the 

current PC position. 

 

The code will stop in the interrupt routine. It is now possible to step through the interrupt function. 

 

Remove the breakpoint in the interrupt by double clicking again before exiting the function. 

 

Press <Go>to run the code from the current PC 

position. 

 

The code will now run to the infinite loop at the end of Main. The user LEDs will now be flashing. You can modify the flashing rate by 

adjusting the potentiometer on the Renesas Starter Kit. 

 

Press <Stop> on the debug toolbar. 

 

 

11 

Summary of Contents for M3T-ICC740

Page 1: ...ok over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electron...

Page 2: ...t for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas...

Page 3: ...Renesas Starter Kit for 38D5 Tutorial Manual for M3T ICC740 User s Manual Rev 2 00 2007 08 RENESAS SINGLE CHIP 8 BIT CMOS MICROCOMPUTER 740 FAMILY...

Page 4: ...iguration 5 4 3 2 Debug Session 5 Chapter 5 Building the Tutorial Project 6 5 1 Building Code 6 5 2 Connecting the debugger 7 5 3 Connecting to the target with the E8a 7 Chapter 6 Downloading and Runn...

Page 5: ...ed trademarks of their respective companies or organisations Copyright Renesas Solutions Corporation 2007 All rights reserved Renesas Technology Europe Ltd 2007 All rights reserved Renesas Technology...

Page 6: ...strating code suitable for release in a product Files referred to in this manual are installed using the project generator as you work through the tutorials The tutorial examples in this manual assume...

Page 7: ...nfiguration menu in High performance Embedded Workshop allows the project to be configured such that certain files may be excluded from each of the build configurations This allows the inclusion of th...

Page 8: ...en a new tutorial workspace from the File New Workspace menu or select Create a new project workspace when presented with the Welcome dialog The example above shows the New Project Workspace dialog wi...

Page 9: ...o build configurations and two debug sessions The Build Configuration allows the same project to be built but with different compiler options The options available to the user are fully described in t...

Page 10: ...ts to be aware of the options available Note For the purposes of the tutorial leave all options at default When complete close the dialog box by clicking OK 5 1 Building Code There is a choice of thre...

Page 11: ...g that pin 1 on the module corresponds to the indication on the Renesas Starter Kit PCB Connect the E8a debugger to the USB port on your computer Connect the E8a Debugger to the target hardware ensuri...

Page 12: ...cted Note The connection to the target will activate the debugger buttons on the High performance Embedded Workshop toolbar Now is a good time to save the High performance Embedded Workshop session Se...

Page 13: ...Note The output display will show Flash memory write end to confirm the completion of the download On completion of the download the debugger is ready for the code to be executed To start debugging it...

Page 14: ...oint Alternatively set an eventpoint by double clicking in the column to the left of the breakpoint column Up to 2 eventpoints can be set Eventpoints do not require programming the flash memory and so...

Page 15: ...he TimerADC code version the interrupt reads the last ADC conversion from the external potentiometer and uses the result to set the next compare match value The ADC conversion is then re started The i...

Page 16: ...ess Reset Go on the debug toolbar The code will stop at the breakpoint Press one of the Renesas Starter Kit buttons to bypass the flashing LED test Press Step In on the debug toolbar It is possible to...

Page 17: ...acter of the variable string has been replaced with the first character of the constant replacement string Remove the breakpoint Right click on the DisplayString function call after the loop and selec...

Page 18: ...t text describing the function of each code entry Please refer to the source code for greater detail on the purpose and operation of the compiler specific details 7 1 1 Initialisation code resetprg c...

Page 19: ...h There are four common stages to the configuration of the microcontroller device The code to demonstrate this is therefore split into four functions Each function is written specifically for the devi...

Page 20: ...s common to all tutorial projects The display initialisation and string display functions operate on the LCD display module Check compatibility with ks0066u controller and pin connection on the schema...

Page 21: ...on available for this product can be found on the Renesas website at http www renesas com renesas_starter_kits General information on Renesas Microcontrollers can be found at the following websites Gl...

Page 22: ...or M3T ICC740 Publication Date Rev 2 00 Aug 10 2007 Published by Renesas Solutions Corp 4 1 6 Miyahara Yodogawa ku Osaka City 532 0003 Japan 2007 Renesas Solutions Corp Renesas Technology Europe Ltd a...

Page 23: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan Renesas Starter Kit for 38D5 REJ10J1558 0200 Tutorial Manual for M3T ICC740...

Reviews: