S-35710

S-35710 is a Wakeup timer IC (1s to194days) made by ABLIC. This posting will provide the OSS-ECAL(Open Source Software for Electronic Components Abstraction Layer) for S-35710.
MCU interface : I2C, GPIO

CAUTION:Please be sure to refer to the latest version of the Datasheet prior to actual design.

S-35710

General description

The wake-up timer IC allows for intermittent system operation by periodically waking up the system. The S-35710 Series compares the timer value and the value written to the internal register, and outputs a wake-up signal (interrupt signal) when the values match each other. The timer of the S-35710 Series is a 24-bit binary-up counter. The internal register data can be set freely by users via a 2-wire serial interface. Consequently, the time before the occurrence of a wake-up signal (interrupt signal) can be set freely. 

Feature

  • Wake-up function (Alarm interrupt function):
    Settable on the second time scale from 1 second to 194 days (Approximately half a year)
  • Low current consumption: 0.2 μA typ. (Quartz crystal: CL = 6.0 pF, VDD = 3.0 V, Ta = +25°C)
  • Wide range of operation voltage: 1.8 V to 5.5 V
  • 2-wire (I2C-bus) CPU interface
  • Built-in 32.768 kHz crystal oscillation circuit
  • Operation temperature range: Ta = −40°C to +85°C
  • Lead-free (Sn 100%), halogen-free

Application

  • IoT communications device
  • Monitoring device
  • Security device
  • Battery system
  • Energy harvesting system

OSS-ECAL specification

API Function

OSS-ECAL API functions are basically assumed to be function calls from a periodic Thread (TASK).

etSTS oS35710_CLEAR( void )

The oS35710_CLEAR function is an API function to zero-clear the Time Register and Wakeup Time Register with the /RST pin held Low.

  1. /RST pin Low.
  2. Wait until 438ms has passed (return value eSTS_EXE while waiting).

NOTE :
The 438ms elapsed time is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].
/RST pin continues Low. To count up the Wake-up time, execute the command eCMD_COUNTUP.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
etSTS oS35710_COUNTUP( void )

The oS35710_COUNTUP function is an API function that counts up the Time register with the /RST pin set to Hi.

  1. /RST pin Hi.
  2. Wait until 438ms has passed (return value eSTS_EXE while waiting).

NOTE :
The 438ms elapsed time is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].
/RST pin continues Hi.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
etSTS oS35710_WRITE_WUR( uint32 wut )

The oS35710_WRITE_WUR function is an API function to write the wut value (24bit) to the wake-up time register.

  1. Write the value of wut (24bit) to the wake-up time register.

NOTE :
Please do this when in the write mode (/RST pin Hi).

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
Parameter INuint32 wut Wake-up time [s]24bit
etSTS oS35710_READ_WUR( stS35710M_O* rlt )

The oS35710_READ_WUR function is an API function that reads the value of the wakeup time register (24bit) and stores it in rlt.wakeup_reg.

  1. Read the value of the wakeup time register (24bit) and save it in rlt.wakeup_reg.

NOTE :
Please do this when in the write mode (/RST pin Hi).

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstS35710_O* rltReceive data from S-35710
uint32 timer_regTime register value[s](not updated)
uint32 wakeup_regWake-up time register value[s]
etSTS oS35710_READ_TR( stS35710M_O* rlt )

The oS35710_READ_TR function is an API function that reads the value of the time register (24bit) and stores it in rlt.timer_reg.

  1. Read the value of the time register (24bit) and save it to rlt.timer_reg.

NOTE :

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstS35710_O* rltReceive data from S-35710
uint32 timer_regTime register value[s]
uint32 wakeup_regWake-up time register value[s](not updated)
etSTS oS35710_DIAG_WUR( uint32 wut )

The oS35710_DIAG_WUR function is an API function to diagnose wake-up time register write.

  1. /RST pin Hi.
  2. Wait until 438ms has passed (return value eSTS_EXE while waiting).
  3. Write the value of wut (24bit) to the wake-up time register.
  4. Read the value of wake-up time register (24bit).
  5. Returns the comparison result between wut and wake-up time register value as the return value.
    True … eSTS_FIN
    False … eSTS_ERR_DIAG

NOTE :
The 438ms elapsed time is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD [ms].

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_DIAGWake-up time register write diagnostic NG
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
Parameter INuint32 wut Wake-up time [s]24bit
etSTS oS35710_DIAG_TR( void )

The oS35710_DIAG_TR function is an API function to diagnose the count-up of the time register.

  1. /RST pin Hi.
  2. Wait until S35710_DIAG_TIME[s] have elapsed (return value eSTS_EXE while waiting).
  3. Read the value of time register (24bit).
  4. Returns the comparison result between S35710_DIAG_TIME[s] and the time register value as the return value.
    True … eSTS_FIN
    False … eSTS_ERR_DIAG

