Application Note
Renesas RA Family

Getting Started with GUIX Thermostat Application
Introduction
This application, which is a Thermostat application, provides a reference for developing complex multithreaded applications with a touch screen graphical Human Machine Interface (HMI) by using Renesas FSP
and Azure RTOS GUIX. It describes steps to create a basic GUIX for FSP, integrates touch driver, handles
multiple hardware accesses, system updates, and event handling.
This application is developed using the Renesas RA Flexible Software Package (FSP), which provides a quick
and versatile way to build secure connected Internet of Things (IoT) devices using the Renesas RA family of
Arm microcontrollers (MCUs). RA FSP provides production ready peripheral drivers to take advantage of the
RA FSP ecosystem along with Azure RTOS GUIX library and Azure RTOS. “In addition, FSP also provides
Ethernet, USB, File System and other middleware stacks as well. This powerful suite of tools provides acomprehensive, integrated framework for rapid development of complex embedded applications.
This application note assumes that you are familiar with the concepts associated with writing multi-threaded
applications under a Real Time Operating System (RTOS) environment, such as Azure RTOS. This applicationnote makes use of RTOS features such as threads and semaphores. Prior experience in using Azure RTOS
would be helpful for easy understanding of the provided application project . For more detailed information on
Azure RTOS features, refer to the Azure RTOS User Manual.
The Graphics application is developed using the Renesas e2 studio Integrated Solution Development
Environment (IDE). e2 studio is integrate with the FSP platform installer, which can be downloaded from
Renesas website. The intuitive configurators and code generators in e2 studio and FSP will help the application
developers in creating such complex multi-threaded graphics applications very quickly. This application notewalks you through all the necessary steps in creating, building and running a complex graphics project,including the following:
•
•
•
•
•
•
•
•
•

Board setup.
Install tools.
Build and run application.
Azure RTOS GUIX Studio project integration.
Setup Azure RTOS GUIX Studio project.
Add Touch Driver.
Create FSP GUIX project.
Hardware Setup.
Using the General Purpose Timer to drive a PWM backlight control signal.

