Renesas RX Smart Configurator APPLICATION NOTE

APPLICATION NOTE
R20AN0470EJ0120
RX Smart Configurator
Rev.1.20
User’s Guide: CS+
Introduction
This application note describes the basic usage of the RX Smart Configurator (hereafter called the Smart Configurator), and the procedure for adding its output files to CS+ projects.
References to the Smart Configurator and CS+ integrated development environment in this application note apply to the following versions.
CS+ (CS+ for CC) V8.01.00 and later
RX Smart Configurator V2.0.0 and later
CS+ RX Smart Configurator Communicat ion Plugins V1.02.02 and later
Target Devices
Refer to the following URL for the range of supported devices:
https://www.renesas.com/smart-configurator
Jan 25, 2019
Contents
1. Overview .......................................................................................................................... 4
1.1 Purpose ......................................................................................................................................... 4
1.2 Features ........................................................................................................................................ 4
1.3 Software Components ................................................................................................................... 4
2. Before Using the Smart Configurator ................................................................................ 5
2.1 Preparing the CS+ (CS+ for CC) Integrated Development Environment ..................................... 5
2.2 Installing the Smart Configurator................................................................................................... 5
2.3 Setting the CS+ Integrated Development Environment ................................................................ 5
2.3.1 Checking the plug-in settings .................................................................................................. 5
2.3.2 Checking the setting of the execution path ............................................................................. 6
2.4 Uninstalling the Smart Configurator .............................................................................................. 6
3. Operating the Smart Configurator ..................................................................................... 7
3.1 Procedure for Operations .............................................................................................................. 7
3.2 Starting the Smart Configurator .................................................................................................... 8
3.3 File to be Saved as Project Information ........................................................................................ 8
3.4 Window .......................................................................................................................................... 9
3.4.1 Main menu ............................................................................................................................ 10
3.4.2 Toolbar .................................................................................................................................. 10
3.4.3 Smart Configurator view ....................................................................................................... 11
3.4.4 MCU Package view ............................................................................................................... 11
3.4.5 Console view ......................................................................................................................... 12
3.4.6 Configuration Problems view ................................................................................................ 12
R20AN0470EJ0120 Rev.1.20 Page 1 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
4. Setting of Peripheral Modules ......................................................................................... 13
4.1 Board Settings ............................................................................................................................. 13
4.1.1 Selecting the device .............................................................................................................. 13
4.1.2 Selecting the board ............................................................................................................... 14
4.1.3 Exporting board settings ....................................................................................................... 15
4.1.4 Importing board settings ....................................................................................................... 15
4.2 Clock Settings ............................................................................................................................. 16
4.3 Component Settings .................................................................................................................... 17
4.3.1 Adding Code Generator components ................................................................................... 17
4.3.2 Downloading a FIT module ................................................................................................... 19
4.3.3 Adding FIT drivers or middleware ......................................................................................... 20
4.3.4 Switching between the component view and hardware view ............................................... 21
4.3.5 Removing a software component ......................................................................................... 22
4.3.6 Setting a CG driver ............................................................................................................... 23
4.3.7 Changing the resource for a CG configuration ..................................................................... 24
4.3.8 Setting a FIT software component ........................................................................................ 27
4.3.9 Version change of FIT software component ......................................................................... 28
4.3.10 Configure general setting of component ............................................................................... 30
4.4 Pin Settings ................................................................................................................................. 31
4.4.1 Changing the pin assignment of a software component ....................................................... 32
4.4.2 Assigning pins using the MCU Package view ....................................................................... 33
4.4.3 Exporting pin settings ............................................................................................................ 34
4.4.4 Importing pin settings ............................................................................................................ 34
4.4.5 Pin setting using board pin configuration information ........................................................... 35
4.4.6 Pin filter feature ..................................................................................................................... 35
4.5 Interrupt Settings ......................................................................................................................... 36
4.5.1 Changing the interrupt priority level and fast interrupt setting .............................................. 37
4.5.2 Changing the interrupt vector number .................................................................................. 38
5. Managing Conflicts ......................................................................................................... 39
5.1 Resource Conflicts ...................................................................................................................... 39
5.2 Resolving pin conflicts ................................................................................................................. 40
5.3 Missing Dependencies ................................................................................................................ 41
6. Generating Source Code ................................................................................................ 42
6.1 Registering Generated Source Code with CS+ .......................................................................... 42
6.2 Configuration of Generated Files and File Names ...................................................................... 43
6.3 Initializing Clocks ......................................................................................................................... 46
6.4 Initializing Pins............................................................................................................................. 47
6.5 Initializing Interrupts .................................................................................................................... 50
6.6 Component Settings .................................................................................................................... 51
6.6.1 FIT module configuration ...................................................................................................... 51
7. Creating User Programs ................................................................................................. 53
7.1 Adding Custom Code in the Case of Firmware Integration Technology (FIT) ............................ 53
7.2 Adding Custom Code in the Case of Code Generator ................................................................ 54
R20AN0470EJ0120 Rev.1.20 Page 2 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
8. Backing up Generated Source Code .............................................................................. 56
9. Generating Reports ........................................................................................................ 57
9.1 Report on All Configurations (Text File) ...................................................................................... 57
9.2 Configuration of Pin Function List and Pin Number List (in csv Format) .................................... 58
9.3 Image of MCU Package (in png Format) .................................................................................... 58
10. Help ................................................................................................................................ 59
10.1 Help ............................................................................................................................................. 59
11. Documents for Reference ............................................................................................... 60
Website and Support ............................................................................................................. 61
R20AN0470EJ0120 Rev.1.20 Page 3 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

1. Overview

1.1 Purpose

This application note describes the basic usage of the Smart Configurator and CS+ integrated development environment, includi ng the procedure for creating a project and adding Smart Configurator output to CS+ projects.
Refer to the User’s Manual of CS+ for how to use CS+.

1.2 Features

The Smart Configurator is a utility for combining software to meet your needs. It handles the following three functions to support the embedding of drivers from Renesas in yo ur systems: importing middleware in the form of FIT (Firmware Integration Technology) modules, generating driver code, and making pin settings.

1.3 Software Components

The Smart Configurator supports two types of software components: Code Generator (CG) and Firmware Integration Technology (FIT). Drivers and middleware supported by each software type are:
Basic drivers:
CG drivers (CMT, A/D Converter, SCI, etc.)
FIT modules (CM T, DTC, DMAC, RS PI, SCIFA, etc.)
Middleware:
FIT modules (USB, Ethernet, Flash Memory (programming the on-chip flash memory), etc.)
The basic driver is a control program for peripheral functions of microcomputer such as CMT, A/D converter, SCI, etc. It is convenient to embed a software component (CG driver or FIT module) using code generation function. In addition, FIT modules can be embedded for using middleware such as USB, Ethernet, and Fla sh mem o ry (programming the on-chip flash memory) as software components.
R20AN0470EJ0120 Rev.1.20 Page 4 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

2. Before Using the Smart Configurator

2.1 Preparing the CS+ (CS+ for CC) Integrated Development Envir onmen t

To create or build a program in the CS+ integrated development environment with the use of source code generated by the Smart Configurator, you will need to install CS+ to handle building for the target device.

2.2 Installing the Smart Configurator

Download the RX Smart Configurator and CS+ RX Smart Configurator Communication plug-in from the URL below. The CS+ RX Smart Configurator communication plug-in is required for registering source code generated by the Smart Configurator with CS+.
https://www.renesas.com/smart-configurator
After activating the installer, install the Smart Configurator and the plug-in by following the procedure of the installer. You will require administrator privileges to do thi s.

2.3 Setting the CS+ Integrated Development Environment

Source files the S mart C onfigurator generates can be registered with CS+, and CS+ can be set to the configuration required to build the registered source files. This is set up automatically at the time the Smart Configurator is installed; however, you will need to check the settings against the following and modify them a s req uired.

2.3.1 Checking the plug-in settings