NOTE :
S35710_DIAG_TIME should be set to 1 (1 second) or more.
S35710_DIAG_TIME[s] The elapsed time is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_DIAGTime register count-up diagnostic NG
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
etSTS oS35710_DIAG_CLEAR( uint32 wut )

The oS35710_DIAG_CLEAR function is an API function to diagnose zero-clearing of the time and wake-up time registers.

  1. /RST pin Hi.
  2. Wait until S35710_DIAG_TIME[s] have elapsed (return value eSTS_EXE while waiting).
  3. Write the value of wut (24bit) to the wake-up time register.
  4. /RST pin Low.
  5. Wait until 438ms has passed (return value eSTS_EXE while waiting).
  6. Read the value of time register (24bit).
  7. /RST pin Hi.
  8. Wait until S35710_DIAG_TIME[s] have elapsed (return value eSTS_EXE while waiting).
  9. Read the value of wake-up time register (24bit).
  10. Returns the zero check result of the time register value and wake-up time register value as the return value.
    True … eSTS_FIN
    False … eSTS_ERR_DIAG

NOTE :
S35710_DIAG_TIME[s] and 438ms elapsed time are calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_DIAGWake-up time register zero-clearance diagnostic NG
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process.
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL.
eSTS_ERR_HAL_I2CHAL I2C error
Parameter INuint32 wut Wake-up time [s]24bit

Caution

INT signal input should be handled by the user’s program.

HAL Support List

OSS-ECAL’s HAL support is as follows. Please note that even if the same HAL is used, different versions, MCUs, and development environments may not work together. The list is being expanded sequentially.

ManufacturerSDK/IDE ToolHAL NameVerHALNAMESupport
ArduinoArduino IDEArduino1.8.6ARDUINOX
ArmKeil MDK v6Mbed OS6.17.0MBEDX
DebianGNU/Linux10.3LinuxX
InfineonModusToolboxmtb-hal-cat12.4.3ModusToolboxX
NXPMCUXpresso SDKSDK_2.x_EVKB-IMXRT10502.16iMXRT1051B1052BX
RenesasSynergy Software PackageHAL2.6.0SSPX
STMicroelectronicsSTM32CubeSTM32CubeF4V1.28.1STM32F4X
Development environment

The MCU and development environment during OSS-ECAL development are as follows.

HAL NameManufacturerBoardMCUIDE
ARDUINOArduino1.Mega 2560 Rev3
2.Arduino Pro Mini 3.3V
ATmega2560
ATmega328P
Arduino IDE 2.3.3
MBEDSTMicroelectronicsSTM32 Nucleo-64 boardsSTM32F401RETxArm Keil Studio Cloud
LinuxBeagleBoardBeagleBone BlackTI AM335x
ModusToolboxInfineonCY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitCYBLE-416045-02ModusToolbox
iMXRT1051B1052BNXPIMXRT1050-EVKBi.MX RT1050MCUXpresso IDE
SSPRenesasS7G2 SKR7FS7G27H3A01CFCe² studio for Renesas Synergy
STM32F4STMicroelectronicsSTM32 Nucleo-64 boardsSTM32F401RETxSTM32CubeIDE

File Structure

Folder*Filesummary
S35710_HALNAME_VERSION/samplesample.c (.cpp)Sample Application Program
sample.hSample Application Header
S35710_HALNAME_VERSIONoS35710.c (.cpp)OSS-ECAL Program for S-35710
oS35710.hOSS-ECAL Header for S-35710
S35710_ARDUINO.inoSample application programs for Arduino
oss_ecal.hOSS-ECAL Common Header
user_setting.c (.cpp)Const and Table of User setting
user_setting.hHeader of User setting
oHAL_i2c_stm32f4.cHAL Program for STM32Cube FW_F4
oHAL_i2c_stm32f4.hHAL Header for STM32Cube FW_F4
readme.mdReadme
OSS-ECAL Terms of Use.txtOSS-ECAL Terms of Use

* For HALNAME, please refer to HAL Support.

OSS-ECAL Download Contact

Please login before contacting us for downloads.
To register as a new user, click here.

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

CAUTION

The sample version of OSS-ECAL is not intended to be used with Threads (Tasks) or interrupts of different priority. Please do not use it as in the example below.

Example: If each sensor is assigned to the same ADC group and the OSS-ECAL API is executed in processes with different priorities, correct values may not be obtained.
ADC Gr0 Ch0 Temperature sensor AD22100A 100ms cycle Thread (low priority) to take in temperature
ADC Gr0 Ch1 Pressure sensor   MPX5999D Event interrupts (high priority) to take pressure

OSS-ECAL English
error: Content is protected !!