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-35710M 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-35710M 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.
Since the S-35710M has a built-in quartz crystal, a matching assessment of the IC and the quartz crystal is unnecessary.
Moreover, the number of external parts can also be reduced.

Feature

  • Built-in 32.768 kHz quartz crystal
  • 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.25 μA typ. (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
  • 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

etSTS oS35710( etCMD cmd, uint32 wut, stS35710_O* rlt )

The oS35710 function is an API function that executes S-35710 processing according to the command in the argument.

Return valueetSTSOSS-ECALステータスコード
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_COMMAND_CODECommand selection error
eSTS_ERR_DIAGIf the diagnosis result is NG with the following command.
eCMD_DIAG_WUR
eCMD_DIAG_TR
eCMD_DIAG_CLEAR
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 INetCMD cmdOSS-ECAL command code
eCMD_CLEARCommand to clear the time register and wake-up time register to zero by setting the /RST pin to 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.
eCMD_COUNTUPCommand to set the /RST pin to Hi and count up the time register.

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.
eCMD_WRITE_WURCommand to write wut value (24bit) to 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).
eCMD_READ_WURCommand to read the value of the wakeup time register (24bit) and save 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).
eCMD_READ_TRCommand to read the value of the time register (24bit) and save it to rlt.timer_reg.

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

NOTE :
eCMD_DIAG_WURCommand to diagnose write to wake-up time register.

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].
eCMD_DIAG_TRCommand to diagnose time register count up.

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].
eCMD_DIAG_CLEARCommand 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].
uint32 wutWake-up time [s]24bit
Parameter OUTstS35710_O* rltReceive data from S-35710
uint32 timer_regTime register value[s]
uint32 wakeup_regWake-up time register value[s]

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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]

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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)

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X
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

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
Debian ProjectDebian(Linux)X
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
STMSTM32Cube FW_F4 X

Caution

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

Files

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 (Ver 01.01.00 or later, AUTOSAR is Ver 01.01.07 or later)
oTypes.hTypedef header file for AUTOSAR
oHAL_i2c_stm32f4.cHAL Program for STM32Cube FW_F4
oHAL_i2c_stm32f4.hHAL Header for STM32Cube FW_F4
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

* For HALNAME, please refer to HAL Support.

HAL Support List

MCU/Board
manufacturer
HALMCU*Development environment*HALNAME
ArduinoArduino 1.8.6ATmega2560
ATmega328P
Mega 2560 Rev3
Arduino Pro Mini 3.3V
ARDUINO
ARMMbed 6.17.0STM32F401RESTM32 Nucleo-64 boardsMBED
InfineonModusToolbox HAL Cat1 2.4.3CYBLE-416045-02CY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitModusToolbox
NXPMCUXpresso SDK
iMXRT1051B_1052B
ksdk2_0
MIMXRT1052DVL6AIMXRT1050-EVKBiMXRT1051B1052B
RenesasSSP 2.4.0R7FS7G27H3A01CFCS7G2 SKSSP
STMSTM32Cube FW_F4 V1.27.1STM32F401RESTM32 Nucleo-64 boardsSTM32F4
Debian ProjectDebian(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.

OSS-ECAL Download

Please login before downloading. To register as a new user, please click here.
This OSS-ECAL is a sample version and can be downloaded without user registration, but please accept the OSS-ECAL Terms of Use before downloading.

If you are unable to download the File, please contact us and let us know the model number and HAL type. We will send you the file as an email attachment.

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 !!