Introduction

OSS-ECAL stands for Open Source Software for Electronic Components Abstraction Layer. OSS-ECAL is a software layer aimed at streamlining software development for electronic components and improving the availability of electronic components, and is equipped with a software interface tailored to the characteristics of electronic components.
The programming language of OSS-ECAL is C.

Definition of Terms

TermDefinition
ABCTemporary name of electronic component
APIApplication interface
COMMANDTentative name of command
Name after “eCMD_” declared in etCMD
Rename member names to match electronic components
e (prefix)Enumerated type member-name
et (prefix)Enumerated type tag-name
etCMDEnumerated type definition for commands
Rename member names to match electronic components
etSTSEnumerated type definition for status
fFloating-point
HALHardware Abstraction Layer (AUTOSAR MCAL)
HALNAMETentative name of HAL
For HALNAME, please refer to HAL Support.
iInteger
Fixed-point
(prefix) #define immediate
oABCAPI Function Name (Type of command passed as parameter)
Rename member names to match electronic components
oABC_COMMANDAPI Function Name
Rename member names to match electronic components
OSS-ECALOpen Source Software for Electronic Components Abstraction Layer
READReading from electronic components (receiving, in the case of communication)
st (prefix)Struct type tag-name
stABC_ITentative name for argument types of API function inputs
stABC_OTentative name for argument types of API function outputs
WRITEWriting to electronic components (send)
WRITE_READ1. Writing to electronic components (send)
2. Read from electronic components (receive)

API Function

In order to realize standard interfaces for electronic components and interfaces tailored to the characteristics of each electronic component, the API provides the following two types of API functions.

etSTS oABC( etCMD cmd, stABC_I dat, stABC_O* rlt )

This API function type passes commands as parameters.

Function nameoABCAPI function name of ABC
Return valueetSTSOSS-ECAL status code
Parameter INetCMD cmdOSS-ECAL command code
stABC_I datIn data of ABC function
Parameter OUTstABC_O* &rltOut data of ABC function
Exe : Temperature sensor AD22100A manufactured by ROHM. ADC type
etSTS oAD22100A( etCMD, float32* );

void function(void)
{
    float32 rlt;           // Temperature[degrees Celsius]
    // Output voltage of AD22100A is converted to AD and the result of temperature conversion is
    // read into vgPHY (READ command)
    etSTS sts = oAD22100A( eCMD_START_READ, &rlt );
}
etSTS oAD22100A( etCMD cmd, float32* rlt )
Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_MINMinimum temperature error (rlt is minimum temperature)
eSTS_ERR_MAXMaximum temperature error (rlt is maximum temperature)
eSTS_ERR_HAL_ADCHAL ADC Error
eSTS_ERR_COMMAND_CODECommand selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_ADC_OBJECTAD conversion object selection error
Parameter INetCMD cmdOSS-ECAL command code
eCMD_STARTCommand to start AD conversion.
eCMD_READCommand that reads the AD conversion value, converts the AD conversion value to a characteristic Temperature, and stores the Temperature in rlt.

AD conversion value to temperature conversion equation
Voltage value = (AD conversion value × VDD) / ( 2AD bit )
Temperature = ((voltage value – voltage offset value) / gain) + Temperature offset value (Min, Max Limit)
eCMD_START_READCommand that starts AD conversion, waits for AD conversion to finish, reads out the AD conversion value, converts the AD conversion value to a characteristic Temperature, and stores the Temperature in rlt.

AD conversion value to temperature conversion equation
Voltage value = (AD conversion value × VDD) / ( 2AD bit )
Temperature = ((voltage value – voltage offset value) / gain) + Temperature offset value (Min, Max Limit)
Parameter OUTfloat32* rltTemperature -40 to 85 [°C]

Command Correspondence Table by HAL

ArduinoeCMD_START_READ
ARM MbedeCMD_START_READ
AUTOSAR
Debian(Linux)eCMD_START_READ
Infineon ModusToolboxeCMD_START_READ
NXP MCUXpresso MXRT1051B_1052BeCMD_START
eCMD_READ
eCMD_START_READ
Renesas SSPeCMD_START
eCMD_READ
eCMD_START_READ
STM STM32Cube FW_F4eCMD_START
eCMD_READ
eCMD_START_READ

etSTS oABC_COMMAND( stABC_I dat, stABC_O* rlt )