Required Resources
Development tools and software• e2 studio IDE 2024-01• Renesas Flexible Software Package (FSP) v5.2.0• Azure RTOS GUIX Studio V6.4.0.0
Hardware•Renesas EK-RA6M3G kit (RA6M3 MCU Group)(https://www.renesas.com/us/en/products/software-tools/boards-and-kits/eval-kits/ek-ra6m3g.html)

Reference Manuals••••

RA Flexible Software Package Documentation Release v5.2.0
Azure RTOS GUIX and GUIX Studio v6.4.0.0
Renesas RA6M3 Group User’s Manual Rev.1.20
EK-RA6M3G-v1.0 Schematics

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 1 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

Contents
1.

Installing Tools.........................................................................................................................3

1.1

Overview .................................................................................................................................................. 3

1.2

Procedural Steps ..................................................................................................................................... 3

2.

Create Application Note Project ............................................................................................... 5

2.1

Overview .................................................................................................................................................. 5

2.2

Procedural Steps ..................................................................................................................................... 5

3.

Using GUIX Widget Timer to Trigger a Screen Transition ...................................................... 19

3.1

Overview ................................................................................................................................................ 19

3.2

Procedural Steps ................................................................................................................................... 19

4.

Add Touch Driver to Thermostat_GUIX_EK_RA6M3G Project .............................................. 21

4.1

Overview ................................................................................................................................................ 21

4.2

Procedural Steps ................................................................................................................................... 21

5.

Control LCD Backlight ........................................................................................................... 29

5.1

Overview ................................................................................................................................................ 29

5.2

Procedural Steps ................................................................................................................................... 29

6.

Update Date/Time and Temperature ..................................................................................... 33

6.1

Overview ................................................................................................................................................ 33

6.2

Procedural Steps ................................................................................................................................... 33

7.

Setting Date/Time in A Full Function Project .......................................................................... 36

7.1

Overview ................................................................................................................................................ 36

7.2

Procedural Steps ................................................................................................................................... 37

8.

Website and Support ............................................................................................................. 37

Revision History ............................................................................................................................ 38

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 2 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

1. Installing Tools
1.1

Overview

In this section you will copy the application note (AN) materials to your PC and install e2 studio v2024-01/FSP
v5.2.0 and Azure RTOS GUIX Studio v6.4.0.0.

1.2

Procedural Steps

1. If you already have e2 studio v2024-01 with FSP v5.2.0 or later installed, you can skip this step. Otherwise,
you can download it from this link.
2. You can get Azure RTOS GUIX Studio v6.4.0.0 or greater from this link. If it goes well, you will see thewindow in the next step on the web browser.
Note: It needs Microsoft Store working on your PC to install Azure RTOS GUIX Studio.
3. Click Get to start installing Azure RTOS GUIX Studio.

Figure 1. Clicking Get to Start Installing Azure RTOS GUIX
4. Click Open Microsoft Store to continue installing Azure RTOS GUIX Studio.

Figure 2. Clicking Open Microsoft Store5. Click Install to continue. A window shows up to ask for a Microsoft account, which is seen in the next step.

Figure 3. Installing Azure RTOS GUIX

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 3 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

6. Ignore it by clicking “X” on the top-right to close this pop-up window and continue Azure RTOS GUIX Studioinstallation.

Figure 4. Closing Pop-up Window to Continue Installing Azure RTOS GUIX
7. Downloading and installation of Azure RTOS GUIX Studio starts.

Figure 5. Starting of Downloading and Installation
8. Click Launch to launch Azure RTOS GUIX Studio.

Figure 6. Launching to Start Azure RTOS GUIX Studio
R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 4 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

9. Azure RTOS GUIX Studio launched.

Figure 7. Azure RTOS GUIX Studio Launched
10. Close Azure RTOS GUIX Studio, for now, you will open it again later.

2. Create Application Note Project
2.1

Overview

In this section, you will create a project to which you will add pre-written source code and integrate it with apre-created Azure RTOS GUIX Studio project.

2.2

Procedural Steps

1. Create a new RA C/C++ project. Name it as Thermostat_GUIX_EK_RA6M3G.

Figure 8. Creating New RA C/C++ Project

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 5 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

2. Set board to EK-RA6M3G.

Figure 9. Setting Board to EK-RA6M3G
3. Select Azure RTOS ThreadX (v6.2.1+FSP.5.2.0).

Figure 10. Selecting Azure RTOS ThreadX

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 6 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

4. Use Azure RTOS ThreadX-Minimal template.

Figure 11. Selecting Azure RTOS ThreadX – Minimal Template
5. Open project configuration, go to BSP tab, change Heap size to 0x2000.

Figure 12. Changing Heap size (bytes) in Project Configuration

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 7 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

6. You can remove Azure RTOS ThreadX Port if you want.

Figure 13. Remove Azure RTOS ThreadX Port
7. Add a New Thread and name it as System Thread with the following settings.

Figure 14. Adding a New Thread and Naming it System Thread

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 8 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

8. Add Azure RTOS GUIX to System Thread.

Figure 15. Adding Azure RTOS GUIX to System Thread
9. Property settings for the g_display0 Graphics LCD on r_glcdc.

Figure 16. Graphics LCD Display Driver Configuration
R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 9 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

10. Configure the Hsync, Vsync, Data Enable pins and clock as shown.

Figure 17. TCON Properties
11. In Pin Configuration, change P603’s mode to Output mode (Initial high) to enable LCD panel backlight.

Figure 18. Changing Pin Configuration Mode to Enable LCD Panel Backlight

12. In RA Configurator, click

to generate project content. Make sure project is active,

click
to build the project. It may take a long period of time to finish building an Azure RTOS/GUIX
project on your PC.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 10 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

13. Copy Azure RTOS GUIX Studio project to e2 studio project (Themostat_GUIX_EK_RA6M3G) by copying“guix_studio” folder in the application note (AN) folder (FSP_GUIX_Thermostat) and pasting it in the
Themostat_GUIX_EK_RA6M3G project.

Figure 19. Copying the Azure RTOS GUIX Studio Project to e2 studio

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 11 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

14. GUIX Studio project is now in Thermostat_GUIX_EK_RA6M3G project. In e2 studio, right-click the“guix_studio” folder and exclude it from the build since it contains the Azure GUIX Studio project, which
will not be built by FSP.

Figure 20. Excluding guix_studio Folder from the Build

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 12 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

15. Get to Thermostat_GUIX_EK_RA6M3G project folder by right clicking the e2 studio project and select“System Explorer” as shown below.

Figure 21. Selecting System Explorer
16. Open thermostat.gpx project file in “guix_studio>GNU” sub-folder in yourThermostat_GUIX_EK_RA6M3G folder. If you have several GUIX Studio versions in your system, makesure you choose the right one, which is v6.4.0.0 or later.

Figure 22. Opening the Project File
17. This GUIX Studio project has a complete design of this Thermostat application. The next several steps
describe the process to generate resources, application code and integrate them with an e2 studio project.

Figure 23. GUIX Studio Thermostat Application View

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 13 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

18. The Azure RTOS GUIX Studio project consists of 5 screens, including Splash, Main Page, Settings,
Thermostat and Help from top to bottom:

Figure 24. Azure RTOS GUIX Studio Project Screens

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 14 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

19. Click “Configure->Project/Display” and confirm the following settings.

Figure 25. Configure Project Settings
20. Go back e2 studio project (Thermostat_GUIX_EK_RA6M3G), right click “src”, then select “New->Folder”
and create a folder named “guix_gen”.

Figure 26. Creating a “guix_gen” in e2studio Project

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 15 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

21. Confirm “guix_gen” is created before moving to next step.

Figure 27. Confirming Creation of “guix_gen”
22. In Azure RTOS GUIX Studio, click Project->Generate All Output Files to generate resource files, header
files and source files of this GUIX design.

Figure 28. Clicking Generate All Output Files
Click Generate to generate all output files. If succeeded, you will see below notification.

Figure 29. All Output Files Updated Notification

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 16 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

23. All output files are now in “guix_gen” folder.

Figure 30. Location of Output Files
24. In the Azure RTOS GUIX Studio Project, click “Splash” and pick up “Widget Name” and “Event
Function” definitions. These definitions are used to create a screen and handle it in the e2studio/FSP
project. The other windows have similar definitions.

Figure 31. Definitions in the Azure RTOS GUIX Studio Project
R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 17 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

25. Copy and replace the files in “src” folder in e2 studio project with the files in “2.23” folder in the AN folder:• hmi_event_handler.c• system_thread_entry.c
Build Thermostat_GUIX_EK_RA6M3G project you will see several warnings, but we will address them inlater steps.
26. Code highlight: The following example creates a screen based on Widget Name in GUIX project andattached it to the root window. In this case, it is the “Splash” screen. Refer to system_thread_entry.c formore details.

27. Code highlight: An event function associated with a screen needs to be defined to handle events on thatscreen. Refer to hmi_event_handler.c for more details. All event functions are empty at this point.

28. Get your EK-RA6M3G ready to run the project. Connect LCD board to Graphics Expansion connector
on EK-RA6M3 as shown below.

Figure 32. Connecting LCD Board to Graphics Expansion Connector of EK-RA6M3
29. Connect EK-RA6M3G kit to your PC using J10. Download and Run Thermostat_GUIX_EK_RA6M3G
project, you will see a black screen.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 18 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

30. Add the following code to splashscreen_event function in hmi_event_handler.c to show Splash screen.
Build the e2 studio project.
switch (event_ptr->gx_event_type){case GX_EVENT_SHOW:
gx_err = gx_window_event_process(widget, event_ptr);
if(GX_SUCCESS != gx_err) {while(1);}break;
default:
gx_err = gx_window_event_process(widget, event_ptr);
if(GX_SUCCESS != gx_err) {while(1);}break;}
Please refer to splashscreen_event function in hmi_event_handler.c in “2.28” folder in the AN folder.
31. Download and Run the project, you will see the Splash screen on LCD panel.

Figure 33. Splash Screen View on LCD

3. Using GUIX Widget Timer to Trigger a Screen Transition
3.1

Overview

In this section, you will implement a simple use of GUIX Widget timer, which is to trigger a screen transition.

3.2

Procedural Steps

1. Copy and replace the files in “src” folder in e2 studio project with the files in “3.1” folder in the AN folder:
hmi_event_handler.csystem_thread_entry.c

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 19 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

2. Code highlight: The following code in splashscreen_event function starts a GUIX Widget timer and triggera screen transition that hides Splash screen and shows Main Page screen.
switch (event_ptr->gx_event_type){case GX_EVENT_TIMER:
gx_system_timer_stop(widget, 10);
toggle_screen(p_mainpage_screen,p_splash_screen);break;
case GX_EVENT_SHOW:
gx_system_timer_start(widget, 10 , SPLASH_TIMEOUT,SPLASH_TIMEOUT);
gx_err = gx_window_event_process(widget, event_ptr);
if(GX_SUCCESS != gx_err) {while(1);}break;
default:
gx_err = gx_window_event_process(widget, event_ptr);
if(GX_SUCCESS != gx_err) {while(1);}break;}
3. Build, Download, and Run the project, you will see the transition from Splash screen to Main Page
screen in about 3 seconds.

Figure 34. Main Page Screen

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 20 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

4. Add Touch Driver to Thermostat_GUIX_EK_RA6M3G Project
4.1

Overview

In this section, you will add the ft5x06 touch driver to the project to handle touch events on LCD panel.

4.2

Procedural Steps

1. In Thermostat_GUIX_EK_RA6M3G project, create a folder by right-clicking “src”, then select “New>Folder”.

Figure 35. Creating New Folder in Thermostat_GUIX_EK_RA6M3G Project
Click Finish to create “touch_ft5x06” folder.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 21 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

2. Copy touch_ft5x06.c and touch_ft5x06.h from “touch_ft5x06” folder in the Lab folder to the one ine2 studio project.

Figure 36. Copying files to the e2 studio Project
3. Open project configuration and create Touch Thread with the settings below.

Figure 37. Creating Touch Thread

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 22 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

4. The pins marked in red below are used for touch panel controller on the LCD board:••

IRQ0 interrupt (P206) is used to trigger touch events.
I2C channel 2 (P512, P511) is used to read and write data to the touch controller. P304 is used toreset the touch controller.

Figure 38. Pins Used in Touch Panel Controller (marked in red)
5. Since the IRQ0 (P206) needs a pull-up to function properly with the LCD board, do not change the settingthat was done by FSP, as shown below.

Figure 39. FSP Setting

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 23 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

6. In e2 studio project configuration, add External IRQ Driver on r_icu to Touch Thread with the following
settings.

Figure 40. Adding External IRQ Driver on r_icu to Touch Thread
7. In project configuration, add I2C Master Driver on r_iic_master to Touch Thread with below settings.

Figure 41. Adding I2C Master Driver on r_iic_master to Touch Thread

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 24 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

8. In project configuration, add Touch Semaphore as shown below. We use this semaphore to signal the
Touch thread when a touch event occurs. The Touch thread then sends the touch event to GUIX.

Figure 42. Adding Touch Semaphore
9. In project configuration, add I2C Semaphore as shown below. This semaphore is used in the ft5x06 driverto trigger data reading when a touch-panel interrupt occurs.

Figure 43. Adding I2C Semaphore

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 25 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

10. In RA Configurator, click
to generate project content.
11. Copy and replace the files in “src” folder in the e2 studio project with the files in “4.11” folder in the AN
folder:• hmi_event_handler.c• system_thread_entry.c• touch_thread_entry.c
12. Code highlight: Below code in touch_thread_entry.c get touch data and send touch event to GUIX.
/* Get touch data from the FT5X06 */ft5x06_payload_get(&touch_data);/* Send touch data*/
if(1 == touch_data.num_points){
gxe.gx_event_payload.gx_event_pointdata.gx_point_x= touch_data.point[0].x;

gxe.gx_event_payload.gx_event_pointdata.gx_point_y= touch_data.point[0].y;

gxe.gx_event_type = GX_EVENT_PEN_DOWN;
gx_system_event_send(&gxe);}
else if (GX_EVENT_PEN_DOWN == gxe.gx_event_type){gxe.gx_event_type = GX_EVENT_PEN_UP;
gx_system_event_send(&gxe);}
13. All the screens designed in the Azure RTOS GUIX Studio project are now created insystem_thread_entry.c

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 26 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

The code marked in red in hmi_event_handler.c handle touch event when Thermostat button and Settings
button are clicked. Refer to hmi_event_handler.c for more details.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 27 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

14. Build, Download, and Run the e2 studio project. Then, you will be able to go back and forth from the Main
Page screen to Thermostat screen and Settings screen using Thermostat and Settings buttons on Main
Page screen and “Back” button on the other two screens.

Figure 44. Navigating between Main Page Screen and Thermostat Screen

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 28 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

5. Control LCD Backlight
5.1

Overview

In this section, you will use a PWM output pin of a GPT timer to control the intensity (brightness) of LCD
backlight.

5.2

Procedural Steps

1. In LCD board schematics below, the LCD_BLEN signal, which is connected to the P603 on the RA6M3
MCU, is configured in PWM mode to control the intensity of LCD backlight.

Figure 45. LCD Board Schematic
2. To configure P603 in PWM output mode, we disable it in Pin Configuration at first. Save this change
before moving to the next step.

Figure 46. Disabling P603 in Pin Configuration

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 29 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

3. In Pin Configuration, set P603 as GPT7 GTIOCA output.

Figure 47. Setting P603 as GPT7 GTIOCA Output in Pin Configuration
4. In project configuration, add Timer Driver on r_gpt to System Thread with below settings.

Figure 48. Adding Timer Driver on r_gpt to System Thread
Even though the duty cycle of PWM output is purposely set to 10% here, it will be changed to 50% later in thecode.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 30 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

5. In RA Configurator, click
to generate project content.
6. Copy and replace the files in “src” folder in e2 studio project with the files in “5.6” folder in the AN folder: hmi_event_handler.c system_thread_entry.c
 brightness.c
 brightness.h system_api.h system_cfg.h
7. brightness_up and brightness_down functions in brightness.c are used to set the PWM duty cycle, as
shown below:/* Get the current period setting. */R_GPT_InfoGet(&g_timer_PWM_ctrl, &info);/* Calculate the desired duty cycle based on the current period. */duty_cycle_count = (uint32_t) ((info.period_counts *brightness)/GPT_PWM_MAX_PERCENT);
err = R_GPT_DutyCycleSet(&g_timer_PWM_ctrl, duty_cycle_count,
GPT_IO_PIN_GTIOCA);
8. Looking at gpt_timer_PWM_Setup function in system_thread_entry.c, you will see brightness (dutycycle of PWM output) is set to 50 percent.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 31 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

9. Build, Download, and Run the e2 studio project. By clicking the Settings button on Main Page screen,
you can access Settings screen.

Figure 49. Settings Button on Main Page Screen
10. PWM output measured on pin P603 with brightness is set to 50%.

Figure 50. PWM Output on P603 at 50% Brightness
11. Click “Display” menu on Settings screen, you can use “Up” and “Down” buttons to change the brightness
of LCD backlight.

Figure 51. Display on Settings Screen
12. PWM output measured on pin P603 after changing brightness to 65%.

Figure 52. PWM Output on P603 at 65% Brightness

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 32 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

6. Update Date/Time and Temperature
6.1

Overview

In this section, you will enable RTC controller as a timekeeper and one ADC channel to read the MCU die’stemperature sensor and use it as Thermostat temperature data.

6.2

Procedural Steps

1. In project configuration, create Temperature Time Thread.

Figure 53. Create Temperature Time Thread
2. In project configuration, add RTC Driver on g_rtc to Temperature Time Thread.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 33 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

Figure 54. Adding RTC Driver on g_rtc to Temperature Time Thread
3. In project configuration, add ADC Driver on r_adc to System Thread.

Figure 55. Adding ADC Driver on r_adc to System Thread

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 34 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

4. Select Temperature Sensor as input source for g_adc module.

Figure 56. Selecting Temperature Sensor as Input Source for g_adc
5. Create g_timer_semaphore with the following settings. We use this semaphore to trigger the date andtime update every second.

Figure 57. Creating g_timer_semaphore
R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 35 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

6. In RA Configurator, click
to generate project content.
7. Copy and replace the files in “src” folder in e2 studio project with the files in “6.6” folder in the Lab
folder: hmi_event_handler.c system_thread_entry.c
 system_time.c
 system_time.h system_api.h
8. In System Thread, date/time data and temperature data get updated every second. It then sends out
events to trigger GUIX updates.
9. The following is an example of handling temperature and time update events in the Main Page screen
event handler.
10. Build, Download, and Run the e2 studio project. You will see time and temperature get updated every
second.

Figure 58. Time, Temperature on Main Page Screen

7. Setting Date/Time in A Full Function Project
7.1

Overview

In this section, you will import and run the complete Thermostat project that enables the settings of date andtime. Upon user press date and time buttons on the settings screen, a message will be sent to the systemthread to update the date and time, then the system thread will send a GUIX event to trigger time display
update on screens.

R12AN0120EU0102 Rev.1.02
Jun.03.24

Page 36 of 38

Renesas RA Family
7.2

Getting Started with GUIX Thermostat Application

Procedural Steps

1. You can try the completed project in “completed_project” folder that has a full function Thermostat
application. Use “Rename & Import Existing C/C++ Project into Workspace” feature of Import menu
in e2 studio to do so since you already had a project with the same in the workspace.

Figure 59. Rename & Import Existing C/C++ Project into Workspace on Import Menu

8. Website and Support
Visit the following URLs to learn about key elements of the RA family, download components and related
documentation, and get support:
RA Product Information
RA Product Support ForumRA Flexible Software Package
Renesas Support

R12AN0120EU0102 Rev.1.02
Jun.03.24

renesas.com/rarenesas.com/ra/forum
renesas.com/FSP
renesas.com/support

Page 37 of 38

Renesas RA Family

Getting Started with GUIX Thermostat Application

Revision History
Rev.
1.00
1.01
1.02

Date
May.13.24
Jul.17.23
Jun.03.24

R12AN0120EU0102 Rev.1.02
Jun.03.24

Description
Page
Summary—
Initial release—
Updated for FSP v4.4.0.
—
Updated for FSP v5.2.0.

Page 38 of 38

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 andmeasurement tools including work benches and floors must be grounded. The operator must also be grounded using a wrist strap. Semiconductor2.

devices must not be touched with bare hands. Similar precautions must be taken for printed circuit boards with mounted semiconductor devices.
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 ofregister 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 statesof 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 power3.

reaches the level at which resetting is specified.
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

4.

elements. Follow the guideline for input signal during power-off state as described in your product documentation.
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 vicinityof 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

5.

become possible.
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

6.

produced with an external resonator or by an external oscillator while program execution is in progress, wait until the target clock signal is stable.
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 VIL(Max.) and VIH (Min.) due to noise, for example, the device may malfunction. Take care to prevent chattering noise from entering the device when the7.

input level is fixed, and also in the transition period when the input level passes through the area between VIL (Max.) and VIH (Min.).
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 these8.

addresses as the correct operation of the LSI is not guaranteed.
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 interms 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 asystem-evaluation test for the given product.

Notice1.

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 yourproduct or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the useof 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 thisdocument, 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 be responsible for determining what licenses are required from any third parties, and obtaining such licenses for the lawful import, export,
manufacture, sales, utilization, distribution or other disposal of any products incorporating Renesas Electronics products, if required.
5. 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.
6. Renesas Electronics products are classified according to the following two quality grades: “Standard” and “High Quality”. The intended applications foreach 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; homeelectronic appliances; machine tools; personal electronic equipment; industrial 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 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 tohuman life or bodily injury (artificial life support devices or systems; surgical implantations; etc.), or may cause serious property damage (spacesystem; 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 productthat is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
7. No semiconductor product is absolutely secure. Notwithstanding any security measures or features that may be implemented in Renesas Electronics
hardware or software products, Renesas Electronics shall have absolutely no liability arising out of any vulnerability or security breach, including but
not limited to any unauthorized access to or use of a Renesas Electronics product or a system that uses a Renesas Electronics product. RENESASELECTRONICS DOES NOT WARRANT OR GUARANTEE THAT RENESAS ELECTRONICS PRODUCTS, OR ANY SYSTEMS CREATED USINGRENESAS ELECTRONICS PRODUCTS WILL BE INVULNERABLE OR FREE FROM CORRUPTION, ATTACK, VIRUSES, INTERFERENCE,
HACKING, DATA LOSS OR THEFT, OR OTHER SECURITY INTRUSION (“Vulnerability Issues”). RENESAS ELECTRONICS DISCLAIMS ANY AND
ALL RESPONSIBILITY OR LIABILITY ARISING FROM OR RELATED TO ANY VULNERABILITY ISSUES. FURTHERMORE, TO THE EXTENTPERMITTED BY APPLICABLE LAW, RENESAS ELECTRONICS DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, WITHRESPECT TO THIS DOCUMENT AND ANY RELATED OR ACCOMPANYING SOFTWARE OR HARDWARE, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8. 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 byRenesas 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 suchspecified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of Renesas Electronics products, semiconductor products have specificcharacteristics, 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 foraging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult and impractical, you areresponsible for evaluating the safety of the final products or systems manufactured by you.
10. 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 ofcontrolled substances, including without limitation, the EU RoHS Directive, and using Renesas Electronics products in compliance with all theseapplicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliancewith applicable laws and regulations.
11. Renesas Electronics products and technologies shall not be used for or incorporated into any products or systems whose manufacture, use, or sale isprohibited 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.
12. It is the responsibility of the buyer or distributor of Renesas Electronics products, or any other party who distributes, disposes of, or otherwise sells ortransfers the product to a third party, to notify such third party in advance of the contents and conditions set forth in this document.
13. This document shall not be reprinted, reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
14. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
Electronics products.
(Note1)(Note2)“Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its directly or indirectly controlledsubsidiaries.
“Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
(Rev.5.0-1 October 2020)

Corporate Headquarters

Contact information

TOYOSU FORESIA, 3-2-24 Toyosu,
Koto-ku, Tokyo 135-0061, JapanFor further information on a product, technology, the most up-to-dateversion of a document, or your nearest sales office, please visit:www.renesas.com/contact/.

www.renesas.com

Trademarks
Renesas and the Renesas logo are trademarks of Renesas Electronics
Corporation. All trademarks and registered trademarks are the propertyof their respective owners.

© 2024 Renesas Electronics Corporation. All rights reserved.