Select [Plug-in Manager] from [Tool] of CS+ menu, and confirm that there is a tick against “Smart Configurator for RX Communication Plug-in”. Tick it if it is not.
Figure 2-1 Plug-in Manager
R20AN0470EJ0120 Rev.1.20 Page 5 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

2.3.2 Checking the setting of the execution path

[Smart Configurator (Design Tool)] is displayed under [Project name (Project)] in the Project Tree when you open the CS+ project for the target device of the Smart Configurator.
Click on [Smart Configurator (Design Tool)], and the Smart Configurator Property panel is displayed.
Figure 2-2 Displaying the Property
“Smart Configurator for RX executable file path” shows the executable file of the Smart Configurator . The following path is set when the Smart Co nfigurator is installed with the default setting (where “CS+” and “SmartConfigurator” are in the same level).
32-bit environment:
“C:¥Program Files¥Renesas Erectronics¥SmartConfigurator¥RX¥eclipse¥SmartConfigurator.exe”
64-bit environment:
"C:¥Program Files (x86)¥Renesas Electronics¥SmartConfigurator¥RX¥eclipse¥SmartConfigurator.exe"
When manually specifying the path of the executable file, “Smart Configurator for RX executable file path” can be set as either a relative or an absolute path.

2.4 Uninstalling the Smart Configurator

If you wish to uninstall the Smart Configurator, select “Smart Configurator for RX” and “CS+ SC Communication Plugins for RX” from [Apps and Features] in the control panel and uninstall them.
R20AN0470EJ0120 Rev.1.20 Page 6 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Operations in CS+
Operations in the Smart Configurator
Starting CS+
Creating and loading a CS+ project
Starting the Smart Con figurator
Setting of peripheral modules
Generating source code
Creating user programs
Building
Execution and debugging
Setting of pins
Refer to section 3.2, Starting the
Refer to chapter 7, Creating User
Refer to chapter 4, Setting of Peripheral Modules.
Refer to section 4.4, Pin Settings.
Refer to chapter 6, Generating
Device information Toolchain information
Registeri ng s ource files
Generating reports
Refer to chapter 9, Generating
Setting of interrupts
Refer to section 4.5, Interrupt
Settings.

3. Operating the Smart Configurator

3.1 Procedure for Operations

Figure 3-1 shows the procedure for using the Smart Configurator to generate files for setti ng up peripheral modules, and to use them i n building after registration with CS+. Refer to the related documents on CS+ for the operation of CS+.
Smart Configurator.
Source Code.
Programs.
R20AN0470EJ0120 Rev.1.20 Page 7 of 61 Jan 25, 2019
Reports.
Figure 3-1 Procedure for Operations
RX Smart Configurator User's Guide: CS+

3.2 Starting the Smart Configurator

Double-click on [Smart Configurator (Design Tool)] under [Project name (Project)] in the Project Tree of CS+ to start the Smart Configurator. You do not need to select a device or toolchain for the Smart Configurator, since the settings of the project for CS+ are passed over to the Smart Configurator.
Figure 3-2 Activation of Smart Configurator
Note: The settings of CS+ are not passed over to the Smart Configurator in the following cases: when the
Smart Configurator is activated from its executable file, when a new project is created from [File] menu of the Smart Configurator, or when an existin g file from the Smart Configurator is opened.

3.3 File to be Saved as Project Information

The Smart Configurator saves the setting information such as the target MCU for the project, build tool, peripheral modules, and pin functions in a p roject file (*.scfg), and refers to this i nformation.
When the Smart Configurator is activated from CS+, the project file from the Sma rt Configurator is saved in “project name.scfg”, which is at the same level as the project file (*.mtpj) of CS+.
R20AN0470EJ0120 Rev.1.20 Page 8 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)
(4)
(5)
(6)

3.4 Window

The main window is displayed when the Smart Configurator is started. The confi guration of the window is s hown in Figure 3-3, Ma in Window.
1) Menu bar
2) Main toolbar
3) Smart Configurator view
4) MCU Package view
5) Console view
6) Configuration Problems view
Figure 3-3 Main Window
R20AN0470EJ0120 Rev.1.20 Page 9 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Menu
Details
File
New
The dialog box [New Smart Configurator File], whic h is used to create a new project, is displayed.
Open
The dialog box [Open], which opens an existing project, is displayed.
Save
Saves a project with the same name.
Restart
Smart Configurator is restarted.
settings handed over from CS+.
Exit
Execution of the Smart Configurator is terminated.
Window
Preference
The dialog box [Preference], which is used to specify the properties of the project, is displayed.
Show view
The dialog box [Show view], which is used to set the view of the window, is displayed.
Help Help Contents
The help menu is displayed.
About
The version information is displayed.
Toolbar button
Related menu item
[File] [New]
[File] [Open]
[File] [Save]

3.4.1 Main menu

Table 3-1, Main Menu Items, lists the items of the mai n me n u.
Table 3-1 Main Menu Items
Do not use this menu item in general, as it leads to deletion of the project

3.4.2 Toolbar

Some functions of the main menu are allo c a te d to the buttons on the toolbar. Table 3-2, Toolbar Buttons and Related Menu Items, shows the description of those tool buttons.
Table 3-2 Toolbar Buttons and Relat ed Menu Items
R20AN0470EJ0120 Rev.1.20 Page 10 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

3.4.3 Smart C onfigurator view

The Smart Configurator view consists of six pages: [Overview], [Board], [Clocks], [Components], [Pins], and [Interrupts]. Select a page by clicking on a tab; the displayed page will be changed.
Figure 3-4 Smart Configurator View

3.4.4 MCU Package view

The states of pins are displayed on the figure of the MCU package. The settings of pins can be modified from here. Two types of package view can be switched between [Assigned] and [Default Board]. [Assigned] displays the
assignment sta t us of the pin setting, and [D efault Board] displays the initial pin setting information of the board. The initial pin setting information of the board is the pin information of the board selected by [Board:] on the [Board] page (refer to "4.1.2 Selecting the board").
Figure 3-5 MCU Package View
R20AN0470EJ0120 Rev.1.20 Page 11 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

3.4.5 Console view

The Console view displays details of cha nges to the configuration made in the Smart Configurator or MCU Package view.
Figure 3-6 Conso le View

3.4.6 Configuration Problems view

The Configuration Problems view displays the details of conflicts between pins.
Figure 3-7 Configuration Problems View
R20AN0470EJ0120 Rev.1.20 Page 12 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

4. Setting of Peripheral Modules

You can select peripheral modules from the Smart Configurator view.

4.1 Board Settings

You can change the board and device on the [Board] tabbed page.

4.1.1 Selecting the device

Click on the [ ] button to select a device.
Figure 4-1 Selecting the Device
Note: Device change is not reflected to the device (micro controller) of CS+ project.
R20AN0470EJ0120 Rev.1.20 Page 13 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

4.1.2 Selecting the board

By selecting a board, the following settings can be changed at one time.
Pin assignment (Initial pin setting)
• Frequency of the main clock
Frequency of the sub-clock
• Target device
The board setting information is defined in the Board Description File (.bdf). The .bdf file of Renesas made board (e.g. Renesas Starter Kit) can be downloaded from website and imported. In addition, by downloading the .bdf file provided by the alliance partner from website an d importing it, it is possible to
select alliance part boards.
Figure 4-2 Selecting the Board
Note: Depending on the board selected, the device will change, Device change is not reflected to the device
(micro controller) of CS+ project.
R20AN0470EJ0120 Rev.1.20 Page 14 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(1)

4.1.3 Exporting board settings

Follow the procedure below to export the board settings. (1) Click on the [ (Export board setting)] button on the [Board] tabbed page. (2) Select the output location and specify a name (Display Name) for the file to be exported.
Figure 4-3 Exporting Board Settings (bdf Format)

4.1.4 Importing board settings

