BSL 00000200

MP TypeI2C
OS TypeMulti-Thread Mbed , etc
Calculation accuracyfloating-point calculation
Characteristic Conversionlinear conversion
Filter Non
Diagnostics SP Max/Min , CP write error , MP ACK

Software Specifications

In this section, we will use the OSS-EC I2C component ( TI HDC1080 ) as an example.

Intended use scenarios

After “Power ON Reset”, the program moves to “measurement” and acquires temperature and humidity from the temperature and humidity sensor via I2C communication.
When “measurement” is selected, the heater is turned on by “Mode change” when the temperature is low. However, when the voltage is low, “Mode change” turns the heater OFF.
If the temperature and humidity are outside the upper and lower limits of the “measurement”, it is judged as NG.If nonzero on failure (nack) in I2C communication is repeated iCom_retry_num times of consecutive retries, it is judged NG.
If NG is determined, “Software Reset” is performed.


The software architecture of the OSS-EC is configured to pair with the hardware architecture of HDC1080, as shown in ( Fig. 1).
The state of an HDC1080 is changed by a command from the application as shown in (Fig.2).
The interface between the application and PCMP is the argument structure cmd and the return value structure res, as shown in (Fig.3).
Command sequence ( fig.4 )
Data table

Blue label characters are data related to application.

Data table

#define LabelValueData contents
iPCMP_cyc  1000U PCMP Function call cycle 1000[ms]
iError_times3UPCMP Error times 3times
iCom_retry_num3UI2C communication retry 3times
iTemp_low5.0FJudgment temperature value 5.0℃for turning on the heater
iHDC1080_dat_cnf_pwrst(iMODE+iTRES+iHRES)HDC1080 configuration register setting value( state : Power ON Reset )
iHDC1080_dat_cnf_nonheat(iMODE+iTRES+iHRES)HDC1080 configuration register setting value( state : Measurement non-heat )
HDC1080_dat_cnf_heat(iHEAT+iMODE+iTRES+iHRES)HDC1080 configuration register setting value( state : Measurement heat )
iHDC1080_dat_cnf_swrst(iRST+iMODE+iTRES+iHRES)HDC1080 configuration register setting value( state : Software Reset )
iRST(iBit15*1)0:Normal 1:software reset
iHEAT(iBit13*1)0:Heater disable 1:Heater enable
iMODE(iBit12*1)0:Temperature or Humidity is acquired 1:Temperature and Humidity are acquired in sequence, Temperature first
iTRES(iBit10*0)Temperature 0:14bit 1:11bit
iHRES(iBit09*0)+(iBit08*0)Humidity 00:14bit 01:11bit 10:8bit
iEndianiBigEndian select
iI2C_frequency400000Frequency 400kHz

File ( Mbed C++)

main.cppapplication source code file
pcmp.cppI2C Component source code file
pcmp.hI2C Component header file
oss-ec.h OSS-EC header file
ic.hIC Number header file
ic_setting.cppIC setting data file
layer_if.hLayer interface header file
prc.cppProcess function source code file
prc.hProcess function header file
user_setting.huser setting header file
hdc1080/hdc1080.cppHDC1080 data file
hdc1080/hdc1080.hHDC1080 header file