This API function type specifies a command by function name. (Command API function)

Function nameoABCAPI function name of ABC
Return valueetSTSOSS-ECAL status code
Parameter INstABC_I datIn data of ABC function
Parameter OUTstABC_O* rltOut data of ABC function
Exe : Temperature sensor BD1020HFV manufactured by ROHM. ADC type
etSTS oAD22100A_READ( float32* );

void function(void)
{
    float32 rlt;           // Temperature[degrees Celsius]
    // Output voltage of AD22100A is converted to AD and the result of temperature conversion is
    // read into vgPHY (READ command)
    etSTS sts = oAD22100A_READ( &rlt );
}
etSTS oAD22100A_READ( float32* rlt )

The oAD22100A_READ function is an API function that checks for the end of AD conversion, reads the AD conversion value, converts the AD conversion value to a characteristic temperature, and stores the temperature in rlt.

AD conversion value to temperature conversion equation
Voltage value = (AD conversion value × VDD) / ( 2AD bit )
Temperature = ((voltage value – voltage offset value) / gain) + Temperature offset value (Min, Max Limit)

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_MINMinimum temperature error (rlt is minimum temperature)
eSTS_ERR_MAXMaximum temperature error (rlt is maximum temperature)
eSTS_ERR_HAL_ADCHAL ADC Error
eSTS_ERR_TIMEOUTADC Timeout error (AUTOSAR only)
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_ADC_OBJECTAD conversion object selection error
Parameter OUTfloat32* rltTemperature -40 to 85 [°C]

Function Correspondence Table by HAL

Arduino
ARM Mbed
AUTOSARXTime-out time ADC_TIMEOUT [us] setting
Debian(Linux)
Infineon ModusToolbox
NXP MCUXpresso MXRT1051B_1052BX
Renesas SSPX
STM STM32Cube FW_F4XTime-out time HAL_MAX_DELAY

Files

The file structure of OSS-ECAL is as follows. The structure differs depending on the HAL, so please check the OSS-ECAL page for each electronic component.

Folder*FileSummary
ABC_HALNAME_VERSION/samplesample.c (.cpp)Sample Application Program
sample.hSample Application Header
ABC_HALNAME_VERSIONoABC.c (.cpp)OSS-ECAL Program for ABC
oABC.hOSS-ECAL Header for ABC
ABC_ARDUINO.inoSample application programs for Arduino
oss_ecal.hOSS-ECAL Common Header (Ver 01.00.00 or later, AUTOSAR is Ver 01.01.07 or later)
oTypes.hTypedef header file for AUTOSAR
user_setting.c (.cpp)Const and Table of User setting
user_setting.hHeader of User setting
readme.mdReadme
OSS-ECAL Terms of Use.txtOSS-ECAL Terms of Use

HAL Support

OSS-ECAL HAL support is as follows (expanding sequentially). Please check each electronic components OSS-ECAL page for HAL support.

HALMCU*Development environment*HALNAME
Arduino 1.8.6ATmega2560
ATmega328P
Mega 2560 Rev3
Arduino Pro Mini 3.3V
ARDUINO
ARM Mbed 6.17.0STM32F401RESTM32 Nucleo-64 boardsMBED
AUTOSAR 4.4 (MCAL)S32K144S32K144EVB-Q100MCAL
Infineon ModusToolbox HAL Cat1 2.4.3CYBLE-416045-02CY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitModusToolbox
NXP MCUXpresso SDK
iMXRT1051B_1052B
ksdk2_0
MIMXRT1052DVL6AIMXRT1050-EVKBiMXRT1051B1052B
Renesas SSP 2.4.0R7FS7G27H3A01CFCS7G2 SKSSP
STM STM32Cube FW_F4 V1.27.1STM32F401RESTM32 Nucleo-64 boardsSTM32F4
Debian(Linux) v2022.04TI AM335xBeagleBone Black – Rev CLinux

* MCU and development environment at the time of development. Even if the same HAL is used, different MCUs and development environments may not work together.

Built-in How to

How to incorporate OSS-ECAL into user programs

How to incorporate multiple OSS-ECALs in a user program (same MCU function)

How to incorporate multiple OSS-ECALs in a user program (different MCU function)

How to incorporate multiple identical electronic components into a user program

How to reduce the impact on user programs by replacing electronic components

OSS-ECAL English
error: Content is protected !!