Follow the procedure below to import board settings. (1) Click on the [ (Import board setting)] button and select a desired bdf file. (2) The board of the imported settings is added to the board selection menu.
Figure 4-4 Importing Board Settings (bdf Format)
Once a board setting file is imported, the added board is also displayed in the board selection menu of other projects for the same device group.
R20AN0470EJ0120 Rev.1.20 Page 15 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(5)
(3)
(6)
(4)
(2)
(1)

4.2 Clock Settings

You can set the system clock on the [Clocks] tabbed page. The settings made on the [Clocks] page are used for all drivers and middleware.
Follow the procedure below to modify the clock settings. (1) Specify the VCC voltage. (2) Select the clocks required for device operations on the board (the main clock is selected by default). (3) Specify the frequency of each clock in accordance with the board specifications (note that the frequency i s fixed
for some internal clocks). (4) When using the PLL circuit, select the clock source for the PLL. (5) For the multiplexer symbol, select the cloc k source for the output clocks. (6) To obtain a desired output clock frequency, select a frequency division ratio from the drop-down list.
Figure 4-5 Clock Settings
R20AN0470EJ0120 Rev.1.20 Page 16 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Components t ree
(1)

4.3 Component Settings

Drivers and middleware can be combined as software components on the [Components] page. Added components are displayed in the Components tree at the left of the page.
Figure 4-6 [Components] Page
The Smart Configurator supports two types of software components: Code Generator (CG) components and Firmware Integration Technology (FIT) modules.

4.3.1 Adding Code Generator components

The following describes the procedure for adding a component.
(1) Click on the [ (Add component)] icon.
Figure 4-7 Adding a Component
R20AN0470EJ0120 Rev.1.20 Page 17 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(2)
(3)
(4)
(5)
(7)
(6)
(2) Select a component from the list in the [Software Component Selection] page of the [New Compone nt ] dia log
box (e.g. Single Scan Mode S12AD).
(3) Che ck that [Type] for the selected component is [Code Generator]. (4) Cli ck on [Next].
Figure 4-8 A dding a Code Generator Component
(5) Specify an appropriate configura t ion name in the [Add new configuration for selected component] page of the
[New Compone nt] dialog box or use the default name (e.g. Config_S12AD0).
(6) Select a hardware resource or use the default resource (e.g. S12AD0). (7) Cli ck on [Finish].
Figure 4-9 Adding a Component
R20AN0470EJ0120 Rev.1.20 Page 18 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(2)
(3)
(3)
(4)
(5)

4.3.2 Downloading a FIT module

You need to download a desired FIT driver or middleware from the Renesas Electronics website. First, log in to "My Renesas" from CS+, then follow the procedure below.
(1) Click on the [ (Add component)] icon. (2) Clic k the [Download more software components] link i n t he [Software Component Selection] page of the [New
Component] dialog box to download a FIT module.
Figure 4-10 Downloading More Software Components
(3) Select the checkbox of the required module in t he [FIT Module Download] dialog box. If [Show RX Driver
Package only] is unchecked, filtering of items is canceled.
(4) Cli ck on [Browse...] to select the location where the downloaded module is to be stored. (5) Cli ck on [Download] to start downloading the selected FIT module.
Figure 4-11 Downloading a FIT Module
R20AN0470EJ0120 Rev.1.20 Page 19 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(2)
(3)
(4)

4.3.3 Adding FIT drivers or middleware

The following describes the procedure for adding FIT drivers or middleware.
(1) Click on the [ (Add component)] icon. (2) Select components f rom the list in the [Software Component Selection] page of the [New Compone nt] dialog
box (e.g. r_ether_rx and r_qspi_smstr_rx). Two or more components can be selected by clicking with the Ctrl key pressed.
(3) Che ck that [Type] for the selected components is [FIT]. (4) Click on [Finish].
Figure 4-12 Adding FIT Modules
R20AN0470EJ0120 Rev.1.20 Page 20 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)

4.3.4 Switching between the component view and hardware view

The Smart Configurator also provides a function for adding a new component by directly clicking a node in the Components tree . To use this function, you need to switch the view o f the Components tree from the component view to the hardware view.
(1) Click on the [ (View Menu)] icon and select [Show by Hardware View]. The Components tree will display
the components in a hardware resource hierarchy.
Figure 4-13 Switching to the Hardwa re View
(2) Double-click on a hardware resource node (e.g. S12AD1 under 12-bit A/D converter) to open the [New
Component] dialog box.
(3) Select a component from the list (e.g. Single Scan Mode S12AD) to add a new configuration as described in
section 4.3.1.
Figure 4-14 Adding a CG Component to the Hardware View
R20AN0470EJ0120 Rev.1.20 Page 21 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(2)
(1)

4.3.5 Removing a software component

Follow the procedure below to remove a software component from a project.
(1) Select a software component from the Components tree. (2) Click on the [ (Remove component)] icon.
Figure 4-15 Removing a Software Component
The selected software component will be removed from the Components tree.
Source files generated for this component are not removed from the CS+ project tree. After generating source code by clicking [ (Generate Code)] icon, the source files generated for removed component will be removed from the CS+
project tree.
R20AN0470EJ0120 Rev.1.20 Page 22 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2) b.
(2) c.
(2) d.
(2) a.

4.3.6 Setting a CG driver

Follow the procedure below to set up a CG configuration.
(1) Select a CG configuration from the Components tree (e.g. Config_S12AD0). (2) Configure the driver in the [Configure] panel to the right o f the Components tree. The following steps and figure
show an example.
a. Select AN000. b. Select [A/D conversion start trigger pin] under [Conversion start trigger setting]. c. Click on [Advance settin g] to expand the view. d. Select [Discharge] for [Charge setting].
Figure 4-16 Setting a CG Driver
Generation of a code in accordance with each CG configurat ion is enabled by default. Right-clicking on a CG configuration and then selecting the [ ] icon changes the icon to
[ ] and disables code generation for the CG configuration. To enable code generation again, click on the [ ] icon and change it t o [ ].
R20AN0470EJ0120 Rev.1.20 Page 23 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)
(4)

4.3.7 Changing the resource for a CG configuration

The Smart Configurator enables you to change the resource for a CG configuration (e.g. from S12AD0 to S12AD1). Compatible settings can be ported from the current resource to the new resource selected.
Follow the procedure below to change the resource for an existing software component.
(1) Right-click on a CG configuration (e.g. Config_S12AD0). (2) Select [Change resource] from the context menu.
Figure 4-17 Changing the Resource
(3) Select a new resource ( e.g. S12AD1) in the [Resource Selection] dialog box. (4) The [Next] button will be ac tive; click on it.
Figure 4-18 Components Page – Selecting a New Resource
R20AN0470EJ0120 Rev.1.20 Page 24 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(6)
(8)
(7)
(5) Con figuration settings will be listed in the [ Co nfiguration setting selection] dialog box.
Figure 4-19 Checking the Settings of the New Resource
(6) Che ck the portability of the settings. (7) Select whether to use the listed or default settings. (8) Cli ck on [Finish].
The resource is automatically changed (e.g. changed from S12ADI0 to S12ADI1).
Figure 4-20 Resource Changed Automatically
R20AN0470EJ0120 Rev.1.20 Page 25 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(9)
(10)
To change the configuration name, follow the procedure below.
(9) Right-click on the CG configuration. (10) Select [Rename] to rename the configuration (e.g. change Config_S12AD0 to Config_S12AD1).
Figure 4-21 Re naming the Configurati on
R20AN0470EJ0120 Rev.1.20 Page 26 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

4.3.8 Setting a FIT software component

To use FIT drivers or middleware, set configuration option. Setting methods are depends on components,
Set configuration options on configure panel Set configuration options in configuration file for FIT module by manually
Configuration file for FIT module will be generated in the folder r_config. For the settings of the configuration options, refer to chapter 7.1, Adding Custom Code in the Case of Firmware Integration Technology (FIT).
In addition, some compo nents have the configure panel for pin setting, Followings are example of configure panel of pin settings.
Figure 4-22 Pin Settings for r_ether_rx
Figure 4-23 Pin Settings for r_qspi_smstr_rx
R20AN0470EJ0120 Rev.1.20 Page 27 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

