Ultra-Low-Power (ULP) Timer API Reference#
The Ultra-Low-Power (ULP) Timer API enables precise, energy-efficient timing control on the SiWx917 device.
This guide describes the available application programming interfaces (APIs), their parameters, return values, and recommended usage practices. Use this reference to integrate ULP Timer functionality into your applications efficiently and reliably.
The Public APIs allow you to configure, start, and manage ULP Timers. They form the foundation for implementing low-power timing operations, event scheduling, and wake-up control in power-constrained applications.
API Documentation Includes#
Function Descriptions – Purpose and typical use cases
Function Syntax – Prototypes and parameters
Input Parameters – Detailed explanation of required arguments
Return Values – Common status codes for success or failure
Usage Notes – Best practices and implementation guidance
For a complete list of APIs, refer to the official documentation:
SiWx917 ULP Timer API Reference
For working examples and configuration guidance, explore the Software Development Kit (SDK) examples:
Callback and Notification APIs#
The ULP Timer supports callback and notification mechanisms that enable event-driven application design. Callbacks eliminate the need for polling, helping reduce CPU activity and overall system power consumption.
Use callbacks to:
Trigger functions when timers expire.
Implement non-blocking timer operations to enhance efficiency.
Simplify event-driven system design for power-sensitive applications.
Tip: Callbacks execute in interrupt context, so keep the logic lightweight—set flags or signal events, and defer processing to the main loop or real-time operating system (RTOS) task.
For implementation guidance, refer to the API documentation:
Registering Event Callbacks
Integration Notes#
Always initialize the ULP Timer subsystem using
sl_si91x_ulp_timer_init()before calling other APIs.Recalculate match values if the clock source or frequency changes after power-state transitions.
Check API return values (for example,
SL_STATUS_OK) to validate successful configuration.Use
sl_si91x_power_manager_set_wakeup_sources()to integrate ULP Timers with the SiWx917 Power Manager for timed wake events.For multiple timer instances, assign separate callbacks to prevent event conflicts.