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 )
Return value
Parameter IN
Parameter OUT
etSTS
etCMD cmd
uint32 wut
stS35710_O* rlt
OSS-ECAL status code
OSS-ECAL command code
Wake-up time 24bit [s]
Receive data from S-35710
etCMD
eCMD_CLEAR
Feature :
Command to clear the time register and wake-up time register to zero by setting the /RST pin to low.
Process :
1. /RST pin Low.
2. Wait until 438ms has passed (return value eSTS_EXE while waiting).
Command API function :
etSTS oS35710_CLEAR( void )
Return value :
eSTS_FIN
eSTS_EXE
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_GPIO_OBJECT
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_COUNTUP
Feature :
Command to set the /RST pin to Hi and count up the time register.
Process :
1. /RST pin Hi.
2. Wait until 438ms has passed (return value eSTS_EXE while waiting).
Command API function :
etSTS oS35710_COUNTUP( void )
Return value:
eSTS_FIN
eSTS_EXE
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_GPIO_OBJECT
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_WUR
Feature :
Command to write wut value (24bit) to wake-up time register.
Process :
1. Write the value of wut (24bit) to the wake-up time register.
Command API function :
etSTS oS35710_WRITE_WUR( uint32 wut )
Return value :
eSTS_FIN
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT
NOTE :
Please do this when in the write mode (/RST pin Hi).
eCMD_READ_WUR
Feature :
Command to read the value of the wakeup time register (24bit) and save it in rlt.wakeup_reg.
Process :
1. Read the value of the wakeup time register (24bit) and save it in rlt.wakeup_reg
Command API function :
etSTS oS35710_READ_WUR( stS35710M_O* rlt )
Return value :
eSTS_FIN
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT
NOTE :
Please do this when in the write mode (/RST pin Hi).
eCMD_READ_TR
Feature :
Command to read the value of the time register (24bit) and save it to rlt.timer_reg.
Process :
1. Read the value of the time register (24bit) and save it to rlt.timer_reg.
Command API function :
etSTS oS35710_READ_TR( stS35710M_O* rlt )
Return value:
eSTS_FIN
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT
Note :
eCMD_DIAG_WUR
Feature :
Command to diagnose write to wake-up time register.
Process :
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
Command API function :
etSTS oS35710_DIAG_WUR( uint32 wut )
Return value :
eSTS_FIN
eSTS_EXE
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT
eSTS_ERR_GPIO_OBJECT
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_TR
Feature :
Command to diagnose time register count up.
Process :
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
Command API function :
etSTS oS35710_DIAG_TR( void )
Return value :
eSTS_FIN
eSTS_EXE
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT
eSTS_ERR_GPIO_OBJECT
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_CLEAR
Feature :
Command to diagnose zero-clearing of the time and wake-up time registers.
Process :
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
Command API function :
etSTS oS35710_DIAG_CLEAR( uint32 wut )
Return value :
eSTS_FIN
eSTS_EXE
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT
eSTS_ERR_GPIO_OBJECT
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].
stS35710M_O
uint32 timer_reg
uint32 wakeup_reg
Time register value[s]
Wake-up time register value[s]
Note : INT signal input should be handled by the user’s program.
Files
Folder* | File | summary |
---|---|---|
S35710_HALNAME/sample | sample.c (.cpp) | Sample Application Program |
| sample.h | Sample Application Header |
S35710_HALNAME | oS35710.c (.cpp) | OSS-ECAL Program for S-35710 |
| oS35710.h | OSS-ECAL Header for S-35710 |
| oss_ecal.h | OSS-ECAL Common Header (Ver 01.01.00 or later) |
| user_setting.c (.cpp) | Const and Table of User setting |
| user_setting.h | Header of User setting |
oHAL_i2c_stm32f4.c | HAL Program for STM32Cube FW_F4 | |
oHAL_i2c_stm32f4.h | HAL Header for STM32Cube FW_F4 | |
| readme.md | Readme |
| OSS-ECAL Terms of Use.txt | OSS-ECAL Terms of Use |
* For HALNAME, please refer to HAL Support.
HAL Support List
MCU/Board manufacturer | HAL | MCU* | Development environment* | HALNAME |
---|---|---|---|---|
Arduino | Arduino 1.8.6 | ATmega2560 ATmega328P | Mega 2560 Rev3 Arduino Pro Mini 3.3V | ARDUINO |
ARM | Mbed 6.17.0 | STM32F401RETx | STM32 Nucleo-64 boards | MBED |
Infineon | ModusToolbox HAL Cat1 2.4.3 | CYBLE-416045-02 | CY8CPROTO-063-BLE PSoC 6 BLE Prototyping Kit | ModusToolbox |
NXP | MCUXpresso SDK iMXRT1051B_1052B ksdk2_0 | CYBLE-416045-02 | IMXRT1050-EVKB | iMXRT1051B1052B |
Renesas | SSP 2.4.0 | R7FS7G27H3A01CFC | S7G2 SK | SSP |
STM | STM32Cube FW_F4 V1.27.1 | STM32F401RETx | STM32 Nucleo-64 boards | STM32F4 |
* 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.
HAL | Download OSS-ECAL Ver |
---|---|
Arduino 1.8.6 | |
Mbed 6.17.0 | |
ModusToolbox HAL Cat1 2.4.3 | |
MCUXpresso SDK iMXRT1051B_1052B ksdk2_0 | |
SSP 2.4.0 | |
STM32Cube FW_F4 V1.27.1 |
“ABC.zip was blocked because this type of file can harm your device.” in Microsoft Edge.
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