4.3.9 Version change of FIT software component

The following describes the procedure for version change of FIT software component.
(1) From the component tree, right-click the FIT so ftware component whose version you want to cha nge.
Figure 4-24 Version change of FIT software component
(2) Select [Change Version ...] from the context menu. (3) I n the [Change Version] dialog box, select the version you want to change. If you select a version that the device
does not support, [Selected version doesn’t support current device or toolchain] will be displayed, so select the corresponding version.
Figure 4-25 Select version of FIT software component
(4) Clic k [N e xt].
R20AN0470EJ0120 Rev.1.20 Page 28 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(5) By versio n change, a list of setting items to be changed is displayed. Confirm that t her e is no problem and click
the [Finish].
Figure 4-26 Confirm setting change item
(6) As [Confirm to change version and proceed to generate code] Is displayed, if you do not have any problem, click
[Yes].
Figure 4-27 Confirm version change
(7) The FIT software component version is change and code generation is executed automatically.
R20AN0470EJ0120 Rev.1.20 Page 29 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

4.3.10 Configure general setting of component

You can change the general setting of the component such as location and dependency. If you want to cha nge it, click the [Configure general settings...] link on the [Software Component Selection] page displayed in the [New Component] dialog (Figure 4-8), and display the [Preferences] dialog.
Figure 4-28 Configure general setting of component
Notes: 1. If the version of the module and its dependency do not match, a warning message W04020011 is
displayed. If you check the revision history of the module and its dependencies and you do not need to change the module you are using, you can ignore this warning. To clear this warning, select "Do not check for dependent component" in the [Checking dependency] list box in component preferences, then click [OK].
Figure 4-29 [Checking dependency] change
2. If you downloaded the FIT module directly from the website, unzip the downloaded zip file and copy
the xml file and zip file in the FIT Modules folder to the [Location settings] - [Location (RX)] folder. To change the location, click [Browse…] and select another folder.
Figure 4-30 [Location (RX)] change
R20AN0470EJ0120 Rev.1.20 Page 30 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Display switching

4.4 Pin Settings

The [Pins] page is used for assigning pin functions. You can switch the view by clicking on the [Pin Function] and [Pin Number] tabs. The [Pin Function] list shows the pin functions for each o f the peripheral functions, and the [Pin Number] list shows all pins in order of pin number.
Figure 4-31 [Pins] Page ([Pin Function])
When you select a board on the [Board] page, the initial pin setting information of the board is displayed in [Default Function]. In additio n, the [ ] icon displayed in the [Function] selection list indicates the initial pin function o f the board.
R20AN0470EJ0120 Rev.1.20 Page 31 of 61 Jan 25, 2019
Figure 4-32 [Pins] Page ([Pin Number])
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)
(4)
(5)

4.4.1 Changing the pin assignment of a software component

The Smart Configurator assigns pins to the software components added to the project. Assignment of the pins can be changed on the [Pins] page.
This page provides two lists: Pin Function and Pin Number. Follow the procedure below to change the assignment of pins to a software component in the Pin Function list.
(1) Click on [ (Show by Hardware Resource or Software Components)] to switch to the component view. (2) Select the target software component (e.g. Config_S12AD1). (3) Click the [Enabled] header to sort by pins used. (4) In the [Assignment] column or [Pin Number] column on the [Pin Function] list, chan ge the pin as s ignment (e.g.
change from P17 to P13).
(5) In addition, assignment of a pin c an be changed by clicki ng on the [ (Next group of pins for the selected
resource)] button. Pin that has peripheral function is displayed each time the button is clicked.
Figure 4-33 Pin Settings – Assigning Pins on the [Pin Function] List
The Smart Configurator allows you to enable pin functions on the [Pins] page witho ut linking the current software component to another. To distinguish these pins from other pins that are used by another software component, there will be a remark "No component is using this pin" on the list.
Note: The functio n fo r assigning pins is not available for some FIT modules. For the method of assigning pins to such a FIT modul e, refer to the application note in the
<ProjectDir>¥src¥smc_gen¥r_xxx¥doc folder for the FIT module.
R20AN0470EJ0120 Rev.1.20 Page 32 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)
(4)

4.4.2 Assigning pins using the MCU Package view

The Smart Configurator visualizes the pin assignment in the MCU Package view. You can save the MCU Package view as an image file, rotate it, and zoom in to and out from it.
Follow the procedure below to assign pins in the MCU Package view.
(1) Zoom in to the view by clicking the [ (Zoom in)] button or scrolling the view with the mouse wheel. (2) Right-click on the target pin. (3) Select the signal to be assigned to the pin. (4) The color of the pins can be customized through [Preferences Setting...].
Figure 4-34
R20AN0470EJ0120 Rev.1.20 Page 33 of 61 Jan 25, 2019
Assigning Pins Using the MCU Package View
RX Smart Configurator User's Guide: CS+
(1)

4.4.3 Exporting pin settings

The pin settings can be exported for later reference. Follow the procedure below to export the pin settings.
(1) Click on the [ (Export board setting)] button on the [Pins] page. (2) Select the output location a nd specify a name for the file to be exported.
The exported XML file can be imported to another project having the same device part number.
Figure 4-35 Exporting Pin Settings to an XML File
The Smart Configurator can also export the pin settings to a CSV file. Clic k on the [ (Save the list to .csv file)] button on the [Pins] page.

4.4.4 Impor ting pi n settings

To import pin settings into the current project, click on the [ (Import board setting)] button and select the XML file that contains the desired pin settings. After the settings specified in this file are imported to the project, the settings will be reflected in the [Pin configuration] page.
Figure 4-36 Importing Pin Settings from an XML File
Note: The pin setting is reflected, but it is not reflected in the component setting.
R20AN0470EJ0120 Rev.1.20 Page 34 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)
(4)

4.4.5 Pin setting using board pin configuration information

You can set t he initial pin configuration of the board at once. The following describes the procedure for collective setting of pins.
(1) Select [Default Board] in the MCU Package.(The initial pin c onfiguration of the board can be referred.) (2) Open the [Pin Configuration] page and click the [Assign default board pins] button. (3) When [Assign default board pins] dialo g o pens, click [Select all]. (4) Click [OK].
Figure 4-37 Setting for initial pin configuration
If you do not set pin settings all at once, specify them individually in procedure (3).

4.4.6 Pin filter feature

By specifying the filter range on the [Pin Functi on] tab and [Pin Number] tab on the [Pins] page, you can refer to it more easily.
Figure 4-38 Filter for [Pin Function] tab
Figure 4-39 Filter for [Pin Number] tab
R20AN0470EJ0120 Rev.1.20 Page 35 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

4.5 Interrupt Settings

Check and set the interrupts of the peripheral modules that have been selected on the [Components] page. The interrupts are displayed for each of the vector numbers. Set the interrupt priority levels, the source of the fast interrupt, or a dynamic interrupt vector number.
Figure 4-40 [Interrupts] Page
R20AN0470EJ0120 Rev.1.20 Page 36 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)
(3)

4.5.1 Changing the interrupt priority level and fast interrupt setting

When an inter rupt is used in a CG configuration on the [Components] page, the status of the interrupt will be chan ged to "Used". To display the used interrupts only, click on the [ (Show used interrupts)] button.
(1) You can change the interrupt priority level on the [Interrupts] page. (2) To use an inter rupt as a fast interrupt, tick the checkbox in the [Fast Interrupt] column. O nly one interrupt can be
specified as a fast interrupt among all interrupts and components used.
(3) Group interrupts are collapsed in the interrupt ta ble. Click on the [ (Open)] button to expand the view and see
the interrupts in the group interrupt list.
Figure 4-41 Interrupt Settings
Note: The functio n for setti ng up interr upts is not ava ilable for the FIT modules. For the method of setting up interrupts for each FIT module, refer to the application note in the
<ProjectDir>¥src¥smc_gen¥r_xxx¥doc folder for the FIT module.
R20AN0470EJ0120 Rev.1.20 Page 37 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
(1)
(2)

