Application Note
R01AN5897EJ0150 Rev.1.50 Page 1 of 90
August 30,22
RA Family, RX Family, RL78 Family, RE01 256KB / 1500KB Group, RZ Family
HS300x Sample Software Manual
Introduction
This application note describes the sample software that is for use with the HS300x humidity and
temperature sensor and runs on certain MCUs of the RA family, RX family, RL78 family, RE01 Group
(256KB / 1500KB Flash Memory) and RZ family.
Target Devices
RA6M4 Group
RX65N Group
RL78/G14 Group
RL78/G23 Group
RE01 Group (256KB / 1500KB Flash Memory).
RZ/G2L Group
Trademarks
FreeRTOS
TM
and FreeRTOS.org
TM
are trade marks of Amazon Web Services, Inc.
Microsoft
®
Azure RTOS is trade marks of the Microsoft group of companies. All other trade marks are
property of their respective owners.
Contents
1. Overview .................................................................................................................................... 4
2. Environment for Confirming Operation ...................................................................................... 4
2.1 Environment for Confirming Operation on an RA Family MCU ............................................................... 4
2.2 Environment for Confirming Operation on an RX Family MCU ............................................................... 6
2.3 Environment for Confirming Operation on an RL78/G14 Group MCU .................................................... 7
2.4 Environment for Confirming Operation on an RL78/G23 Group MCU .................................................... 8
2.5 Environment for Confirming Operation on an RE01 256KB Group MCU ............................................... 9
2.6 Environment for Confirming Operation on an RE01 1500KB Group MCU ........................................... 10
2.8 Environment for Confirming Operation on an RZ Family MCU ............................................................. 11
3. Sensor Specifications .............................................................................................................. 12
3.1 Overview of Sensor Specifications ........................................................................................................ 12
3.2 Sensor Functions .................................................................................................................................. 12
3.2.1 I2C Communication Interface .............................................................................................................. 13
3.2.2 Expressions for Converting Output Values to Humidity and Temperature ......................................... 13
RA Family, RX Family, RL78 Family, RE01 256KB / 1500KB Group, RZ Family
HS300x Sample Software Manual
R01AN5897EJ0150 Rev.1.50 Page 2 of 90
August 30,22
4. Sample Software Specifications .............................................................................................. 14
4.1 Configuration of the Sample Software .................................................................................................. 14
4.2 Specifications of Sensor API Functions ................................................................................................ 14
4.2.1 List of Sensor API functions ................................................................................................................ 14
4.2.2 Guide to Using the API Functions ....................................................................................................... 15
4.3 Low Power-Consumption Processing ................................................................................................... 18
4.4 Flowchart of the Main Processing in the Non-OS Version of the Sample Software ............................. 21
4.5 Flowchart of the OS Version of the Sample Software ........................................................................... 23
4.6 Azure RTOS Project .............................................................................................................................. 25
5. Configuration Settings ............................................................................................................. 26
5.1 HS300x Humidity and Temperature Sensor Settings ........................................................................... 26
5.1.1 RA Family ............................................................................................................................................ 26
5.1.2 RX Family ............................................................................................................................................ 27
5.1.3 RL78 Family ........................................................................................................................................ 28
5.1.4 RE01 256KB / 1500KB Group ............................................................................................................. 29
5.1.5 RZ Family ............................................................................................................................................ 30
5.2 Communication Driver Middleware Settings ......................................................................................... 31
5.2.1 RA Family ............................................................................................................................................ 31
5.2.2 RX Family ............................................................................................................................................ 32
5.2.3 RL78 Family ........................................................................................................................................ 34
5.2.4 RE01 256KB / 1500KB Group ............................................................................................................. 35
5.2.5 RZ Family ............................................................................................................................................ 36
5.3 I2C Driver Settings ................................................................................................................................ 37
5.3.1 RA Family ............................................................................................................................................ 37
5.3.2 RX Family ............................................................................................................................................ 41
5.3.3 RL78 Family ........................................................................................................................................ 45
5.3.4 RE01 256KB / 1500KB Group ............................................................................................................. 47
5.3.5 RZ Family ............................................................................................................................................ 51
6. Guide to Changing the Target Device ..................................................................................... 53
6.1 RA Sample Project ................................................................................................................................ 53
6.1.1 Importing the Sample Project .............................................................................................................. 53
6.1.2 Modifying Settings of the FSP Configurator ........................................................................................ 55
6.1.1 Changing toolchain setting .................................................................................................................. 58
6.2 RX Sample Project ................................................................................................................................ 58
6.2.1 Importing the Sample Project .............................................................................................................. 58
6.2.2 Changing the Device ........................................................................................................................... 61
6.2.3 Modifying Settings of the Smart Configurator ..................................................................................... 64
6.2.4 Changing toolchain setting .................................................................................................................. 67
6.3 RL78 Sample Project ............................................................................................................................ 68
6.3.1 Sample project using Code Generator ................................................................................................ 68