Renesas RL78/G1D User Manual

Bluetooth
Manual
Renesas MCU
Target Device
RL78/G1D
All information contained in these materials, including products and product specifications,
Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
®
Low Energy Protocol Stack
User’s
represents information on the product at the time of publication and is subject to change by Renesas
website (http : //www.renesas.com).
Notice
on of
1. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operati semiconductor products and application examples. You are fully responsible for the incorporation or any other use of the circuits, software, and i nformation i n the desi gn of your produc t or syste m. Renesa s Electr onics discla ims any and al l liabilit y for any loss es and damages incurred by you or third parti es arising from the use of these circuits, software, or infor ma tion.
2. Renesas Elec tronics hereby expressly disclai ms any warranties against and liabi lity for infringeme nt or any other claims involving patents, copyrights, or other intellectual prop erty rights of third part ies, by or arising from the use of Renesas Electronics pr oducts 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, expr ess, impli ed or otherwi se, is gra nted hereb y under an y patents , copyright s or other intell ectual prop erty rights of Renesas Electronics or others.
4. You shall not alter , modify, copy, or revers e engineer any Renes as Electr onics 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 Electroni cs products are cla ssified accordi ng to the following two qua lity grades: “Sta ndard” and “High Quali ty”. The intended applications for each Renesas Electronics product depends on the product’s quality grade, a s indicated below. “Standard”: Computers; office equipment; communications equipment; test and measurement equi pment; audio and visual equipment;
home electronic appliances; machine tools; personal electronic eq uipment; industria l robots; etc.
“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 expressl y designated a s a high reli abilit y product or a product for ha rsh environ ments in a Renes as Elec tronics data sheet or ot her Renesas Electr onic s docum ent, Ren esa s El ectr onic s pr oduc ts a re not i ntended or a uthor i z ed for us e in produc t s or systems tha t may pose a direct threat to huma n life or bodily injury (ar tificial life supp ort devices or systems; s urgical implantations ; etc.), or may cause ser ious property damage (s pace system; unders ea repeaters ; nuclear power cont rol systems; a ircraft control systems; key pla nt systems; milit ary equipment; etc. ). Renesa s El ectroni cs dis claims a ny and al l liab ilit y for any damages or los ses i ncurred b y you or any thi rd parties arising from the use of any Renes as Electronics product that is inconsistent with any Renesa s Electronics data sheet, us er’s manual or other Renesas Electronics document.
6. When using Renesas Elect roni cs product s, r efer to t he lates t product informa tion ( data sheet s, user ’s manu als, applica tion not es, “Genera l Notes for Handling a nd Using Semic onductor Devices ” in the relia bility handbook, etc.), and ens ure that usage c onditions are w ithin the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat dissipation characterist ics, insta llation, etc. Renesa s Electr onics dis claims any and a ll liabi lity for any ma lfunct ions, fa ilure or acc ident aris ing out of the use of Renesas Electronics products outside of such specified ranges.
7. Although Renesa s Electroni cs endeavors to imp rove the qual ity and relia bility of Renes as Electroni cs products, semiconductor products have specific cha racteristics, such as the occurrenc e of failure at a certain rate and malf unctions under certain use conditi ons. Unless designated as a high reliability product or a product for harsh environments in a Renesas Electronics data sheet or other Renesas Electronics document, Renesa s Elect ronics produc ts are not s ubject t o radiation res istance des ign. You are r esponsib le for implement ing safety measures to gua rd aga ins t the pos sibi lity of b odil y injur y, injur y or da mage c aus ed by fir e, a nd/or d anger t o the p ublic in the e vent of a failure or malf unction of Renesas Elec tronics pr oducts, s uch as safety design for ha rdware a nd software, including b ut not limited t o redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the e valuat ion of mic roc omputer s oft ware a lone is very dif fi cult and imp ract ical, you are res pons ibl e for eval uat ing the s afet y of the final products or systems manufactured by you.
8. Please contact a Renesas El ectronics sa les office f or details as to environmenta l matters such as the en vironmental compatibility of each Renesas Elec tronic s produc t. Y ou are r esp onsibl e for c aref ully and s uff icient ly inves ti gati ng appl icab le laws and r egulat ions that regula te the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics products in compl iance with all these applicab le laws and regul ations. Renesa s Electr onics disclai ms any and all liab ility for damages or losses occurring as a result of your noncompliance wit h applicable laws and regulations.
9. Renesas Electr oni cs pr oduc ts and t echnol ogi es s ha ll not be us ed f or or incorp or ated i nt o any pr oduc ts or s ystems whos e manuf act ur e, us e, or sale is pr ohibited under a ny applica ble domestic or foreign laws or regulati ons. You shall comply with an y applicabl e export contr ol laws and regulations promulgated and administered by the governments of any countries asserting jurisdiction over the parties or transactions.
10. It is the respons ibility of the buyer or distributor of Renesas Electronics products, or any other party who distr ibutes, disposes of, or otherwise sell s or tr ansf er s the p r oduct to a thi rd pa r ty, t o noti f y such t hir d p ar ty in a dvanc e of the c ont ent s a nd condi t ions s et f orth i n t his document.
11. This document sha ll not be repri nted, rep roduced or dup licated i n any form, in whole or in part, wit hout prior wr itten consent of Renesa s Electronics.
12. Please contact a Renesas Electronics sales of fice if you have any q uestions regarding the information contained in t his document or Renesas Electronics products.
(Note 1) “Renesas Elect ronics” as used in t his document m eans Renesas Electronics Corporation a nd also incl udes its direc tly or indirect ly
controlled subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
(Rev.4.0-1 November 2017)
General Preca ut ions in the Handl ing of Microprocessing Unit a nd Microcontrol l e r Unit Products
The following usage notes are applicab le 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. 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 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. Unused pins should be handled as described under Handling of Unused Pins in the manual.
2. Processing at Power-on The state of the produc t is undef in ed at the moment 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 moment 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 moment 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 moment when power is supplied until the power reaches the level at which resetting has been specified.
3. Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited. The reserved addresses are provided for the possible future expansion of functions. Do not access
these addresses; the correct operation of LSI is not guaranteed if they are accessed.
4. Clock Signals After applying a reset, only release the reset line after the operating clock signal has become stable.
When switching the clock signal during program execution, wait until the target clock signal has 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. Moreover, 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.
5. Differences between Products Before changing from one product to another, i.e. to a product with a different part number, confirm
that the change will not lead to problems. The characteristics of Microprocessing unit or Microcontroller unit products in the same group but
having a different part number may differ in terms of the 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.
How to Use This Manual
1. Purpose and Target Readers
This manual describes setup method, organization, and features of the Bluetooth Low Energy protocol stack (BLE
software), which is used to develop Bluetooth applications that incorporate the Renesas Bluetooth low energy
microcontroller RL78/G1D. It is intended for users designing application systems incorporating this software. A basic
knowledge of microcontrollers and Bluetooth low energy is necessary in order to use this manual.
Related documents
The related documents indicated in this publication may include preliminary versions. However, preliminary versions are
not marked as such.
Document Name Document No.
Bluetooth Low Energy Protocol Stack
User's Manual This manual
API Reference Manual : Basics R01UW0088E
API Reference Manual : FMP R01UW0089E
API Reference Manual : PXP R01UW0090E
API Reference Manual : HTP R01UW0091E
API Reference Manual : BLP R01UW0092E
API Reference Manual : HOGP R01UW0093E
API Reference Manual : ScPP R01UW0094E
API Reference Manual : HRP R01UW0097E
API Reference Manual : CSCP R01UW0098E
API Reference Manual : CPP R01UW0099E
API Reference Manual : GLP R01UW0103E
API Reference Manual : TIP R01UW0106E
API Reference Manual : RSCP R01UW0107E
API Reference Manual : ANP R01UW0108E
API Reference Manual : PASP R01UW0109E
API Reference Manual : LNP R01UW0113E
Application Note : Sample Program R01AN1375E
Application Note : rBLE Command Specification R01AN1376E
List of Abbreviations and Acronyms
Abbreviation Full Form Remark
ANP Alert Notification Profile
ANS Alert Notification Service
API Application Programming Interface
ATT Attribute Protocol
BAS Battery Service
BB Base Band
BD_ADDR Bluetooth Device Address
BLE Bluetooth low energy
BLP Blood Pressure Profile
BLS Blood Pressure Service
CPP Cycling Power Profile
CPS Cycling Power Service
CSCP Cycling Speed and Cadence Profile
CSCS Cycling Speed and Cadence Service
CSRK Connection Signature Resolving Key
CTS Current Time Service
DIS Device Information Service
EDIV Encrypted Diversifier
FMP Find Me Profile
GAP Generic Access Profile
GATT Generic Attribute Profile
GLP Glucose Profile
GLS Glucose Service
HCI Host Controller Interface
HID Human Interface Device
HIDS HID Service
HOGP HID over GATT Profile
HRP Heart Rate Profile
HRS Heart Rate Service
HTP Health Thermometer Profile
HTS Health Thermometer Service
IAS Immediate Alert Service
IRK Identity Resolving Key
L2CAP Logical Link Control and Adaptation Protocol
LE Low Energy
LL Link Layer
Abbreviation Full Form Remark
LLS Link Loss Service
LNP Location and Navigation Profile
LNS Location and Navigation Service
LTK Long Term Key
MCU Micro Controller Unit
MITM Man-in-the-middle
MTU Maximum Transmission Unit
OOB Out of Band
OS Operating System
PASP Phone Alert Status Profile
PASS Phone Alert Status Service
PXP Proximity Profile
RF Radio Frequency
RSCP Running Speed and Cadence Profile
RSCS Running Speed and Cadence Service
RSSI Received Signal Strength Indication
ScPP Scan Parameters Profile
ScPS Scan Parameters Service
SM Security Manager
SMP Security Manager Protocol
STK Short Term Key
TK Temporary Key
TPS Tx Power Service
UART Universal Asynchronous Receiver Transmitter
UUID Universal Unique Identifier
Abbreviation Full Form Remark
APP Application
CSI Clocked Serial Interface
IIC Inter-Integrated Circuit
RSCIP Renesas Serial Communication Interface Protocol
VS Vendor Specific
These commodities, technology or software, must be exported in accordance with the export administration regulations
of the exporting country. Diversion contrary to the law of that country is prohibited.
All trademarks and registered trademarks are the property of their respective owners.
Bluetooth is a registered trademark of Bluetooth SIG, Inc. U.S.A.
EEPROM is a trademark of Renesas Electronics Corporation.
Windows, Windows NT and Windows XP are registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
PC/AT is a trademark of International Business Machines Corporation.
Contents
1.
Overview ........................................................................................................................................................ 1
2. Applicability .................................................................................................................................................... 2
3. Restrictions .................................................................................................................................................... 3
4. Installing BLE Software ................................................................................................................................. 4
4.1 Components Included ......................................................................................................................................... 4
4.2 BLE software build environment ........................................................................................................................ 4
4.3 Installation Procedure ......................................................................................................................................... 5
4.4 Folder Organization ............................................................................................................................................ 7
4.4.1 \Renesas\BLE_Software_Ver_X_XX\Manual\ ......................................................................................... 7
4.4.2 \Renesas\BLE_Software_Ver_X_XX\RL78_G1D .................................................................................... 7
4.4.3 \Renesas\BLE_Software_Ver_X_XX\BLE_Sample\ .............................................................................. 15
5. BLE Software Configuration ........................................................................................................................ 16
5.1 Configuration .................................................................................................................................................... 16
5.2 rBLE API .......................................................................................................................................................... 18
5.3 RL78/G1D Hardware Resources used by the BLE Software ........................................................................... 20
5.4 Serial Communication in Modem Configuration .............................................................................................. 21
5.4.1 UART 2-wire Connection ........................................................................................................................ 23
5.4.2 UART 3-wire Connection ........................................................................................................................ 24
5.4.3 UART 2-wire with Branch Connection ................................................................................................... 29
5.4.4 CSI 4-wire Connection ............................................................................................................................ 31
5.4.5 CSI 5-wire Connection ............................................................................................................................ 35
5.4.6 IIC 3-wire Connection ............................................................................................................................. 39
5.5 Customer-specific information ......................................................................................................................... 43
5.6 Selection of own Bluetooth Device address ..................................................................................................... 43
6. Creating Executable Files............................................................................................................................ 44
6.1 Changing the Configuration Parameters ........................................................................................................... 44
6.1.1 Maximum Number of Simultaneous Connections ................................................................................... 46
6.1.2 Allocating the Heap Area ........................................................................................................................ 47
6.1.3 Changing the Operating Frequency ......................................................................................................... 47
6.1.4 Setting MCU part initialization ................................................................................................................ 48
6.1.5 Setting RF part initialization .................................................................................................................... 49
Index-1
6.1.6 Selecting the serial communication method ............................................................................................ 51
6.1.7 Setting the UART baud rate ..................................................................................................................... 53
6.1.8 Setting the CSI baud rate ......................................................................................................................... 58
6.1.9 Setting the IIC transfer clock ................................................................................................................... 58
6.1.10 Wait for the time Sub Clock is stabled .................................................................................................... 58
6.1.11 Setting the Profile Service ....................................................................................................................... 58
6.2 Building a Project ............................................................................................................................................. 70
6.3 Additional Note ................................................................................................................................................ 71
7. Description of Features ............................................................................................................................... 72
7.1 Controller Stack ................................................................................................................................................ 72
7.1.1 Advertising .............................................................................................................................................. 72
7.1.2 Scanning .................................................................................................................................................. 73
7.1.3 Initiating ................................................................................................................................................... 74
7.1.4 White List ................................................................................................................................................ 74
7.2 Generic Access Profile ...................................................................................................................................... 76
7.2.1 GAP roles ................................................................................................................................................ 76
7.2.2 GAP modes and procedures ..................................................................................................................... 76
7.2.3 Security .................................................................................................................................................... 79
7.2.4 Bluetooth Device Address ....................................................................................................................... 80
7.2.5 Advertising and Scan response data formats ........................................................................................... 81
7.2.6 GAP Service for GATT Server ................................................................................................................ 85
7.3 Security Manager .............................................................................................................................................. 86
7.3.1 Pairing feature exchange .......................................................................................................................... 87
7.3.2 STK generation ........................................................................................................................................ 88
7.3.3 Key distribution ....................................................................................................................................... 90
7.4 Generic Attribute Profile .................................................................................................................................. 92
7.4.1 GATT Database ....................................................................................................................................... 93
7.4.2 Creating a User Profile ............................................................................................................................ 98
7.4.3 GATT Service ........................................................................................................................................ 101
7.5 Find Me Profile ............................................................................................................................................... 102
7.5.1 Use case implemented by using the Immediate Alert service ................................................................ 102
7.6 Proximity Profile ............................................................................................................................................ 104
7.6.1 Use case implemented by using the Link Loss service .......................................................................... 104
7.6.2 Use case implemented by using the Immediate Alert service and the Tx Power service ...................... 105
7.7 Health Thermometer Profile ........................................................................................................................... 106
7.7.1 Use case implemented by using the Health Thermometer service and the Device Information service 106
7.8 Blood Pressure Profile .................................................................................................................................... 108
Index-2
7.8.1 Use case implemented by using the Blood Pressure service and the Device Information service ......... 108
7.9 HID over GATT Profile .................................................................................................................................. 110
7.9.1 Use case implemented by using the HID service ................................................................................... 110
7.9.2 Use case implemented by using the Device Information service ........................................................... 113
7.9.3 Use case implemented by using the Battery service .............................................................................. 113
7.9.4 Restrictions ............................................................................................................................................ 113
7.10 Scan Parameters Profile .................................................................................................................................. 114
7.10.1 Use case implemented by using the Scan Parameters service ............................................................... 114
7.11 Heart Rete Profile ........................................................................................................................................... 116
7.11.1 Use case implemented by using the Heart Rate service and the Device Information service ................ 116
7.12 Cycling Speed and Cadence Profile ................................................................................................................ 117
7.12.1 Use case implemented by using the Cycling Speed and Cadence service and the Device Information
service .................................................................................................................................................... 117
7.12.2 Use case implemented by using the SC Control Point characteristic..................................................... 118
7.13 Cycling Power Profile ..................................................................................................................................... 119
7.13.1 Use case implemented by using the Cycling Power service, the Device Information service and the
Battery service ....................................................................................................................................... 119
7.13.2 Use case implemented by using the Cycling Power Control Point characteristic .................................. 121
7.13.3 Use case implemented by Broadcaster role and Observer role .............................................................. 122
7.14 Glucose Profile ............................................................................................................................................... 123
7.14.1 Use case implemented by using the Glucose service and the Device Information service .................... 123
7.14.2 Use case implemented by using the Record Access Control Point characteristic .................................. 124
7.15 Time Profile .................................................................................................................................................... 125
7.15.1 Use case implemented by using the Current Time service .................................................................... 125
7.15.2 Use case implemented by using the Next DST Change service ............................................................ 125
7.15.3 Use case implemented by using the Reference Time Update service .................................................... 126
7.16 Running Speed and Cadence Profile ............................................................................................................... 127
7.16.1 Use case implemented by using the Running Speed and Cadence service and the Device Information
service .................................................................................................................................................... 127
7.16.2 Use case implemented by using the SC Control Point characteristic..................................................... 128
7.17 Alert Notification Profile ................................................................................................................................ 129
7.17.1 Use case implemented by using the Alert Notification service ............................................................. 129
7.17.2 Use case implemented by using the Alert Notification Control Point characteristic ............................. 130
7.18 Phone Alert Status Profile ............................................................................................................................... 131
7.18.1 Use case implemented by using the Phone Alert Status service ............................................................ 131
7.18.2 Use case implemented by using the Ringer Control Point characteristic ............................................... 131
7.19 Location and Navigation Profile ..................................................................................................................... 133
Index-3
7.19.1 Use case implemented by using the Location and Navigation service, the Device Information service and
the Battery service ................................................................................................................................. 133
7.19.2 Use case implemented by using the LN Control Point characteristic .................................................... 134
7.20 Vendor Specific .............................................................................................................................................. 136
7.20.1 Peak current consumption notification .................................................................................................. 136
7.20.2 Sleep ...................................................................................................................................................... 138
7.20.3 Reset processing .................................................................................................................................... 138
7.20.4 Original features provided by rBLE API ............................................................................................... 139
8. EEPEOM Emulation Library ...................................................................................................................... 143
8.1 About the EEPROM Emulation Library ......................................................................................................... 143
8.2 About setting for the EEPROM emulation library .......................................................................................... 143
8.3 Notes on using the EEPROM emulation library ............................................................................................. 143
9. Code Flash Library .................................................................................................................................... 144
9.1 About the Code Flash Library......................................................................................................................... 144
9.2 About setting for the Code Flash library ......................................................................................................... 144
9.3 Notes on using the Code Flash library ............................................................................................................ 144
10. Note on Writing User Application .............................................................................................................. 145
10.1 Note on RWKE Timer Management Function ............................................................................................... 145
10.2 Interrupt disabled time of the task and the interrupt handler .......................................................................... 145
10.3 Data transmission of large size data ................................................................................................................ 145
10.4 Performance of BLE MCU ............................................................................................................................. 145
10.4.1 Modem Configuration............................................................................................................................ 145
11. Implementation of FW Update Feature ..................................................................................................... 147
11.1 The FW Update Feature .................................................................................................................................. 147
11.2 Function required for FW Update ................................................................................................................... 147
11.2.1 Writing function to the code flash ......................................................................................................... 147
11.2.2 Data transmission and reception profile ................................................................................................. 147
11.2.3 Application for update control (for Receiver device) ............................................................................ 149
11.2.4 Application for update control (for Sender device) ............................................................................... 150
11.3 Limitation and Special Processing .................................................................................................................. 151
11.3.1 Area switching control ........................................................................................................................... 151
11.3.2 Update the standard library (IAR Embedded Workbench only) ............................................................ 151
11.3.3 Limitation for FW Update feature implementation ............................................................................... 152
11.3.4 Update target area and User RAM area ................................................................................................. 153
Index-4
12. HCI Packet Monitoring Feature ................................................................................................................. 155
12.1 Functional Composition of the HCI Packet Monitoring ................................................................................. 155
12.2 Enabling the HCI Packet Monitoring Feature ................................................................................................. 156
12.3 How to Use the HCI Packet Monitoring Feature ............................................................................................ 156
12.3.1 Preparations ........................................................................................................................................... 156
12.3.2 How to Use ............................................................................................................................................ 157
12.4 HCI Packet Monitoring Screen ....................................................................................................................... 158
Appendix A Referenced Documents ................................................................................................................ 159
Appendix B Terminology................................................................................................................................... 160
Index-5
Bluetooth Low Energy Protocol Stack User
’s Manual
R01UW0095EJ0122
Rev.1.22
Mar. 30, 2018

1. Overview

This manual describes the API (Application Program Interface) of the basic features of the Bluetooth Low Energy
protocol stack (BLE software), which is used to develop Bluetooth applications that incorporate Renesas Bluetooth low
energy microcontroller RL78/G1D.
For details about the BLE software APIs, see Bluetooth Low Energy Protocol Stack API Reference Manual.
R01UW0095EJ0122 Rev.1.22 Page 1 of 162 Mar. 30, 2018
2. Applicability

2. Applicability

The descriptions in this manual apply to Bluetooth Low Energy protocol stack Version 1.21 or later.
R01UW0095EJ0122 Rev.1.22 Page 2 of 162 Mar. 30, 2018
3. Restrictions

3. Restrictions

This section describes the restrictions that apply to BLE software.
R01UW0095EJ0122 Rev.1.22 Page 3 of 162 Mar. 30, 2018
4. Installing BLE Software

4. Installing BLE Software

4.1 Components Included

The compressed package of the BLE software includes the followings:
Documents
- Bluetooth Low Energy Protocol Stack User's Manual (this document)
- Bluetooth Low Energy Protocol Stack API Reference Manual
- Bluetooth Low Energy Protocol Stack Sample Program Application Note
- rBLE command specifications
Project files used for creating the executable file
- Executable file
- BLE software library
- Sample source code
- Source code that configures parameters
2
studio project file
- e
- CS+ for CC project file
- CS+ for CA,CX project file
- IAR Embedded Workbench workspace file
Sample applications for computer
- Executable file
- Source code
- Microsoft Visual Studio Express 2015 project file
HCI packet monitor application for computer
- Executable file
- INI file

4.2 BLE software build environment

The environment in which BLE software was built is shown below.
Hardware environment
- Host
PC/AT™-compatible computer
Processor : At least 1.6 GHz
Main memory : At least 1 GB
Display : 1024 x 768 or higher resolution and 65,536 colors
Interface : USB 2.0 (E1 and USB-serial conversion cable)
• Tools used
Renesas on-chip debugging emulator E1
• Software environment
Windows 7 or later
Microsoft Visual Studio Express 2015 for Desktop
R01UW0095EJ0122 Rev.1.22 Page 4 of 162 Mar. 30, 2018
4. Installing BLE Software
Microsoft .NET Framework 4 + language pack
Renesas CS+ for CC V4.00.00/ RL78 Compiler CC-RL V1.03.00
or e² studio 4.3.1.001/RL78 Family C Compiler Package V1 (without IDE) V1.03.00
or Renesas CS+ for CA, CX V3.02.00/Renesas CA78K0R V1.72
or IAR Embedded Workbench for Renesas RL78 V2.20.1
Renesas Flash Programmer V3
(available from https://www.renesas.com/software-tool/renesas-flash-programmer-programming-gui)
For details about the environment in which to run the sample application for computers, see Bluetooth Low Energy
Protocol Stack Sample Program Application Note.

4.3 Installation Procedure

Copy the decompressed contents of the package to any folder in your computer.
2
Note: If using the e
To build the BLE software, the EEPROM Emulation Library and Code Flash Library are needed. Libraries for testing are
contained in the BLE software package in advance. But when you start to develop a product, it is necessary to download the
newest libraries corresponding to your development environment from Renesas website and copy to the following folder.
The EEPROM Emulation Library and Code Flash Library are provided by Renesas Electronics Corporation. Regarding
how to install the libraries, refer to 4.4.2 (7) and 4.4.2 (8).
EEPROM Emulation Library and Data Flash Access Library
- CS+ for CC/e
\Renesas\BLE_Software_Ver_X_XX\RL78_G1D\Project_Source\renesas\src\driver\dataflash\cc_rl
- CS+ for CA,CX
\Renesas\BLE_Software_Ver_X_XX\RL78_G1D\Project_Source\renesas\src\driver\dataflash\cs
- IAR V2.20.1
\Renesas\BLE_Software_Ver_X_XX\RL78_G1D\Project_Source\renesas\src\driver\dataflash\iar_v2
Code Flash Library
- CS+ for CC/e
\Renesas\BLE_Software_Ver_X_XX\RL78_G1D\Project_Source\renesas\src\driver\codeflash\cc_rl
- CS+ for CA,CX
\Renesas\BLE_Software_Ver_X_XX\RL78_G1D\Project_Source\renesas\src\driver\codeflash\cs
- IAR V2.20.1
\Renesas\BLE_Software_Ver_X_XX\RL78_G1D\Project_Source\renesas\src\driver\codeflash\iar_v2
Note that the following versions of the library are included in the BLE software package:
EEPROM Emulation Library and Data Flash Access Library
studio, you cannot use multi-byte characters or blank in the BLE software installation folder path.
2
studio (CC-RL)
2
studio (CC-RL)
- for all compilers
"EEPROM Emulation Library Pack02 Package Ver.2.00(for CA78K0R/CC-RL Compiler) for RL78 Family"
Code Flash Library
R01UW0095EJ0122 Rev.1.22 Page 5 of 162 Mar. 30, 2018
4. Installing BLE Software
- for all compilers
" Flash Self Programming Library Type01 Package Ver.3.00 for the RL78 Family [for the CA78K0R/CC-RL
Compiler]"
R01UW0095EJ0122 Rev.1.22 Page 6 of 162 Mar. 30, 2018
Folder name
Name of the executable file
Content
\ca78k0r
Folder for CS+ for CA,CX
\Embedded
Folder for Embedded configuration
Proximity / Find Me / Alert Notification Profile
over GATT / Scan Parameters
Profile
Speed and Cadence / Cycling Power Profile
Cadence Profile
Glucose / Phone Alert Status / Time Profile
Sample program.
Custom Profile
\Modem
Folder for Modem configuration
Proximity / Find Me / Alert Notification Profile
4. Installing BLE Software

4.4 Folder Organization

The detail of file and folder after installation is shown below.

4.4.1 \Renesas\BLE_Software_Ver_X_XX\Manual\

This folder includes the manuals. Please read them before using the product.

4.4.2 \Renesas\BLE_Software_Ver_X_XX\RL78_G1D

(1) \ROM_File\
This folder contains the executable files (hex files) of the BLE software programs that run on the RL78/G1D. Write these
programs to the RL78/G1D on-chip flash memory.
For how to write to the on-chip flash memory, see the Renesas Flash Programmer flash memory programming software
User's Manual.
Also, if you have already written the BD address into on-chip data flash memory, change the operation mode of the RFP
software configuration information list to "block (code flash)". If you don't, the written BD address might be erased.
The contents of the executable file that is stored in this folder are shown in Table 4-1 . See a section 6 Creating
Executable Files about Sample Custom profile. See Bluetooth Low Energy Protocol Stack Application Note: Sample
Program about how to create an executable file.
Table 4-1 Overview of the executable file
RL78_G1D_CE(PXP,FMP,ANP).hex Executable file that corresponds to the
RL78_G1D_CE(HOGP,ScPP).hex Executable file that corresponds to the HID
RL78_G1D_CE(HTP,BLP,HRP).hex Executable file that corresponds to the Health
Thermometer / Blood Pressure / Heart Rate
RL78_G1D_CE(CSCP,CPP).hex Executable file that corresponds to the Cycling
RL78_G1D_CE(LNP,RSCP).hex Executable file that corresponds to the
Location and Navigation / Running Speed and
RL78_G1D_CE(GLP,PASP,TIP).hex Executable file that corresponds to the
RL78_G1D_CE(SCP).hex Executable file that corresponds to the Simple
RL78_G1D_CE(SIMPLE_SAMPLE).hex Executable file that corresponds to the Sample
RL78_G1D_CM(PXP,FMP,ANP).hex Executable file that corresponds to the
R01UW0095EJ0122 Rev.1.22 Page 7 of 162 Mar. 30, 2018
Folder name
Name of the executable file
Content
over GATT / Scan Parameters
Profile
Speed and Cadence / Cycling Power Profile
Cadence Profile
Glucose / Phone Alert Status / Time Profile
Custom Profile
UART Direct Test Mode
\ccrl
Folder for CC-RL
\Embedded
Folder for Embedded configuration
Proximity / Find Me / Alert Notification Profile
over GATT / Scan Parameters
Profile
Speed and Cadence / Cycling Power Profile
Cadence Profile
Glucose / Phone Alert Status / Time Profile
Custom Profile
Custom Profile
\Modem
Folder for Modem configuration
Proximity / Find Me / Alert Notification Profile
over GATT / Scan Parameters
Profile
Speed and Cadence / Cycling Power Profile
4. Installing BLE Software
RL78_G1D_CM(HOGP,ScPP).hex Executable file that corresponds to the HID
RL78_G1D_CM(HTP,BLP,HRP).hex Executable file that corresponds to the Health
Thermometer / Blood Pressure / Heart Rate
RL78_G1D_CM(CSCP,CPP).hex Executable file that corresponds to the Cycling
RL78_G1D_CM(LNP,RSCP).hex Executable file that corresponds to the
Location and Navigation / Running Speed and
RL78_G1D_CM(GLP,PASP,TIP).hex Executable file that corresponds to the
RL78_G1D_CM(SCP).hex Executable file that corresponds to the Sample
RL78_G1D_CM(DTM_2WIRE).hex Executable file that corresponds to 2-Wire
RL78_G1D_CE(PXP,FMP,ANP).hex Executable file that corresponds to the
RL78_G1D_CE(HOGP,ScPP).hex Executable file that corresponds to the HID
RL78_G1D_CE(HTP,BLP,HRP).hex Executable file that corresponds to the Health
Thermometer / Blood Pressure / Heart Rate
RL78_G1D_CE(CSCP,CPP).hex Executable file that corresponds to the Cycling
RL78_G1D_CE(LNP,RSCP).hex Executable file that corresponds to the
Location and Navigation / Running Speed and
RL78_G1D_CE(GLP,PASP,TIP).hex Executable file that corresponds to the
RL78_G1D_CE(SCP).hex Executable file that corresponds to the Sample
RL78_G1D_CCE(SIMPLE_SAMPLE).hex Executable file that corresponds to the Sample
RL78_G1D_CM(PXP,FMP,ANP).hex Executable file that corresponds to the
RL78_G1D_CM(HOGP,ScPP).hex Executable file that corresponds to the HID
RL78_G1D_CM(HTP,BLP,HRP).hex Executable file that corresponds to the Health
RL78_G1D_CM(CSCP,CPP).hex Executable file that corresponds to the Cycling
R01UW0095EJ0122 Rev.1.22 Page 8 of 162 Mar. 30, 2018
Thermometer / Blood Pressure / Heart Rate
Folder name
Name of the executable file
Content
Cadence Profile
Glucose / Phone Alert Status / Time Profile
Custom Profile
\iar_v2
Folder for IAR Embedded Workbench V2
\Embedded
Folder for Embedded configuration
Proximity / Find Me / Alert Notification Profile
over GATT / Scan Parameters
Profile
Speed and Cadence / Cycling Power Profile
Cadence Profile
Glucose / Phone Alert Status / Time Profile
Custom Profile
Custom Profile
\Modem
Folder for Modem configuration
Proximity / Find Me / Alert Notification Profile
over GATT / Scan Parameters
Profile
Speed and Cadence / Cycling Power Profile
Cadence Profile
Glucose / Phone Alert Status / Time Profile
Custom Profile
4. Installing BLE Software
RL78_G1D_CM(LNP,RSCP).hex Executable file that corresponds to the
Location and Navigation / Running Speed and
RL78_G1D_CM(GLP,PASP,TIP).hex Executable file that corresponds to the
RL78_G1D_CM(SCP).hex Executable file that corresponds to the Sample
RL78_G1D_IE(PXP,FMP,ANP).hex Executable file that corresponds to the
RL78_G1D_IE(HOGP,ScPP).hex Executable file that corresponds to the HID
RL78_G1D_IE(HTP,BLP,HRP).hex Executable file that corresponds to the Health
Thermometer / Blood Pressure / Heart Rate
RL78_G1D_IE(CSCP,CPP).hex Executable file that corresponds to the Cycling
RL78_G1D_IE(LNP,RSCP).hex Executable file that corresponds to the
Location and Navigation / Running Speed and
RL78_G1D_IE(GLP,PASP,TIP).hex Executable file that corresponds to the
RL78_G1D_IE(SCP).hex Executable file that corresponds to the Sample
RL78_G1D_IE(SIMPLE_SAMPLE).hex Executable file that corresponds to the Sample
RL78_G1D_IM(PXP,FMP,HTP,BLP).hex Executable file that corresponds to the
RL78_G1D_IM(HOGP,ScPP).hex Executable file that corresponds to the HID
RL78_G1D_IM(HTP,BLP,HRP).hex Executable file that corresponds to the Health
Thermometer / Blood Pressure / Heart Rate
RL78_G1D_IM(CSCP,CPP).hex Executable file that corresponds to the Cycling
RL78_G1D_IM(LNP,RSCP).hex Executable file that corresponds to the
RL78_G1D_IM(GLP,PASP,TIP).hex Executable file that corresponds to the
RL78_G1D_IM(SCP).hex Executable file that corresponds to the Sample
The setting for building each executable file in this folder is shown as follows. Regarding the setting of profiles, refer to
the subsection 6.1.11.1 "Profile Enable / Disable Setting" in this document.
R01UW0095EJ0122 Rev.1.22 Page 9 of 162 Mar. 30, 2018
Location and Navigation / Running Speed and
profiles in prf_sel.h
PRF_SEL_PXPM
(1)(0)
PRF_SEL_PXPR
(1)(0)
PRF_SEL_FMPL
(1)(0)
PRF_SEL_FMPT
(1)(0)
PRF_SEL_HGHD
(0)(1)
PRF_SEL_HGBH
(0)(1)
PRF_SEL_HGRH
(0)(1)
PRF_SEL_SPPC
(0)(1)
PRF_SEL_SPPS
(0)(1)
PRF_SEL_ANPC
(1)(0)
PRF_SEL_ANPS
(1)(0)
profiles in prf_sel.h
PRF_SEL_PXPM
(1)(0)
PRF_SEL_PXPR
(1)(0)
PRF_SEL_FMPL
(1)(0)
PRF_SEL_FMPT
(1)(0)
PRF_SEL_HTPC
(0)(1)
PRF_SEL_HTPT
(0)(1)
PRF_SEL_BLPC
(0)(1)
PRF_SEL_BLPS
(0)(1)
PRF_SEL_HRPC
(0)(1)
PRF_SEL_HRPS
(0)(1)
PRF_SEL_ANPC
(1)(0)
4. Installing BLE Software
Build setting for RL78_G1D_xx(PXP,FMP,ANP).hex
Project files to build this executable file are included in the following folder. There is no change from default setting.
Project folder: \Project_Source\renesas\tools\project\
Build setting for RL78_G1D_xx(HOGP,ScPP).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
To enable HOGP and ScPP, the following macro setting change is needed.
Configuration file: Project_Source\renesas\src\arch\rl78\prf_sel.h
Table 4-2 Profile setting for RL78_G1D_xx(HOGP,ScPP).hex
Setting Macros for selecting
Changes
Build setting for RL78_G1D_xx(HTP,BLP,HRP).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
To enable HTP,BLP and HRP, the following macro setting change is needed.
Configuration file: Project_Source\renesas\src\arch\rl78\prf_sel.h
Table 4-3 Profile setting for RL78_G1D_xx(HTP,BLP,HRP).hex
Setting Macros for selecting
Changes
R01UW0095EJ0122 Rev.1.22 Page 10 of 162 Mar. 30, 2018
PRF_SEL_ANPS
(1)(0)
profiles in prf_sel.h
PRF_SEL_PXPM
(1)(0)
PRF_SEL_PXPR
(1)(0)
PRF_SEL_FMPL
(1)(0)
PRF_SEL_FMPT
(1)(0)
PRF_SEL_CSCC
(0)(1)
PRF_SEL_CSCS
(0)(1)
PRF_SEL_CPPC
(0)(1)
PRF_SEL_CPPS
(0)(1)
PRF_SEL_ANPC
(1)(0)
PRF_SEL_ANPS
(1)(0)
profiles in prf_sel.h
PRF_SEL_PXPM
(1)(0)
PRF_SEL_PXPR
(1)(0)
PRF_SEL_FMPL
(1)(0)
PRF_SEL_FMPT
(1)(0)
PRF_SEL_ANPC
(1)(0)
PRF_SEL_ANPS
(1)(0)
PRF_SEL_LNPS
(0)(1)
PRF_SEL_LNPC
(0)(1)
PRF_SEL_RSCC
(0)(1)
PRF_SEL_RSCS
(0)(1)
4. Installing BLE Software
Build setting for RL78_G1D_xx(CSCP,CPP).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
To enable CSCP and CPP, the following macro setting change is needed.
Configuration file: Project_Source\renesas\src\arch\rl78\prf_sel.h
Table 4-4 Profile setting for RL78_G1D_xx(CSCP,CPP).hex
Setting Macros for selecting
Changes
Build setting for RL78_G1D_xx(LNP,RSCP).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
To enable LNP and RSCP, the following macro setting change is needed.
Configuration file: Project_Source\renesas\src\arch\rl78\prf_sel.h
Table 4-5 Profile setting for RL78_G1D_xx(LNP,RSCP).hex
Setting Macros for selecting
Changes
Build setting for RL78_G1D_xx(GLP,PASP,TIP).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
R01UW0095EJ0122 Rev.1.22 Page 11 of 162 Mar. 30, 2018
profiles in prf_sel.h
PRF_SEL_PXPM
(1)(0)
PRF_SEL_PXPR
(1)(0)
PRF_SEL_FMPL
(1)(0)
PRF_SEL_FMPT
(1)(0)
PRF_SEL_GLPC
(0)(1)
PRF_SEL_GLPS
(0)(1)
PRF_SEL_TIPC
(0)(1)
PRF_SEL_TIPS
(0)(1)
PRF_SEL_ANPC
(1)(0)
PRF_SEL_ANPS
(1)(0)
PRF_SEL_PASC
(0)(1)
PRF_SEL_PASS
(0)(1)
Compile Option
Changes
Preprocessor Macro Definition
noUSE_SAMPLE_PROFILE USE_SAMPLE_PROFILE
rwble_config.h
__DTM2WIRE_UART_USE__
(0)(1)
4. Installing BLE Software
To enable GLP,PASP and TIP, the following setting change is needed.
Configuration file: Project_Source\renesas\src\arch\rl78\prf_sel.h
Table 4-6 Profile setting for RL78_G1D_xx(GLP,PASP,TIP).hex
Setting Macros for selecting
Changes
Build setting for RL78_G1D_xx(SCP).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
To enable Custom Profile, the following compile option setting change is needed.
Table 4-7 Profile setting for RL78_G1D_xx(SCP).hex
Build setting for RL78_G1D_xx(SIMPLE_SAMPLE).hex
Project files to this build executable file are included in the following folder. There is no need to change source code or
project setting.
Project Folder: \Project_Source\renesas\tools\project_simple\
Regarding the the simple sample program, refer to chapter 6 "Usage of Simple Sample Program" in Bluetooth low
energy Protocol Stack Sample Program Application Note (R01AN1375).
Build setting for RL78_G1D_CM(DTM_2WIRE).hex
Project files to build this executable file are included in the following folder.
Project folder: \Project_Source\renesas\tools\project\
To enable Direct Test Mode by 2-wire UART, the following macro setting change is needed.
Configuration file: Project_Source\bleip\src\rwble\rwble_config.h
Table 4-8 DTM setting for RL78_G1D_CM(DTM_2WIRE).hex
Setting Macro for enabling DTM in
R01UW0095EJ0122 Rev.1.22 Page 12 of 162 Mar. 30, 2018
Changes
4. Installing BLE Software
Regarding the Direct Test Mode sample program, refer to section 7.7 "Sample Program for the Direct Test Mode with RF
Tester" in Bluetooth low energy Protocol Stack Sample Program Application Note (R01AN1375).
(2) \Project_Source\
This folder contains the BLE software library and sample source code required for building the executable files (hex
files) of the software programs that run on the RL78/G1D.
(3) \Project_Source\renesas\tools\project\
This folder contains the project/workspace files for each development environment which are required for building the
executable files (hex files) of the software programs that run on the RL78/G1D. In addition, projects/workspaces in the
Embedded configuration and Modem configuration for each development environment are contained. Build the program
by using these project/workspace files in your development environment to generate executable files.
For how to build the program, see 6.2.
(4) \Project_Source\renesas\tools\project_devices\
This folder contains the project/workspace files for each development environment which are required for building the
executable files (hex files) for the R5F11AGG(128KB) and R5F11AGH(192KB). In addition, projects/workspaces in the
Embedded configuration and Modem configuration for each development environment are contained. Build the program
by using these project/workspace files in your development environment to generate executable files.
(5) \Project_Source\renesas\tools\project_simple\
This folder contains the project/workspace files for each development environment which are required for building the
executable files (hex files) of the simple sample program which shows how to use the BLE software. Build the program by
using these project/workspace files in your development environment to generate executable files.
For details about the simple sample program, see Sample Program Application Note (R01AN1375).
(6) \Project_Source\renesas\src\
This folder contains the files for configuring the parameters that can be changed by the user (source code). Change the
parameter settings as required before building the program.
For details about the configurable parameters and how to change the settings, see 6.1.
(7) \Project_Source\renesas\src\driver\dataflash\cc_rl\ or \cs\ or \iar_v2\
This folder is for containing the EEPROM Emulation Library and Data Flash Access Library to access Data Flash
memory. The libraries for testing are contained in advance. But when you start to develop a product, it is necessary to copy
the newest library corresponding to your development environment to this folder.
The EEPROM Emulation Library and Data Flash Access Library are downloaded from Renesas website. For reference,
shows how to obtain a tested version by the BLE software from Renesas website. In addition, operating procedures might
be changed without a notice by the renewals of the website.
Open the Renesas website (https://www.renesas.com/). Select [DESIGN & SUPPORT] [DEVELOPMENT TOOLS]
[Data Flash Libraries].
R01UW0095EJ0122 Rev.1.22 Page 13 of 162 Mar. 30, 2018
4. Installing BLE Software
Get the following file and execute files for unzip the EEPROM Emulation Library and Data Flash Access Library.
EEPROM Emulation Library Pack02 Package Ver.2.00(for CA78K0R/CC-RL Compiler) for RL78 Family.
Note: For the library for IAR, select "America/Europe/Middle East/Africa" when you run the installer. The Library
version select "IAR compiler version 2.10.
The files to be copied are shown below.
CS+ for CC or e
2
studio (CC-RL) version:
• eel.h
• eel.lib
• eel_types.h
• fdl.h
• fdl.lib
• fdl_types.h
CS+ for CA, CX version:
• eel.h
• eel.lib
• eel_types.h
• fdl.h
• fdl.lib
• fdl_types.h
IAR Embedded Workbench V2 version:
• eel.h
eel.a
• eel_types.h
• fdl.h
fdl.a
• fdl_types.h
(8) \Project_Source\renesas\src\driver\codeflash\cc_rl\ or cs\ or \iar_v2\
This folder is for containing the Code Flash Library to write to Code Flash memory. The library for testing is contained
in advance. But when you start to develop a product, it is necessary to copy the newest Code Flash Library corresponding to
your development environment to this folder.
The Code Flash Library is downloaded from Renesas website. For reference, shows how to obtain a tested version by the
BLE software from Renesas website. In addition, operating procedures might be changed without a notice by the renewals
of the website.
Open the Renesas website (https://www.renesas.com/). Select [DESIGN & SUPPORT] [DEVELOPMENT TOOLS]
[Code Flash Libraries].
Get the following file and execute file for unzip the Code Flash Library.
Flash Self Programming Library Type01 Package Ver.3.00 for the RL78 Family [for the CA78K0R/CC-RL
Note: For the library for IAR, select "America/Europe/Middle East/Africa" when you run the installer. The Library
version select "IAR compiler version 2.10.
R01UW0095EJ0122 Rev.1.22 Page 14 of 162 Mar. 30, 2018
Compiler]
4. Installing BLE Software
The files to be copied are shown below.
CS+ for CC or e
2
studio (CC-RL) version
fsl.h
fsl.lib
fsl_types.h
CS+ for CA, CX version
fsl.h
fsl.lib
fsl_types.h
IAR Embedded Workbench V2 version
fsl.h
fsl.a
fsl_types.h

4.4.3 \Renesas\BLE_Software_Ver_X_XX\BLE_Sample\

This folder contains the executable files of the BLE software sample program that runs on a computer when BLE
software is used in the Modem configuration. About the detail of the sample program, see Bluetooth Low Energy Protocol
Stack Application Note: Sample Program.
R01UW0095EJ0122 Rev.1.22 Page 15 of 162 Mar. 30, 2018
5. BLE Software Configuration

5. BLE Software Configuration

BLE software refers to the set of software that includes BLE stacks compliant with the Bluetooth Low Energy protocol
(Bluetooth v4.2). The following section describes the BLE software configuration in detail.

5.1 Configuration

Figure 5-1 shows the BLE software configuration.
BLE software runs in a configuration in which the application is mounted on the RL78/G1D (hereafter referred to as the
Embedded configuration) and in a configuration in which the application is mounted on another MCU (hereafter referred to
as the Modem configuration). BLE software provides APIs which can use the same application in both configurations.
Figure 5-1 BLE Software Configuration
BLE software in the Modem configuration runs on two chips, the APP MCU and the BLE MCU (RL78/G1D). BLE
software is configured of an rBLE_Host block that runs on the APP MCU (
on the BLE MCU (
The software to be prepared by the user (
R01UW0095EJ0122 Rev.1.22 Page 16 of 162 Mar. 30, 2018
blocks in the figure).
blocks in the figure) consists of the APP MCU’s application block, serial
block in the figure), and software that runs
Block Name
Description
Application
Software the user needs to prepare
OS
Operating system the user needs to prepare
rBLE APIs from the application.
Note: The user needs to prepare this driver.
protocol.
stack services via rBLE_Core.
the profile layer to the RF driver).
Controller stack : LL and HCI
Kernel Extension)
other modules and manages the entire BLE MCU.
5. BLE Software Configuration
communication driver block, and OS block. However, if there is no OS in the APP MCU, software for the OS block does
not have to be prepared because the rBLE_Host block does not use resources of the OS.
The application that runs on the APP MCU executes communication between the BLE MCU and BLE services via
rBLE_Host. The APP MCU and BLE MCU are physically connected via UART or CSI or IIC, and communication is
executed using RSCIP (Renesas Serial Communication Interface Protocol) under the control of rBLE_Host.
BLE software in the Embedded configuration runs on only a single chip, the BLE MCU (RL78/G1D). The software to be
prepared by the user is only the application block and it should be implemented on the BLE MCU.
Table 5-1 gives an overview of the software blocks.
Table 5-1 Overview of Software Blocks
rBLE_Host Builds command packets for MDM_APPL and analyzes
event packets from MDM_APPL, enabling the issuance of
Serial Communication driver
(APP MCU)
Serial Communication driver
(BLE MCU)
MDM APPL Analyzes command packets from rBLE_Host and builds
rBLE_Core Provides an interface with the upstream modules for
Profile layer Main BLE stack
Host stack
Controller stack
RWKE (Renesas Wireless
Performs communication with the BLE MCU through
UART or CSI or IIC. RSCIP is used as the communication
protocol.
Performs communication with the APP MCU through
UART or CSI or IIC. RSCIP is used as the communication
event packets for rBLE_Host, enabling the use of BLE
using the services of the main BLE stack (the part from
Profiles : FMP, PXP, HTP, BLP, HOGP, ScPP, HRP,
CSCP, CPP, GLP, TIP, RSCP, ANP, PASP and LNP
Host stack : SM, L2CAP, GAP, and GATT
Provides the basic functionality used commonly with the
R01UW0095EJ0122 Rev.1.22 Page 17 of 162 Mar. 30, 2018
SM
FMP
GAP
PXP
HTP
BLP
HOGP
ScPP
GATT
ATT
rBLE API
ANP
LNP
HRP
CSCP
CPP
GLP
TIP
RSCP
PASP
Layer
Description
Supported Features
Privacy feature
above.
encryption, and data signing
means of alerts.
be sent to the user.
5. BLE Software Configuration

5.2 rBLE API

The BLE software provides an API (rBLE API) that allows the application to use the services of the BLE stack on the
BLE MCU from the application.
The Bluetooth layers that can be accessed by the APIs provided by the rBLE API are shown in the figure below.
Figure 5-2 rBLE API and BLE Stack
The features supported by the various layers are listed in Table 5-2. For details about the various features, see 7
Description of Features.
Table 5-2 Bluetooth Features Supported by the rBLE API
GAP
(Generic Access
Profile)
SM
(Security Manager)
Executes access procedures
according to the link
management and security
requirements for processes
such as device discovery and
peer device connection and
disconnection.
Executes pairing between two
devices, communication
encryption, and data signing to
ensure security. Also executes
information exchange between
devices as needed for the
Four GAP roles
(Central, Peripheral, Broadcaster, and Observer)
Broadcast and Scan
Discovery, Connection, and Bonding modes, and
procedures
Security mode
Connection and disconnection of a link
Changing the connection parameters
Random and static addresses
Pairing procedure
Pairing algorithms
(Passkey Entry, Just Works, OOB)
Pairing and key generation
Key distribution
Security implemented by authentication,
FMP
(Find Me Profile)
PXP
(Proximity Profile)
R01UW0095EJ0122 Rev.1.22 Page 18 of 162 Mar. 30, 2018
Allows searching for peer
devices within the
communication range by
Defines the behavior when a
device moves away from a peer
device so that the connection is
dropped or the path loss
increases above a preset level,
causing an immediate alert to
Immediate Alert service
Link Loss service
Immediate Alert service
Tx Power service
Loading...
+ 147 hidden pages