4.5.2 Changing the interrupt vector number

The [Interrupt configuration] page enables you to change the vector numbers of software configurable interrupts A and B.
(1) Select a desired software configurable interrupt. (2) The [Up] and [Down] buttons will be enabled. Click on a button to change the vector number.
Figure 4-42 Changing the Vector Number of Software Configurable Interrupt A or B
R20AN0470EJ0120 Rev.1.20 Page 38 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

5. Managing Conflicts

A user adding a component or configuring a pin or interrup t might cause problems in terms of resource conflict and missing depend e nc y modules. This info r matio n wi ll be displayed in the Configuration Problems view. User can refer to the displayed information to fix the conflict issues.

5.1 Resource Conflicts

When two software components are configured to use the same resource (e.g. S12AD1), an error mark ( ) will be displayed in the Components tree.
The Configuration Problems view will display messa ges on peripheral conflicts to inform the user in which software configurations peripheral conflicts have been detected.
Figure 5-1 Resource Conflicts
R20AN0470EJ0120 Rev.1.20 Page 39 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

5.2 Resolving pin conflicts

If there is a pin conflict, an error mark will appear on the tree and [P in Function] list.
Figure 5-2 Pin Conflicts
The detailed information regarding conflicts is displayed in the Configuration Problems view.
Figure 5-3 Pin Conflict Messages
To resolve a conflict, right-click on the node with an error mark on the tree and select [Resolve conflict].
Figure 5-4 Resolving Pin Conflicts
The pins of the selected node will be re-assigned to other pins.
R20AN0470EJ0120 Rev.1.20 Page 40 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

5.3 Missing Dependencies

When user adds a component which is dependent on other modules, the dependencies should also be added. For example, when a user adds the FIT module named r_t4_driver_rx, an error message with the mark will be displayed in the Configuration Problems view to inform the user that the dependent module r_cmt_rx is needed.
Figure 5-5 Error of Missing Dependency
To fix this error, add the dependent module r_cmt_rx into the project.
R20AN0470EJ0120 Rev.1.20 Page 41 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

6. Generating Source Code

6.1 Registering Generated Source Code with CS+

Output a source file for the configured details by clicking on the [ (Generate Code)] button in the Smart Configurator view.
Figure 6-1 Generating a Source File
The Smart Configurator generates a source file in <ProjectDir>¥src¥smc_gen, and the file is registered with the given project of CS+. If the Smart Configurator has already generated a file, a backup copy of that file is also generated (refer to chapter 8, Backing up Generated Source Code).
Figure 6-2 Registering a Source File with the CS+ Project
R20AN0470EJ0120 Rev.1.20 Page 42 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
smc_gen
board
doc
mcu
platform.h
general
r_bsp
r_xxx
r_config
r_pincfg
“ConfigName”
doc
ref
src
r_xxx_if.h
r_bsp
r_bsp_ r_xxx
r_xxx ConfigName”.c
“ConfigName”_user.c
“ConfigName”.h
r_cg_xxx.h
r_cg_dmac
r_cg_hardware r_cg_macrodriver.h
r_cg_userdefine.h
r_smc_cgc.c
r_smc_cgc.h
r_smc_cgc_user.c
r_smc_entry.h
r_smc_interrup.c
r_smc_interrupt.h
Pin.c
Pin.h
r_xxx_pinset.c
r_xxx_pinset.h
r_ pinset.h
r_cg_gpt

6.2 Configuration of Generated Files and File Names

Figure 5-3, Confi guration of Generated Files and File Names, shows the folders and files output by the Smart Configurator. Function main() is included in
r_xxx indicates the names of FIT modules, “ConfigName” indicates the name of the configuration formed by the component set ti ng s, and “Project name” indicates a project name set in CS+.
_user.c
_user.c
{Project name}.c, which is generated when the project is created by CS+.
_config.h
_interrupt _config.h
_setup.c
_config.h
_pin_config.h
R20AN0470EJ0120 Rev.1.20 Page 43 of 61 Jan 25, 2019
Figure 6-3 Configuration of Generated Files and File Names
RX Smart Configurator User's Guide: CS+
Folder
File
Description
general
This folder is always generated .
drivers of the same peripheral function.
r_cg_xxx.h
(Note*1)
These files are always generated.
r_cg_dmac_user.c
This file is always generated for a device with a DMAC function.
specifications).
r_cg_gpt_user.c
This file is always generated for a device with a GPT function.
r_cg_hardware_setup.c
This file is always generated.
than the clock so urc e , fast interrupt, and group interrupts.
r_cg_macrodriver.h
This file is always generated.
drivers.
r_cg_userdefine.h
This file is always generated. User can add macro definitions in the dedicated user code areas.
r_smc_cgc.c
This file is always generated.
r_smc_cgc.h
This file is always generated.
than the selected clock source.
r_smc_cgc_user.c
This file contains functions to be added to R_CGC_Create after the
r_smc_entry.h
This file is always generated.
including this file is necessar y.
r_smc_interrupt.c
This file is always generated.
r_smc_interrupt.h
This file is always generated.
definitions in application codes.
r_bsp
This folder is always generated .
It contains header files and source files commonly used by CG
The files contain macro definitions for setting SFR registers.
It contains interrupt service routines and callback functions shared among some DMAC channels (d epending on the hardware
It contains interrupt service routines and callback functions shared among some GPT channels (depending on the hardware specifications).
It contains R_Systeminit that ca lls all driver initialization functio ns with the name R_ConfigName_Create. R_Systeminit also calls the fun ct io ns fo r initializing clocks other
This header file contains common macro definitions used in
It contains the initialization of clock sources other than the clock source selected in the [Clocks] page.
This header file contains macro definitions to initialize clocks other
CGC initialization. User can add codes and functions in the dedicated user code areas.
This file includes the header files of CG drivers that are added to the project.
When using f unctions of CG drivers i n source fil es added b y us er,
It contains fast interrupt and group interrupt initialization (depending on hardware specification).
It contains macro definitions for fast interrupt and group interrupt initialization.
It also contains the priority level of all interrupts that are configured in the [Interrupts] tabbed page. User can use these macro
It consists of multiple subfolders ( board, doc, mcu) with :
- Initialization codes to start up the MCU before entering main()
- Definitions of all SFR registers in iodefine.h (mcu folder)
- Application note of r_bsp It also contains platform.h that will include r_bsp.h of the device
used in the project.
R20AN0470EJ0120 Rev.1.20 Page 44 of 61 Jan 25, 2019
(e.g. setup stack, initialize memory)
RX Smart Configurator User's Guide: CS+
Folder
File
Description
r_xxx
(Note*1)
This folder is generated for the FIT module that is added to the
module.
r_config
This folder is always generated.
R_xxx_Open
.
r_bsp_config.h
This file is always generated.
stack size) are configured by user manually.
r_bsp_interrupt_config.h
This file is always generated.
r_xxx_config.h
(Note*1)
These are configuration header files for all FIT drivers that are added to the project. This file is configured by user manually.
r_xxx_pin_config.h
(Note*1)
These pin configuration header files are dedicated for FIT drivers
r_pincfg
Pin.c
This file is always generated.
configured in the [Pins] tabbed page (except I/O Ports).
Pin.h
This file is always generated.
r_xxx_pinset.c
(Note*1)
This file contains pin function initialization for the FIT drivers that
in the application codes.
r_xxx_pinset.h
(Note*1)
This file contains pin setting funct ion prototypes in r_xxx_pinset.c
r_pinset.h
This file includes all pin setting header files named with
r_xxx_pinset.h
in r_pincfg folder.
{ConfigName}
This folder is generated for the CG drivers that are added to the
{ConfigName}.c
This file contains functions to initialize driver
(R_ConfigName_Stop).
{ConfigName}_user.c
This file contains interrupt service routines and functions for user
User can add codes and functions in the dedicated user code areas.
{ConfigName}.h
This is header file for {ConfigName}.c and {ConfigName}_user.c.
project. It consists of:
- doc folder: Application note of this FIT module
- ref folder: Reference of FIT module configuration file and pin
configuration file
- src folder: FIT module source files and header files
- r_xxx_if.h
of this FIT module
Note: Folders in r_xxx depends on the requirements of each FIT
It contains configuration header files for the MCU package, clocks, interrupts, and driver initialization functions with the name
It contains configurations of r_bsp for clock initializatio n an d other MCU related settings. Some MCU related settings are generated by Smart Configurator (e.g. package type) and other settings (e.g.
(Note*1)
: List of all API calls and interface definitions
(Note*1)
It contains mapping of the software configurable interrupts A and B (depending on hardware specification).
with specific requirements in pin setting seque nce.
It is a reference of pin function initialization for all peripherals
It contains the function prototypes of pin settings in Pin.c
are added to the project. API function in this file is for user to call
(Note*1)
project. API functions in this folder are named after the ConfigName
(configurat ion name).
(R_ConfigName_Create) and perform operations that are driver­specific, e.g. start (R_ConfigName_Start) and stop
to add code after the driver initialization (R_ConfigName_Create).
Note *1: xxx is the name of a peripheral function.
R20AN0470EJ0120 Rev.1.20 Page 45 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
No
Folder
File
Macros/Functions
Description
(1)
r_config
r_bsp_config.h
Macros related to clocks
These settings are generated by Smart
entering main().
Macros related to MCU
Some MCU related settings are generated by
¥src¥smc_gen¥r_bsp¥doc
(2)
general
r_smc_cgc.c
R_CGC_Create
This API func tion initializes clocks other than
before entering main() function.
r_smc_cgc.h
Macros related to clocks
These macros are for clock initialization in R_CGC_Create.
r_smc_cgc_user.c
R_CGC_Create_UserInit
This API func tion is used to add code to R_CGC_Create after the CGC initialization.
(1)
(2)

6.3 Initializing Clocks

Configurati ons of the clock source selected in the [Clocks] page are generated to the macros in the r_bsp_config.h file located in ¥src¥smc_gen¥r_config folder. Clock initialization codes will be handled by r_bsp before entering main().
The r_bsp_config.h file also contains other MCU related settings (e.g. package, stack size). Configurations of other clocks are generated in ¥src¥smc_gen¥general folder.
Figure 6-4 Clocks Configuration with Main Clock Selected as Clock Source
Configurator based on user’s selection in the [Clocks] page for the cloc k s ource. Only one clock can be selected as the clock source at a time. r_bsp will handle the clock i nitialization before
settings
Smart Configurator (e.g. package type) and other settings (e.g. stack size) are configured by user manuall y. Refer to the application note in r_bsp folder before configuring these macros:
the selected clock source. R_Systeminit in
r_cg_hardware_setup.c will call this function
r_bsp_config.h will be backed up to trash folder before each code generation (refer to chapter 8).
R20AN0470EJ0120 Rev.1.20 Page 46 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Folder
File
Function
Driver
Description
{ConfigName}
{ConfigName}.c
R_ConfigName_Create
CG
This API function initializes the pins used
function before entering main() function.

6.4 Initializing Pins

Configurati ons in the [Pins] page are generated in some source files depending on d river’s requirements and hard ware specifications.
(1) Pin initialization for drivers with {ConfigName}
Pin functions are initialized in R_ConfigName_Create of the file ¥src¥smc_gen¥{ConfigName}¥{ConfigName}.c.
Pin initialization codes will be handled b e fore entering main().
Figure 6-5 Config_S12AD1 in Software Components View
by this driver. R_Systeminit in r_cg_hardware_setup.c will call this
R20AN0470EJ0120 Rev.1.20 Page 47 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Folder
File
Function
Driver
Description
r_pincfg
r_xxx_pinset.c
R_xxx_PinSet_xxxn
FIT
This API function initializes the pins used
¥src¥smc_gen¥r_xxx¥doc
(2) Pin initialization for drivers with r_xxx
(Note2)
The pin setting source file will be generated in ¥src¥smc_gen¥r_pincfg folder with the name r_xxx_pinset.c. The API functions in this file are called by the user from application codes.
Figure 6-6 r_ether_rx in Software Components View
(Note*2)
(Note*2,3)
Note *2: xxx is the name of a peripheral function. *3: n is a peripheral channel number.
by this driver. Refer to the application note in the corresponding r_xxx folder before calling this API function:
(Note*2)
R20AN0470EJ0120 Rev.1.20 Page 48 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
Folder
File
Function
Driver
Description
r_config
r_xxx_smstr_rx_pin_config.h
-
FIT
Macro definitions in this header file
r_xxx_smstr source files.
Folder
File
Function
Driver
Description
r_pincfg
Pin.c
R_Pins_Create
-
This file contains the initialization
in the [Pins] page except I/O ports.
(3) Pin initialization for drivers with r_xxx_smstr
(Note4)
The pin setting header file will be generated in ¥src¥smc_gen¥r_ config folder with the name
r_xxx_smstr_rx_pin_config.h.
The macro definitions i n thi s f ile will be handled in the r_xxx_smstr source files.
Figure 6-7 r_qspi_smstr_rx in Software Components View
(Note*4)
initialize the pins used by this driver. These macros will be called in
Note *4: xxx is the name of a peripheral function.
(4) Reference to pin initialization codes Refer to Pin.c in ¥src¥smc_gen¥r_pincfg folder for all peripheral pin functions used in the project (except I/O ports).
codes of all pin functions configured
R20AN0470EJ0120 Rev.1.20 Page 49 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
No
Item
Folder
File
Driver
Description
(1)
Priority
general
r_smc_interrupt.c
CG
This interrupt prior ity level setting
function.
(2)
Priority
{ConfigName}
{ConfigName}.c
CG
This interrupt prior ity level setting
function.
(3)
Vector
r_config
r_bsp_interrupt_config.h
CG
Vector number of software
handled b y r_bsp.
(4)
Fast
general
r_smc_interrupt.c
CG
Fast interrupt setting will be
function.
r_smc_interrupt.h
CG
Vector number of fast interrupt will
interrupt service routine.
(1)
Priority
general
r_smc_interrupt.h
-
Priority level of all interrupts
definitions in the application codes.
(2)
(1)
(4)
(3)

6.5 Initializing Interrupts

Configurati ons in the [Interrupts] page are generated in some source files. Refer to the application note in the corresponding ¥src¥smc_gen¥r_xxx¥doc folder to initia liz e inter rupts used in r_xxx modules (xxx is the name of peripheral function).
Figure 6-8 Interrupts Configuration in Interrupts View
Number
Interrupt
FIT
is for group interrupts
(Note5)
.
It is initialized in
R_Interrupt_Create of this file. R_Systeminit in r_cg_hardware_setup.c will call
this function before ent ering main()
is for normal interrupts and software configurable interrupts A
(Note5)
and B
.
It is initialized in
R_ConfigName_Create of this file. R_Systeminit in r_cg_hardware_setup.c will call
this function before ent ering main()
configurable interrupts A and B
(Note5)
in the [Interrupts] tabbed
page will be mapped in this file and
initialized in R_Interrupt_Create of this file. R_Systeminit in r_cg_hardware_setup.c will call this function before ent ering main()
(2)
Note *5: The type of interrupt d ep ends on hardware specifications.
R20AN0470EJ0120 Rev.1.20 Page 50 of 61 Jan 25, 2019
be defined in this file. {ConfigName}_user.c will use this macro definition to prepare a fast
configured in the [Interrupts] tabbed page is defined in this file.
User can use these macro
RX Smart Configurator User's Guide: CS+
(2) Configuration
(1) Explanation information

6.6 Component Settings

6.6.1 FIT module configuration

1) Configuratio n for r_bsp
Configuration file of r_bsp is generated as r_bsp_config.h under the ¥src¥smc_gen¥r_config folder. It contains clock-initialization and other MCU-related settings (e.g. the package).
Some configurations are generated by the Smart Configurator. These configurations are marked with the comment “Updated by GUI. Do not edit this value manually”.
Other configurations need to be manually configured by the user. As shown in the figure b elow, read (1) Explanation information before setting the macro definition value in (2) Configuration.
Refer to the application note in the folder ¥src¥smc_gen¥r_bsp¥doc on how to modify r_bsp_config.h.
R20AN0470EJ0120 Rev.1.20 Page 51 of 61 Jan 25, 2019
Figure 6-9 r_bsp_config.h
RX Smart Configurator User's Guide: CS+
(1) Explanation information
(2) Configuration
2) Configuration of FIT modules
Configuration files of FIT modules that are added to the project are generated as r_xxx_config.h under ¥src¥smc_gen¥r_config folder. (r_xxx is the name of FIT module)
These configurations need to be manually configured by the user. As shown in the figure below, read (1) Explanation information before setting the macro definition value in (2) Configuration.
Refer to the application note in ¥src¥smc_gen¥r_xxx¥doc folder on how to modify r_xxx_config.h.
R20AN0470EJ0120 Rev.1.20 Page 52 of 61 Jan 25, 2019
Figure 6-10 Example of r_xxx_config.h (r_ether_rx_config.h)
RX Smart Configurator User's Guide: CS+
smc_gen
board
doc
mcu
platform.h
r_bsp
r_xxx
r_config
r_bsp_config.h r_bsp_interrupt_config.h
r_xxx_config.h
r_xxx_pin_config.h doc
r_xxx_if.h
ref
src
en
jp

7. Creating User Programs

The Smart Configurator handles two component types, [Firmware Integration Technology] and [Code Generator], with each requiring different methods to ad d custom code to the output source files. This chapter describes the methods to add custom code for both components.

7.1 Adding Custom Code in the Case of Firmware Integration Technology (FIT)

When [Firmware Integration Technology] is selected as the component type, the configuration options are set in r_xxx_config.h in the folder r_config. For the settings of the configurat ion options, refer to the application note (in the doc folder) on the FIT module (r_xxx) which yo u ha ve added to the project tree.
If the target file already exists, the existing contents of the file are protected when source code is output.
Figure 7-1 Tree Structure of Directories and Files for a FIT Module
R20AN0470EJ0120 Rev.1.20 Page 53 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
/* Start user code for xxxx. Do not edit comment generated here */

7.2 Adding Custom Code in the Case of Code Generator

When [Code Generator] is selected as the component type, if files which have the same name already exist, new code will be mer ged only with the existing code that is between the comments below.
/* End user code. Do not edit comment generated here */
In the case of [Code Generator], three files are generated for each of the specified peripheral functions. The file names are “Config_xxx.h”, “Config_xxx.c”, and “Config_xxx_user.c” as the default, with “xxx” representing the name of the peripheral module. For example, “xxx” will be “CMT3” for the compare-match timer (resource CMT3). The comments to indicate where to add custom code are at the start and end of each of the three files. Comments to indicate where to add user code are also added to the interrupt function for the peripheral module corresponding to Config.xxx_user.c. The following examples are for CMT3 (Config_CMT3_user.c).
/******************************************************************************* Pragma directive *******************************************************************************/ /* Start user code for pragma. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */
/******************************************************************************* Includes *******************************************************************************/
#include "r_cg_macrodriver.h" #include "r_cg_userdefine.h" #include "Config_CMT3.h"
/* Start user code for include. Do no t edit comment generated he re */ /* End user code. Do not edit comment generated here */
/******************************************************************************* Global variables and functions *******************************************************************************/ /* Start user code for global. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */
/******************************************************************************* * Function Name: R_Config_CMT 3_Create_UserInit * Description : This function adds user code after initializing the CMT3 channel * Arguments : None * Return Val ue : None *******************************************************************************/
void R_Config_CMT3_Create_UserInit(void)
{ /* Start user code for user init. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */ }
R20AN0470EJ0120 Rev.1.20 Page 54 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+
/******************************************************************************* * Function Name: r_Config_CMT3_cmi3_interrupt * Description : This fu nction is CMI3 interrupt service routine * Arguments : None * Return Val ue : None *******************************************************************************/
#if FAST_INTERRUPT_VECTOR == VECT_PERIB_INTB129 #pragma interrupt r_Config_CMT3_cmi3_interrupt(vect=VECT(PERIB,INTB129),fint) #else #pragma interrupt r_Config_CMT3_cmi3_interrupt(vect=VECT(PERIB,INTB129)) #endif static void r_Config_CMT3_cmi3_interrupt(void)
{ /* Start user code for r_Config_CMT3_cmi3_interrupt. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */ }
/* Start user code for adding. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */
R20AN0470EJ0120 Rev.1.20 Page 55 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

8. Backing up Generated Source Code

The Smart Configurator has a function for backi ng up the source code. The Smart Configurator generates a backup folder for the previously generated source code when new code is generated
by clicking on the [ (Generate Code)] button. <Date-and-T ime> indicates the date and time when the backup folder is created after code generation.
<ProjectDir>¥trash¥<Date-and-Time>
R20AN0470EJ0120 Rev.1.20 Page 56 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

9. Generating Reports

The Smart Configurator generates a report on the configurations that the user works on. Follow the procedure below to generate a report.

9.1 Report on All Configurations (Text File)

A report is output in response to clicking on the [ (Generate Report)] button in the Smart Configurator view.
Figure 9-1 Output of a Report on the Configuration (as a Text File)
Figure 9-2 Dialog Box for Output o f a Report
R20AN0470EJ0120 Rev.1.20 Page 57 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

9.2 Configuration of Pin Function List and Pin Number List (in csv Format)

A list of the configuration of pin functions and pin numbers (whichever is selected at the time) is output in response to clicking on the [ (Save the list to .c sv file)] button on the [Pins] page of the Smart Configurator view.
Figure 9-3 Output of a List of Pin Functi ons or Numbers (in csv Format)

9.3 Image of MCU Package (in png Format)

An image of the MCU package is output in response to clicking on the [ (Save Package View to external image file)] button o f t he [MCU Package] view.
Figure 9-4 Outputting a Figure of MCU Package (in png Format)
R20AN0470EJ0120 Rev.1.20 Page 58 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

10. Help

10.1 Help

Refer to the help system for detailed information on the Smart Configurator.
Figure 10-1 Help Menu
The help system can also be activated from the [Overview information] page.
Figure 10-2 Quick Start
R20AN0470EJ0120 Rev.1.20 Page 59 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+

11. Documents for Reference

User’s Manual: Hardware Obtain the latest version of the manual from the Renesas Electronics website.
Technical Update/Technical News Obtain the latest information from the Renesas Electronics website.
User’s Manual: Development Environment CS+ Integrated Development Environment User’s Manual: Project Operation (R20UT4296) CS+ Integrated Development Environment User’s Manual: RX Debug Tool (R20UT4298) CS+ Integrated Development Environment User’s Manual: Message (R20UT4309) CC-RX Compiler User’s Manual (R20UT3248) (Obtain the latest version fro m the Re nesas Electronics website.)
R20AN0470EJ0120 Rev.1.20 Page 60 of 61 Jan 25, 2019
RX Smart Configurator User's Guide: CS+ Website and Support
Renesas Electronics Website
http://www.renesas.com/
Inquiries
http://www.renesas.com/contact/
All trademarks and registered trademarks are the property of their respective owners.
R20AN0470EJ0120 Rev.1.20 Page 61 of 61 Jan 25, 2019
Rev.
Date
Description
Page
Summary
1.00
Nov 9, 2017
-
First edition issued
1.10
Nov 1, 2018
-
Update to CS+ (CS+ for CC) V7.00.00, RX Smart Configurator Plugins V1.02.00
5
2.3 Setting the CS+ Integrated Development Environment updated
14
4.1.2 Selecting the board added
15
4.1.3 Exporting board settings, 4.1.4 Importing board settings added
16
4.2 Clock Settings updated
17
4.3 Component Settings update d
29
4.4 Pin Settings updated
35
4.5 Interrupt Settings updated
57
Figure 10-2 Quick Start added
1.20
Jan 25, 2019
-
Update to CS+ (CS+ for CC) V8.01.00, RX Smart Configurator Plugins V1.02.02
11
3.4.4 MCU Package view update
27
4.3.8 Setting a FIT software component update
28
4.3.9 Version change of FIT software component added
30
4.3.10 Configure general setting of component added
31
Figure 4-1 [Pins] Page ([Pin Number]) update
35
4.4.5 Pin setting using board pin configuration information
4.4.6 Pin filter feature added

Revision History

V1.4.0 and CS+ RX Smart Configurator Communication
V2.0.0 and CS+ RX Smart Configurator Communication
added
General Precautions in the Handling of Microprocessing Unit and Microcontroller Unit Products
The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
1. Precaution against Electrostatic Discharge (ESD)
A strong electrical field, when exposed to a CMOS device, can cause destruction of the gate oxide and ultimately degrade the device operation. Steps must be taken to stop the generation of static electricity as much as possible, and quickly dissipate it when it occurs. Environmental control must be adequate. When it is dry, a humidifier should be used. This is recommended to avoid using insulators that can easily build up static electricity. Semiconductor devices must be stored and transported in an anti-static container, static shielding bag or conductive material. All test and measurement tools including work benches and floors must be grounded. The operator must also be grounded using a wrist strap. Semiconductor devices must not be touched with bare hands. Similar precautions must be taken for printed circuit boards with mounted semiconductor devices.
2. Processing at power-on
The state of the product is undefined at the time when power is supplied. The states of internal circuits in the LSI are indeterminate and the states of register settings and pins are undefined at the time when power is supplied. In a finished product where the reset signal is applied to the external reset pin, the states of pins are not guaranteed from the time when power is supplied until the reset process is completed. In a similar way, the states of pins in a product that is reset by an on-chip power-on reset function are not guaranteed from the time when power is supplied until the power reaches the level at which resetting is specified.
3. Input of signal during power-off state
Do not input signals or an I/O pull-up power supply while the device is powered off. The current injection that results from input of such a signal or I/O pull-up power supply may cause malfunction and the abnormal current that passes in the device at this time may cause degradation of internal elements. Follow the guideline for input signal during power-off state as described in your product documentation.
4. Handling of unused pins
Handle unused pins in accordance with the directions given under handling of unused pins in the manual. The input pins of CMOS products are generally in the high-impedance state. In operation with an unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of the LSI, an associated shoot-through current flows internally, and malfunctions occur due to the false recognition of the pin state as an input signal become possible.
5. Clock signals
After applying a reset, only release the reset line after the operating clock signal becomes stable. When switching the clock signal during program execution, wait until the target clock signal is stabilized. When the clock signal is generated with an external resonator or from an external oscillator during a reset, ensure that the reset line is only released after full stabilization of the clock signal. Additionally, when switching to a clock signal produced with an external resonator or by an external oscillator while program execution is in progress, wait until the target clock signal is stable.
6. Voltage application waveform at input pin
Waveform distortion due to input noise or a reflected wave may cause malfunction. If the input of the CMOS device stays in the area between V (Max.) and V input level is fixed, and also in the transition period when the input level passes through the area between V
7. Prohibition of access to reserved addresses
Access to reserved addresses is prohibited. The reserved addresses are provided for possible future expansion of functions. Do not access these addresses as the correct operation of the LSI is not guaranteed.
8. Differences between products
Before changing from one product to another, for example to a product with a different part number, confirm that the change will not lead to problems. The characteristics of a microprocessing unit or microcontroller unit products in the same group but having a different part number might differ in terms of internal memory capacity, layout pattern, and other factors, which can affect the ranges of electrical characteristics, such as characteristic values, operating margins, immunity to noise, and amount of radiated noise. When changing to a product with a different part number, implement a system­evaluation test for the given product.
(Min.) due to noise, for example, the device may malfunction. Take care to prevent chattering noise from entering the device when the
IH
(Max.) and VIH (Min.).
IL
IL
Notice
1. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for
the incorporation or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by
you or third parties arising from the use of these circuits, software, or information.
2. Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other claims involving patents, copyrights, or other intellectual property rights of third parties, by or
arising from the use of Renesas Electronics products or technical information described in this document, including but not limited to, the product data, drawings, charts, programs, algorithms, and application
examples.
3. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others.
4. You shall not alter, modify, copy, or reverse engineer any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any and all liability for any losses or damages incurred by
you or third parties arising from such alteration, modification, copying or reverse engineering.
5. Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The intended applications for each Renesas Electronics product depends on the
product’s quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control (traffic lights); large-scale communication equipment; key financial terminal systems; safety control equipment; etc.
Unless expressly designated as a high reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesas Electronics products are
not intended or authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems; surgical implantations; etc.), or may cause
serious property damage (space system; undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics disclaims any and all
liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual or
other Renesas Electronics document.
6. When using Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, “General Notes for Handling and Using Semiconductor Devices” in the
reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat dissipation
characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions, failure or accident arising out of the use of Renesas Electronics products outside of such specified
ranges.
7. Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specific characteristics, such as the occurrence of failure at a
certain rate and malfunctions under certain use conditions. Unless designated as a high reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas
Electronics document, Renesas Electronics products are not subject to radiation resistance design. You are responsible for implementing safety measures to guard against the possibility of bodily injury, injury
or damage caused by fire, and/or danger to the public in the event of a failure or malfunction of Renesas Electronics products, such as safety design for hardware and software, including but not limited to
redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult
and impractical, you are responsible for evaluating the safety of the final products or systems manufactured by you.
8. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. You are responsible for carefully and
sufficiently investigating applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics
products in compliance with all these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with applicable
laws and regulations.
9. Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws
or regulations. You shall comply with any applicable export control laws and regulations promulgated and administered by the governments of any countries asserting jurisdiction over the parties or
transactions.
10. It is the responsibility of the buyer or distributor of Renesas Electronics products, or any other party who distributes, disposes of, or otherwise sells or transfers the product to a third party, to notify such third
party in advance of the contents and conditions set forth in this document.
11. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its directly or indirectly controlled subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
equipment; industrial robots; etc.
(Rev.4.0-1 November 2017)
SALES OFFICES
Refer to "http://www.renesas.com/" for the latest and detailed information.
Renesas Electronics Corporation
TOYOSU FORESIA, 3-2-24 Toyosu, Koto-ku, Tokyo 135-0061, Japan
Renesas Electronics America Inc.
1001 Murphy Ranch Road, Milpitas, CA 95035, U.S.A. Tel: +1-408-432-8888, Fax: +1-408-434-5351
Renesas Electronics Canada Limited
9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3 Tel: +1-905-237-2004
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K Tel: +44-1628-651-700
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
Room 1709 Quantum Plaza, No.27 ZhichunLu, Haidian District, Beijing, 100191 P. R. China Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, 200333 P. R. China Tel: +86-21-2226-0888, Fax: +86-21-2226-0999
Renesas Electronics Hong Kong Limited
Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong Tel: +852-2265-6688, Fax: +852 2886-9022
Renesas Electronics Taiwan Co., Ltd.
13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949 Tel: +65-6213-0200, Fax: +65-6213-0300
Renesas Electronics Malaysia Sdn.Bhd.
Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics India Pvt. Ltd.
No.777C, 100 Feet Road, HAL 2nd Stage, Indiranagar, Bangalore 560 038, India Tel: +91-80-67208700, Fax: +91-80-67208777
Renesas Electronics Korea Co., Ltd.
17F, KAMCO Yangjae Tower, 262, Gangnam-daero, Gangnam-gu, Seoul, 06265 Korea Tel: +82-2-558-3737, Fax: +82-2-558-5338
© 2019 Renesas Electronics Corporation. All rights reserved.
http://www.renesas.com
Colophon 7.2
Loading...